@@ -948,6 +948,39 @@ Projects wishing to use pom-scijava as a parent project need to override the <
948948 </configuration >
949949 </plugin >
950950
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+
951984 <!--
952985 Build Number Maven plugin -
953986 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 <
10461079 <identifier >${project.name} </identifier >
10471080 <jfxMainAppJarName >${project.name} .jar</jfxMainAppJarName >
10481081 <mainClass >${main-class} </mainClass >
1082+ <nativeReleaseVersion >${sanitizedVersion} </nativeReleaseVersion >
10491083 <verbose >true</verbose >
10501084 </configuration >
10511085 </plugin >
@@ -1186,6 +1220,12 @@ Projects wishing to use pom-scijava as a parent project need to override the <
11861220 </configuration >
11871221 </plugin >
11881222
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+
11891229 <!-- Add Implementation-Build entry to JAR manifest. -->
11901230 <plugin >
11911231 <groupId >org.codehaus.mojo</groupId >
0 commit comments