Hi - Is this available as a Maven2 plugin?
Thanks, Rk x77309 -----Original Message----- From: Torsten Curdt [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 11, 2005 3:22 AM To: Maven Users List Subject: adding subversion revision to manifest I've come up with a simple maven plugin that adds the subversion revision to the manifest. So with public static Map getJarRevisions() throws IOException { final String[] jars = System.getProperty ("java.class.path").split( System.getProperty("path.separator")); final Map revisions = new HashMap(jars.length); for (int i = 0; i < jars.length; i++) { final JarFile jar = new JarFile(jars[i]); final Manifest manifest = jar.getManifest(); final String revision = (String) manifest.getMainAttributes().getValue("Revision"); revisions.put(jars[i], revision); } return revisions; } You know *exactly* what jars are in your path. Only add it to your maven.xml like this: <postGoal name="jar:jar"> <attainGoal name="revision:add"/> </postGoal> It is currently available at: http://people.apache.org/~tcurdt/maven-revision-plugin.tgz It's for maven1 but just wraps a simple class so a version for maven2 should be pretty straight forward. If people think this is useful I am sure we can improve it and put it somewhere properly. cheers -- Torsten --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]