Review request JMC-6022 - Use hg changeset in version properties

Klara Ward klara.ward at oracle.com
Mon May 7 09:57:09 UTC 2018


Please review change for JMC-6022 - 
<https://bugs.openjdk.java.net/browse/JMC-6022>Use hg changeset in 
version properties

Currently, the changeSet property is set to 0, if the mercurial profile 
is not activated.
Change is to always call the hgchangeset goal, regardless of profile.
If/when we create a github mirror, additional logic is required.

Diff is attached.

Regards,
Klara
-------------- next part --------------
diff -r 0a79b43a0ab2 pom.xml
--- a/pom.xml	Thu May 03 15:17:04 2018 +0200
+++ b/pom.xml	Mon May 07 11:43:16 2018 +0200
@@ -46,7 +46,6 @@
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 		<tycho-version>1.0.0</tycho-version>
-		<changeSet>0</changeSet>
 		<buildId>${user.name}</buildId>
 	</properties>
 	<profiles>
@@ -95,31 +94,6 @@
 				</plugins>
 			</build>
 		</profile>
-		<profile>
-			<id>mercurial</id>
-			<build>
-				<plugins>
-					<plugin>
-						<groupId>org.codehaus.mojo</groupId>
-						<artifactId>buildnumber-maven-plugin</artifactId>
-						<version>1.4</version>
-						<inherited>false</inherited>
-						<executions>
-							<execution>
-								<id>build.changeid</id>
-								<phase>initialize</phase>
-								<goals>
-									<goal>hgchangeset</goal>
-								</goals>
-								<configuration>
-									<scmDirectory>${rootDir}</scmDirectory>
-								</configuration>
-							</execution>
-						</executions>
-					</plugin>
-				</plugins>
-			</build>
-		</profile>
 	</profiles>
 	<build>
 		<plugins>
@@ -230,6 +204,16 @@
 				<version>1.4</version>
 				<executions>
 					<execution>
+						<id>build.changeid</id>
+						<phase>initialize</phase>
+						<goals>
+							<goal>hgchangeset</goal>
+						</goals>
+						<configuration>
+							<scmDirectory>${rootDir}</scmDirectory>
+						</configuration>
+					</execution>
+					<execution>
 						<id>build.date</id>
 						<phase>initialize</phase>
 						<goals>


More information about the jmc-dev mailing list