@@ -948,6 +948,39 @@ Projects wishing to use pom-scijava as a parent project need to override the < |
948 | 948 | </configuration> |
949 | 949 | </plugin> |
950 | 950 |
|
| 951 | + <!-- |
| 952 | + Build Helper Maven plugin - |
| 953 | + http://www.mojohaus.org/build-helper-maven-plugin/ |
| 954 | + --> |
| 955 | + <plugin> |
| 956 | + <groupId>org.codehaus.mojo</groupId> |
| 957 | + <artifactId>build-helper-maven-plugin</artifactId> |
| 958 | + <version>1.9.1</version> |
| 959 | + <!-- |
| 960 | + Create a version string which conforms to Java packaging requirements. |
| 961 | + https://docs.oracle.com/javase/8/docs/technotes/guides/versioning/spec/versioning2.html#wp89936 |
| 962 | +
|
| 963 | + In particular, the standard Java packaging tool will fail unless the |
| 964 | + version string conforms to Java packaging rules. Further reading: |
| 965 | + https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/packaging.html# |
| 966 | + --> |
| 967 | + <executions> |
| 968 | + <execution> |
| 969 | + <id>sanitize-version</id> |
| 970 | + <goals> |
| 971 | + <goal>regex-property</goal> |
| 972 | + </goals> |
| 973 | + <configuration> |
| 974 | + <name>sanitizedVersion</name> |
| 975 | + <value>${project.version}</value> |
| 976 | + <regex>^([0-9]+)\.([0-9]+)\.([0-9]+).*$</regex> |
| 977 | + <replacement>$1.$2.$3</replacement> |
| 978 | + <failIfNoMatch>false</failIfNoMatch> |
| 979 | + </configuration> |
| 980 | + </execution> |
| 981 | + </executions> |
| 982 | + </plugin> |
| 983 | + |
951 | 984 | <!-- |
952 | 985 | Build Number Maven plugin - |
953 | 986 | http://www.mojohaus.org/buildnumber-maven-plugin/ |
@@ -1046,6 +1079,7 @@ Projects wishing to use pom-scijava as a parent project need to override the < |
1046 | 1079 | <identifier>${project.name}</identifier> |
1047 | 1080 | <jfxMainAppJarName>${project.name}.jar</jfxMainAppJarName> |
1048 | 1081 | <mainClass>${main-class}</mainClass> |
| 1082 | + <nativeReleaseVersion>${sanitizedVersion}</nativeReleaseVersion> |
1049 | 1083 | <verbose>true</verbose> |
1050 | 1084 | </configuration> |
1051 | 1085 | </plugin> |
@@ -1186,6 +1220,12 @@ Projects wishing to use pom-scijava as a parent project need to override the < |
1186 | 1220 | </configuration> |
1187 | 1221 | </plugin> |
1188 | 1222 |
|
| 1223 | + <!-- Generate a package-friendly version property. --> |
| 1224 | + <plugin> |
| 1225 | + <groupId>org.codehaus.mojo</groupId> |
| 1226 | + <artifactId>build-helper-maven-plugin</artifactId> |
| 1227 | + </plugin> |
| 1228 | + |
1189 | 1229 | <!-- Add Implementation-Build entry to JAR manifest. --> |
1190 | 1230 | <plugin> |
1191 | 1231 | <groupId>org.codehaus.mojo</groupId> |
|