On Wednesday 24 September 2008 18:42:27 mateamargo wrote: > I have setted the version to 1.0-SNAPSHOT, but I need to know what's the > current value. Is there a way to know that using any Maven API? or maybe > generating a file after compiling? > > Thanks.
What you can do, is to perform resource filtering on a text file you package into the jar, and then read this when querrying for the version. This is what we do for a number of our software, and it works like a charm. (Check [1] if you are unsure about what i mean) If you want to include buildnumber, i think there is a build number generating maven plugin you can use. I think i have seen something like that earlier. Magne [1] - http://maven.apache.org/plugins/maven-resources-plugin/ -- Magne Nordtveit <[EMAIL PROTECTED]> Systems Engineer Offshore Simulator Centre AS http://www.offsimcentre.no
signature.asc
Description: This is a digitally signed message part.