For obvious reasons, if would be nice if the -version option on my
project automatically reported the version I'd set in the pom.xml rather
than my trying to synchronize the two manually.
The best approaches I've found so far are in
https://stackoverflow.com/questions/2712970/get-maven-artifact-version-at-runtime
... but there's a note that at least one of them doesn't work in all
classloaders, or in openjdk.
I'm willing to have the pom write this into a file that the Java code
would query, if that's what it takes to have a portable solution, but
I'm not sure what the best way to express that would be.
There must be an established Best Practices solution for this, right?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org