This is an automated email from the ASF dual-hosted git repository. juanpablo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 3bce33ddd68feb044b3dd2aad0d4d84c3ea86e21 Author: Juan Pablo Santos RodrÃguez <juanpablo.san...@gmail.com> AuthorDate: Fri May 9 19:54:40 2025 +0200 Extract suitable jspwiki.woas.version property for portable build from project.version instead of hard coding it into build.xml --- jspwiki-portable/build.xml | 3 ++- jspwiki-portable/pom.xml | 26 ++++++++++++++++++++++---- pom.xml | 7 +++++++ 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/jspwiki-portable/build.xml b/jspwiki-portable/build.xml index 1d50df3f9..8775ed86e 100644 --- a/jspwiki-portable/build.xml +++ b/jspwiki-portable/build.xml @@ -26,7 +26,7 @@ <property environment="env"/> <!-- the build version if not overwritten by the caller --> - <property name="jspwiki.woas.version" value="2.12.0" /> + <property name="jspwiki.woas.version" value="${jspwiki.woas.version}" /> <!-- define the temporary build directory --> <property name="jspwiki.woas.target.dir" value="${basedir}/target" /> @@ -139,6 +139,7 @@ <!-- ############################################################## --> <target name="woas:create-windows-app" description="Create an windows application wrapper"> + <echo>jspwiki.woas.version = ${jspwiki.woas.version} ****************************************************</echo> <taskdef name="launch4j" classname="net.sf.launch4j.ant.Launch4jTask" diff --git a/jspwiki-portable/pom.xml b/jspwiki-portable/pom.xml index 1911a8a49..be226988f 100644 --- a/jspwiki-portable/pom.xml +++ b/jspwiki-portable/pom.xml @@ -49,6 +49,24 @@ </filesets> </configuration> </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <executions> + <execution> + <id>regex-property</id> + <goals> + <goal>regex-property</goal> + </goals> + <configuration> + <name>woas.version</name> + <regex>-SNAPSHOT</regex> + <value>${project.version}</value> + <failIfNoMatch>false</failIfNoMatch> + </configuration> + </execution> + </executions> + </plugin> <plugin> <artifactId>maven-assembly-plugin</artifactId> <executions> @@ -106,7 +124,7 @@ <phase>process-resources</phase> <configuration> <target> - <property name="jspwiki.woas.version" value="${project.version}" /> + <property name="jspwiki.woas.version" value="${woas.version}" /> <property name="jspwiki.tomcat.version" value="${tomcat.version}" /> <ant antfile="${basedir}/build.xml" target="woas:info" /> <ant antfile="${basedir}/build.xml" target="woas:copy-woas" /> @@ -121,7 +139,7 @@ <phase>prepare-package</phase> <configuration> <target> - <property name="jspwiki.woas.version" value="${project.version}" /> + <property name="jspwiki.woas.version" value="${woas.version}" /> <property name="jspwiki.tomcat.version" value="${tomcat.version}" /> <ant antfile="${basedir}/build.xml" target="woas:copy-tomcat" /> </target> @@ -135,7 +153,7 @@ <phase>prepare-package</phase> <configuration> <target> - <property name="jspwiki.woas.version" value="${project.version}" /> + <property name="jspwiki.woas.version" value="${woas.version}" /> <property name="jspwiki.tomcat.version" value="${tomcat.version}" /> <ant antfile="${basedir}/build.xml" target="woas:info" /> <ant antfile="${basedir}/build.xml" target="woas:copy-tomcat-launchers" /> @@ -311,7 +329,7 @@ <phase>package</phase> <configuration> <target> - <!-- <property name="jspwiki.woas.version" value="${project.version}" /> --> + <property name="jspwiki.woas.version" value="${woas.version}" /> <property name="jspwiki.tomcat.version" value="${tomcat.version}" /> <ant antfile="${basedir}/build.xml" target="woas:info" /> <ant antfile="${basedir}/build.xml" target="${jspwiki.native-launchers.macos.download}" /> diff --git a/pom.xml b/pom.xml index 8e245d39a..33c2589f7 100644 --- a/pom.xml +++ b/pom.xml @@ -103,6 +103,7 @@ <plugin.war.version>3.4.0</plugin.war.version> <plugin.inmemdb.version>1.4.3</plugin.inmemdb.version> <plugin.jspc.version>3.2.2</plugin.jspc.version> + <plugin.build-helper.version>3.6.0</plugin.build-helper.version> <plugin.checksum.version>1.11</plugin.checksum.version> <plugin.jslint.version>1.0.1</plugin.jslint.version> <plugin.cargo.version>1.10.15</plugin.cargo.version> @@ -763,6 +764,12 @@ </dependencies> </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>${plugin.build-helper.version}</version> + </plugin> + <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jslint-maven-plugin</artifactId>