[jboss-cvs] JBossAS SVN: r108434 - in projects/jboss-jca/trunk/core: src/main/java/org/jboss/jca and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Oct 4 13:03:40 EDT 2010


Author: jesper.pedersen
Date: 2010-10-04 13:03:40 -0400 (Mon, 04 Oct 2010)
New Revision: 108434

Added:
   projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/Version.java.in
Modified:
   projects/jboss-jca/trunk/core/build.xml
Log:
[JBJCA-435] Add a Version class with basic information 

Modified: projects/jboss-jca/trunk/core/build.xml
===================================================================
--- projects/jboss-jca/trunk/core/build.xml	2010-10-04 16:51:13 UTC (rev 108433)
+++ projects/jboss-jca/trunk/core/build.xml	2010-10-04 17:03:40 UTC (rev 108434)
@@ -43,6 +43,23 @@
            optimize="${javac.optimize}">
       <compilerarg value="-Xlint"/>
     </javac> 
+
+    <copy file="src/main/java/org/jboss/jca/Version.java.in"
+          tofile="${build.core.dir}/impl/org/jboss/jca/Version.java">
+      <filterset>
+        <filter token="VERSION" value="${version}"/>
+      </filterset>
+    </copy>
+
+    <javac srcdir="${build.core.dir}/impl"
+           destdir="${build.core.dir}/impl"
+           classpathref="sjc.lib.path.id"
+           debug="${javac.debug}"
+           deprecation="${javac.deprecation}"
+           optimize="${javac.optimize}">
+      <compilerarg value="-Xlint"/>
+    </javac> 
+
   </target>
 
   <!-- ================================= 
@@ -91,6 +108,7 @@
         <attribute name="Implementation-Version" value="${major}.${minor}.${patch}.${type}"/>
         <attribute name="Implementation-Vendor" value="The IronJacamar project (http://www.jboss.org/ironjacamar)"/>
         <attribute name="Implementation-Vendor-Id" value="org.jboss"/>
+        <attribute name="Main-Class" value="org.jboss.jca.Version"/>
       </manifest>
     </jar>
   </target>

Added: projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/Version.java.in
===================================================================
--- projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/Version.java.in	                        (rev 0)
+++ projects/jboss-jca/trunk/core/src/main/java/org/jboss/jca/Version.java.in	2010-10-04 17:03:40 UTC (rev 108434)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.jca;
+
+/**
+ * The version class
+ * @author Jesper Pedersen <jesper.pedersen at jboss.org>
+ */
+public class Version
+{
+   /** The vendor */
+   public static final String VENDOR = "JBoss"; 
+   
+   /** The product */
+   public static final String PRODUCT = "IronJacamar"; 
+   
+   /** The version */
+   public static final String VERSION = "@VERSION@";
+   
+   /** Full version */
+   public static final String FULL_VERSION = VENDOR + " " + PRODUCT + " " + VERSION;
+   
+   /**
+    * Constructor
+    */
+   private Version()
+   {
+   }
+
+   /**
+    * Main
+    * @param args The arguments
+    */
+   public static void main(String[] args)
+   {
+      System.out.println(PRODUCT + " " + VERSION);
+   }
+}



More information about the jboss-cvs-commits mailing list