简体   繁体   中英

Referring to a generated jar inside a Maven pom.xml

In my pom.xml file I have the maven-shade-plugin for generating an uber jar. This uber jar has the version of my app in it, such as app-1.0.0-SNAPSHOT.jar . Then, I use the launch4j-maven-plugin to wrap that into an exe file, but to achieve that I have a configuration that looks like this:

<configuration>
    <jar>target/app-1.0.0-SNAPSHOT.jar</jar>

Is there a way to use a variable or placeholder here and not to have to hard-code the filename of the jar?

This will be:

${project.build.directory}/${project.build.finalName}.jar

Please see:

Maven project.build.directory

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM