Just add the answer received by dogbane
In your .bat file, a packed jar file will be launched with a file name that reflects the current version of the application, for example.
java -Xms256m -Xmx350m -jar bin\yourApp-1.10.1-SNAPSHOT.jar
In each release, this file must be updated with a new application name. It can also be automated.
In your pom.xml file add this section:
<build> <resources> <resource> <filtering>true</filtering> <directory>${project.build.sourceDirectory}/../assembly/scripts</directory> <includes> <include>yourApp.bat</include> </includes> </resource> ... </resources> ... </build>
This means that you placed yourApp.bat in the folder:
src/main/assembly/scripts
The contents of yourApp.bat should look like this:
java -Xms256m -Xmx350m -jar bin\${project.build.finalName}.jar
Just run the Maven commands and enjoy.
source share