I am currently trying to deploy a javafx native bundle. While this basically works fine it won´t deploy to any location given to <nativeOutputDir>
by a contructed property using build-helper-maven-plugin and its regex-property goal.
Here´s my pom:
<build>
<plugins>
<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>replaced.deploydir</name>
<value>${project.version}</value>
<regex>.+SNAPSHOT</regex>
<replacement>C:\\\\temp\\\\snapDir</replacement>
<failIfNoMatch>true</failIfNoMatch>
<failOnError>true</failOnError>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.zenjava</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<configuration>
<mainClass>foo.bar.StartApp</mainClass>
<nativeOutputDir>${replaced.deployDir}</nativeOutputDir>
<nativeReleaseVersion>1.1.0</nativeReleaseVersion>
<updateExistingJar>true</updateExistingJar>
<additionalAppResources>${basedir}/target/extra-resources</additionalAppResources>
<appName>InstructionGen</appName>
</configuration>
</plugin>
</plugins>
</build>
Now when i pass a property just by using mavens property-tag the nativeInstaller will be deployed to the correct location.
While this might be correlated to [question]: (Maven build-helper-maven-plugin regex unable to use property as dependency.version).
That question does not support an answer in my opinion.
The phase in which the replacement takes place is "validate", whereas the phase in which the javafx-maven-plugin builds the bundle is "package", so order should be correct.
I used the antrun-plugin for tests to see if the property is created at all, and it is.
Interesting fact: When I add something after ${replaced.deployDir}
in <nativeOutputDir>
like <nativeOutputDir>${replaced.deployDir}\\test</nativeOutputDir>
it deploys to projectname\target\${replaced.deployDir}\test
creating the non-parsed ${replaced.deployDir}
folder.
Any help is appreciated.