Skip to content

Commit 06a5ad5

Browse files
committed
optmize pom
1 parent fce5dcb commit 06a5ad5

File tree

3 files changed

+57
-67
lines changed

3 files changed

+57
-67
lines changed

qmq-deploy/pom.xml

+27-42
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?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" 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">
34
<parent>
45
<artifactId>qmq-parent</artifactId>
56
<groupId>com.qunar.qmq</groupId>
@@ -37,52 +38,36 @@
3738
</dependency>
3839
</dependencies>
3940

40-
<build>
41-
<plugins>
42-
<plugin>
43-
<groupId>org.apache.maven.plugins</groupId>
44-
<artifactId>maven-shade-plugin</artifactId>
45-
<version>1.4</version>
46-
<executions>
47-
<execution>
48-
<phase>package</phase>
49-
<goals>
50-
<goal>shade</goal>
51-
</goals>
52-
<configuration>
53-
<createSourcesJar>true</createSourcesJar>
54-
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
55-
<artifactSet>
56-
<includes>
57-
<include>com.qunar.qmq:qmq-api</include>
58-
<include>com.qunar.qmq:qmq-common</include>
59-
<include>com.qunar.qmq:qmq-remoting</include>
60-
<include>com.qunar.qmq:qmq-client</include>
61-
</includes>
62-
</artifactSet>
63-
<transformers>
64-
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
65-
<resource>META-INF/qmq-2.0.0.xsd</resource>
66-
</transformer>
67-
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
68-
<resource>META-INF/spring.handlers</resource>
69-
</transformer>
70-
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
71-
<resource>META-INF/spring.schemas</resource>
72-
</transformer>
73-
</transformers>
74-
</configuration>
75-
</execution>
76-
</executions>
77-
</plugin>
78-
</plugins>
79-
</build>
80-
8141
<profiles>
8242
<profile>
8343
<id>release</id>
8444
<build>
8545
<plugins>
46+
<plugin>
47+
<groupId>org.apache.maven.plugins</groupId>
48+
<artifactId>maven-shade-plugin</artifactId>
49+
<version>1.4</version>
50+
<executions>
51+
<execution>
52+
<phase>package</phase>
53+
<goals>
54+
<goal>shade</goal>
55+
</goals>
56+
<configuration>
57+
<createSourcesJar>true</createSourcesJar>
58+
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
59+
<artifactSet>
60+
<includes>
61+
<include>com.qunar.qmq:qmq-api</include>
62+
<include>com.qunar.qmq:qmq-common</include>
63+
<include>com.qunar.qmq:qmq-remoting</include>
64+
<include>com.qunar.qmq:qmq-client</include>
65+
</includes>
66+
</artifactSet>
67+
</configuration>
68+
</execution>
69+
</executions>
70+
</plugin>
8671
<plugin>
8772
<groupId>org.apache.maven.plugins</groupId>
8873
<artifactId>maven-source-plugin</artifactId>

qmq-dist/pom.xml

+30-24
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?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" 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">
34
<modelVersion>4.0.0</modelVersion>
45

56
<parent>
@@ -33,27 +34,32 @@
3334
</dependency>
3435
</dependencies>
3536

36-
<build>
37-
<plugins>
38-
<plugin>
39-
<artifactId>maven-assembly-plugin</artifactId>
40-
<executions>
41-
<execution>
42-
<id>assemble</id>
43-
<phase>package</phase>
44-
<goals>
45-
<goal>single</goal>
46-
</goals>
47-
<configuration>
48-
<finalName>qmq-dist-${project.version}</finalName>
49-
<descriptors>
50-
<descriptor>assembly/bin.xml</descriptor>
51-
</descriptors>
52-
<tarLongFileMode>gnu</tarLongFileMode>
53-
</configuration>
54-
</execution>
55-
</executions>
56-
</plugin>
57-
</plugins>
58-
</build>
37+
<profiles>
38+
<profile>
39+
<id>dist</id>
40+
<build>
41+
<plugins>
42+
<plugin>
43+
<artifactId>maven-assembly-plugin</artifactId>
44+
<executions>
45+
<execution>
46+
<id>assemble</id>
47+
<phase>package</phase>
48+
<goals>
49+
<goal>single</goal>
50+
</goals>
51+
<configuration>
52+
<finalName>qmq-dist-${project.version}</finalName>
53+
<descriptors>
54+
<descriptor>assembly/bin.xml</descriptor>
55+
</descriptors>
56+
<tarLongFileMode>gnu</tarLongFileMode>
57+
</configuration>
58+
</execution>
59+
</executions>
60+
</plugin>
61+
</plugins>
62+
</build>
63+
</profile>
64+
</profiles>
5965
</project>

qmq-server-common/pom.xml

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
<dependency>
2727
<groupId>com.fasterxml.jackson.core</groupId>
2828
<artifactId>jackson-annotations</artifactId>
29-
<version>2.9.1</version>
3029
</dependency>
3130
<dependency>
3231
<groupId>org.slf4j</groupId>

0 commit comments

Comments
 (0)