From: <bsc...@us...> - 2009-02-16 19:59:49
|
Revision: 4205 http://unicore.svn.sourceforge.net/unicore/?rev=4205&view=rev Author: bschuller Date: 2009-02-16 19:59:39 +0000 (Mon, 16 Feb 2009) Log Message: ----------- add version info to jar file and print it on startup Modified Paths: -------------- gateway/trunk/pom.xml gateway/trunk/src/main/java/eu/unicore/gateway/Gateway.java Modified: gateway/trunk/pom.xml =================================================================== --- gateway/trunk/pom.xml 2009-02-16 19:47:15 UTC (rev 4204) +++ gateway/trunk/pom.xml 2009-02-16 19:59:39 UTC (rev 4205) @@ -196,6 +196,25 @@ </tagBase> </configuration> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>2.2</version> + <configuration> + <archive> + <manifestEntries> + <Specification-Title>${name}</Specification-Title> + <Specification-Vendor>UNICORE</Specification-Vendor> + <Specification-Version>${version}</Specification-Version> + <Implementation-Title>${name}</Implementation-Title> + <Implementation-Vendor-Id>unicore.eu</Implementation-Vendor-Id> + <Implementation-Vendor>UNICORE</Implementation-Vendor> + <Implementation-Version>${version}</Implementation-Version> + </manifestEntries> + </archive> + </configuration> + </plugin> + </plugins> </build> <reporting> Modified: gateway/trunk/src/main/java/eu/unicore/gateway/Gateway.java =================================================================== --- gateway/trunk/src/main/java/eu/unicore/gateway/Gateway.java 2009-02-16 19:47:15 UTC (rev 4204) +++ gateway/trunk/src/main/java/eu/unicore/gateway/Gateway.java 2009-02-16 19:59:39 UTC (rev 4205) @@ -53,8 +53,6 @@ */ public class Gateway { - public static final String VERSION="1.2.0"; - private static final Logger log = Logger.getLogger("unicore.gateway."+Gateway.class.getSimpleName()); private static SiteOrganiser organiser; @@ -176,7 +174,9 @@ public static void main(String[] args) throws Exception { - String message="UNICORE Gateway "+VERSION+" starting."; + String version=Gateway.class.getPackage().getImplementationVersion(); + if(version==null)version="(SNAPSHOT version)"; + String message="UNICORE Gateway "+version+" starting."; log.info(message); System.out.println(message); gatewayProperties=new GatewayProperties(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |