Skip to content

Commit ab2528c

Browse files
committed
Merge pull request #2 from mosabua/master
Working release process with mvn release plugin
2 parents f5305f0 + c1ded7d commit ab2528c

File tree

1 file changed

+46
-33
lines changed

1 file changed

+46
-33
lines changed

pom.xml

Lines changed: 46 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>org.javaee7.sample</groupId>
55
<artifactId>javaee7-simple-sample</artifactId>
6-
<version>1.5-SNAPSHOT</version>
6+
<version>1.8-SNAPSHOT</version>
77
<packaging>war</packaging>
88
<name>javaee7-simple-sample</name>
99
<properties>
@@ -21,7 +21,7 @@
2121
<connection>scm:git:https://github.com/javaee-samples/javaee7-simple-sample.git</connection>
2222
<url>https://github.com/javaee-samples/javaee7-simple-sample.git</url>
2323
<developerConnection>scm:git:https://github.com/javaee-samples/javaee7-simple-sample.git</developerConnection>
24-
<tag>HEAD</tag>
24+
<tag>v1.5</tag>
2525
</scm>
2626
<developers>
2727
<developer>
@@ -42,22 +42,51 @@
4242
</snapshotRepository>
4343
</distributionManagement>
4444
<build>
45+
<pluginManagement>
46+
<plugins>
47+
<plugin>
48+
<artifactId>maven-compiler-plugin</artifactId>
49+
<version>3.1</version>
50+
<configuration>
51+
<source>1.7</source>
52+
<target>1.7</target>
53+
</configuration>
54+
</plugin>
55+
<plugin>
56+
<artifactId>maven-war-plugin</artifactId>
57+
<version>2.3</version>
58+
<configuration>
59+
<failOnMissingWebXml>false</failOnMissingWebXml>
60+
</configuration>
61+
</plugin>
62+
<plugin>
63+
<artifactId>maven-release-plugin</artifactId>
64+
<version>2.5.1</version>
65+
<configuration>
66+
<tagNameFormat>v@{project.version}</tagNameFormat>
67+
<autoVersionSubmodules>true</autoVersionSubmodules>
68+
<!-- do not release profile from Maven super pom -->
69+
<useReleaseProfile>false</useReleaseProfile>
70+
<!-- instead use our own one called release, see below -->
71+
<releaseProfiles>release</releaseProfiles>
72+
</configuration>
73+
</plugin>
74+
<plugin>
75+
<artifactId>maven-javadoc-plugin</artifactId>
76+
<version>2.10.1</version>
77+
<configuration>
78+
<show>private</show>
79+
<nohelp>true</nohelp>
80+
</configuration>
81+
</plugin>
82+
<plugin>
83+
<groupId>org.apache.maven.plugins</groupId>
84+
<artifactId>maven-source-plugin</artifactId>
85+
<version>2.4</version>
86+
</plugin>
87+
</plugins>
88+
</pluginManagement>
4589
<plugins>
46-
<plugin>
47-
<artifactId>maven-compiler-plugin</artifactId>
48-
<version>3.1</version>
49-
<configuration>
50-
<source>1.7</source>
51-
<target>1.7</target>
52-
</configuration>
53-
</plugin>
54-
<plugin>
55-
<artifactId>maven-war-plugin</artifactId>
56-
<version>2.3</version>
57-
<configuration>
58-
<failOnMissingWebXml>false</failOnMissingWebXml>
59-
</configuration>
60-
</plugin>
6190
<plugin>
6291
<groupId>org.wildfly.plugins</groupId>
6392
<artifactId>wildfly-maven-plugin</artifactId>
@@ -81,11 +110,6 @@
81110
<plugin>
82111
<groupId>org.apache.maven.plugins</groupId>
83112
<artifactId>maven-javadoc-plugin</artifactId>
84-
<version>2.10.1</version>
85-
<configuration>
86-
<show>private</show>
87-
<nohelp>true</nohelp>
88-
</configuration>
89113
<executions>
90114
<execution>
91115
<id>attach-javadocs</id>
@@ -98,7 +122,6 @@
98122
<plugin>
99123
<groupId>org.apache.maven.plugins</groupId>
100124
<artifactId>maven-source-plugin</artifactId>
101-
<version>2.4</version>
102125
<executions>
103126
<execution>
104127
<id>attach-sources</id>
@@ -108,16 +131,6 @@
108131
</execution>
109132
</executions>
110133
</plugin>
111-
<plugin>
112-
<groupId>org.apache.maven.plugins</groupId>
113-
<artifactId>maven-release-plugin</artifactId>
114-
<version>2.5.1</version>
115-
<configuration>
116-
<tagNameFormat>v@{project.version}</tagNameFormat>
117-
<autoVersionSubmodules>true</autoVersionSubmodules>
118-
<releaseProfiles>release</releaseProfiles>
119-
</configuration>
120-
</plugin>
121134
</plugins>
122135
</build>
123136
</profile>

0 commit comments

Comments
 (0)