[jboss-cvs] JBossAS SVN: r110781 - branches/JBPAPP_5_1/build.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 25 09:34:13 EST 2011


Author: fnasser at redhat.com
Date: 2011-02-25 09:34:13 -0500 (Fri, 25 Feb 2011)
New Revision: 110781

Modified:
   branches/JBPAPP_5_1/build/build.xml
Log:
Add slightly modified verson of this to the main build : JBPAPP-5989 - Implemented unsign ant task - by zroubali

Modified: branches/JBPAPP_5_1/build/build.xml
===================================================================
--- branches/JBPAPP_5_1/build/build.xml	2011-02-25 13:28:15 UTC (rev 110780)
+++ branches/JBPAPP_5_1/build/build.xml	2011-02-25 14:34:13 UTC (rev 110781)
@@ -766,6 +766,8 @@
     <antcall target="apply_auth_patch"/>
     <antcall target="skipped_auth_patch"/>
     <antcall target="apply_patch"/>
+    <antcall target="skipped_unsign"/>
+    <antcall target="unsign"/>
   </target>
 
   <target name="apply_auth_patch" unless="build.unsecure">
@@ -1547,4 +1549,43 @@
     <copy file="${moduleDest.output}/lib/run.jar" todir="${install.bin}"/>
    </target>
 
+  <target name="skipped_unsign" unless="build.signed">
+	<echo> "The 'build.signed' property was not specified (it doesn't matter what value was given), unsigning all JARs"</echo>
+  </target>
+
+   <!-- Unsigns all jars (rars, wars, ears) in JBoss AS located in ${install.root},
+	original JBoss AS with signed jars (rars, wars, ears) is moved to ${install.root}.signed. -->
+   <target name="unsign" description="Unsigns all jars in current JBoss AS." if="build.signed">
+     <taskdef resource="net/sf/antcontrib/antlib.xml"
+       classpath="${project.tools}/lib/ant-contrib-1.0b3.jar"/>  <!-- ant-contrib jar location -->
+     <property name="sf" value="JBOSSCOD.SF"/>
+     <property name="rsa" value="JBOSSCOD.RSA"/>
+
+     <copy toDir="${install.root}.signed">
+       <fileSet dir="${install.root}"/>
+     </copy>
+
+     <for param="file">
+       <path>
+	 <fileset dir="${install.root}">
+	   <include name="**/*.jar"/>
+	   <include name="**/*.rar"/>
+	   <include name="**/*.war"/>
+	   <include name="**/*.ear"/>
+	 </fileset>
+       </path>
+       <sequential>
+	   <jar destfile="@{file}-unsigned">
+	      <zipfileset src="@{file}">
+		<exclude name="**/*${sf}"/>
+		<exclude name="**/*${rsa}"/>
+	      </zipfileset>
+	    </jar>
+	  <delete file="@{file}"/>
+	  <move file="@{file}-unsigned" tofile="@{file}"/> 
+       </sequential>
+     </for>
+     
+   </target>
+
 </project>



More information about the jboss-cvs-commits mailing list