Generate a Version.java file in Maven
I don’t think this is the good way to solve this kind of issue. A better way is to put the version information in a properties file that will be read by your Java program: Your properties file will contain the following line: myapp.version=${project.version} Then, in your pom.xml, indicate that the file will be filtered … Read more