Skip to content

Commit ca7650d

Browse files
committed
chore(pom): Use sortpom-maven-plugin for better pom.xml style
1 parent 4e3d9af commit ca7650d

File tree

2 files changed

+40
-14
lines changed

2 files changed

+40
-14
lines changed

mcp-server-filesystem/pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
54

65
<modelVersion>4.0.0</modelVersion>
76

@@ -33,10 +32,10 @@
3332
<version>${maven-shade-plugin.version}</version>
3433
<executions>
3534
<execution>
36-
<phase>package</phase>
3735
<goals>
3836
<goal>shade</goal>
3937
</goals>
38+
<phase>package</phase>
4039
<configuration>
4140
<transformers>
4241
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">

pom.xml

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
54

65
<modelVersion>4.0.0</modelVersion>
76

@@ -20,6 +19,8 @@
2019
<maven.compiler.target>${java.version}</maven.compiler.target>
2120
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2221
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
22+
<!--==================== maven plugin versions ====================-->
23+
<sortpom-maven-plugin.version>4.0.0</sortpom-maven-plugin.version>
2324
<!--==================== dependency versions ======================-->
2425
<mcp-sdk.version>0.8.1</mcp-sdk.version>
2526
<jetty.version>12.0.18</jetty.version>
@@ -32,13 +33,18 @@
3233
<groupId>io.modelcontextprotocol.sdk</groupId>
3334
<artifactId>mcp-bom</artifactId>
3435
<version>${mcp-sdk.version}</version>
35-
<scope>import</scope>
3636
<type>pom</type>
37+
<scope>import</scope>
3738
</dependency>
3839
</dependencies>
3940
</dependencyManagement>
4041

4142
<dependencies>
43+
<dependency>
44+
<groupId>ch.qos.logback</groupId>
45+
<artifactId>logback-classic</artifactId>
46+
<version>${logback.version}</version>
47+
</dependency>
4248
<dependency>
4349
<groupId>io.modelcontextprotocol.sdk</groupId>
4450
<artifactId>mcp</artifactId>
@@ -48,11 +54,32 @@
4854
<artifactId>jetty-ee10-servlet</artifactId>
4955
<version>${jetty.version}</version>
5056
</dependency>
51-
<dependency>
52-
<groupId>ch.qos.logback</groupId>
53-
<artifactId>logback-classic</artifactId>
54-
<version>${logback.version}</version>
55-
</dependency>
5657
</dependencies>
5758

59+
<build>
60+
<plugins>
61+
<plugin>
62+
<groupId>com.github.ekryd.sortpom</groupId>
63+
<artifactId>sortpom-maven-plugin</artifactId>
64+
<version>${sortpom-maven-plugin.version}</version>
65+
<configuration>
66+
<nrOfIndentSpace>4</nrOfIndentSpace>
67+
<createBackupFile>false</createBackupFile>
68+
<indentAttribute>schemaLocation</indentAttribute>
69+
<sortModules>true</sortModules>
70+
<sortPlugins>groupId,artifactId</sortPlugins>
71+
<sortDependencies>groupId,artifactId</sortDependencies>
72+
<sortDependencyManagement>groupId,artifactId</sortDependencyManagement>
73+
</configuration>
74+
<executions>
75+
<execution>
76+
<goals>
77+
<goal>sort</goal>
78+
</goals>
79+
</execution>
80+
</executions>
81+
</plugin>
82+
</plugins>
83+
</build>
84+
5885
</project>

0 commit comments

Comments
 (0)