I am having problems building a maven project. I have a requirement to produce deterministic jar files, which must be binary-consistent across different builds and vers
In case you don't have a plugin to create and attach main artifact for you, there is a more generic solution with Groovy Maven plugin:
org.codehaus.gmaven
groovy-maven-plugin
2.1
set-main-artifact
package
execute
project.artifact.setFile(new File(project.build.directory, project.build.finalName + ".zip"))
Inspired by post https://stackoverflow.com/a/31513690/2053580 many thanks to https://stackoverflow.com/users/1314907/lukasz-guminski