[jboss-cvs] JBossAS SVN: r110762 - branches/JBPAPP_5_1/testsuite.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Feb 24 09:38:20 EST 2011


Author: jcosta at redhat.com
Date: 2011-02-24 09:38:20 -0500 (Thu, 24 Feb 2011)
New Revision: 110762

Modified:
   branches/JBPAPP_5_1/testsuite/build.xml
Log:
JBPAPP-5989 - Implemented unsign ant task - by zroubali

Modified: branches/JBPAPP_5_1/testsuite/build.xml
===================================================================
--- branches/JBPAPP_5_1/testsuite/build.xml	2011-02-24 14:05:16 UTC (rev 110761)
+++ branches/JBPAPP_5_1/testsuite/build.xml	2011-02-24 14:38:20 UTC (rev 110762)
@@ -1048,7 +1048,44 @@
          Use ant -projecthelp to list all documented targets.
       </echo>
    </target>
+   
+   <!-- Unsigns all jars (rars, wars, ears) in JBoss AS located in ${jboss.dist},
+	original JBoss AS with signed jars (rars, wars, ears) is moved to ${jboss.dist}.signed. -->
+   <target name="unsign" description="Unsigns all jars in current JBoss AS.">
+     <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="${jboss.dist}.signed">
+       <fileSet dir="${jboss.dist}"/>
+     </copy>
+
+     <for param="file">
+       <path>
+	 <fileset dir="${jboss.dist}">
+	   <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>
+   
+
    <!-- ================================================================== -->
    <!-- Tests                                                              -->
    <!-- ================================================================== -->



More information about the jboss-cvs-commits mailing list