I would like to escape a property in pom.xml. Not in ressources, I know it is possible with a filter. For example I try to use launch4j plugin like this :
<plugin>
<groupId>org.bluestemsoftware.open.maven.plugin</groupId>
<artifactId>launch4j-plugin</artifactId>
<executions>
<execution>
<id>l4j-cli</id>
<phase>install</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<headerType>console</headerType>
<outfile>../out.exe</outfile>
<dontWrapJar>true</dontWrapJar>
<jar>./../out.jar</jar>
<icon>../icon.ico</icon>
<chdir>.</chdir>
<customProcName>true</customProcName>
<downloadUrl>http://www.oracle.com/technetwork/java/javase/downloads/index.html</downloadUrl>
<classPath>
<mainClass>com.stack.Main</mainClass>
<addDependencies>true</addDependencies>
<jarLocation>./lib</jarLocation>
</classPath>
<jre>
<opts>
<opt>-DconfigBasePath=${ALLUSERSPROFILE}/dir</opt>
</opts>
</jre>
</configuration>
</execution>
</executions>
</plugin>
And ${ALLUSERSPROFILE} must not be interpreted by maven but by the program generate by launch4j. I try :
\${ALLUSERSPROFILE}
\\${ALLUSERSPROFILE}
$${ALLUSERSPROFILE}
and
<properties>
<dollar>$</dollar>
</properties>
${dollar}{ALLUSERSPROFILE}
but nothing work.
$$
worked for me with ${surefire.forkNumber}
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With