I have a regular Maven project. I would like to set certain properties/variables in the JAR when building using mvn package
, so that certain information can be picked up from individual JAR files.
For example, I could use:
mvn package -DbuildId=200
... and I would like to see this information stored (buildId = 200
) stored in some file generated by maven. I know for a fact that certain properties are stored by Maven at build-time (for example, the files in META-INF/maven
).
Is this possible without modification of the POM file, and without adding extra plugins? If so, what arguments do I need to pass?