[jboss-cvs] JBossAS SVN: r82578 - projects/aop/branches/Branch_2_0/aop/docs/examples/injboss.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Dec 31 20:06:36 EST 2008


Author: flavia.rainone at jboss.com
Date: 2008-12-31 20:06:36 -0500 (Wed, 31 Dec 2008)
New Revision: 82578

Modified:
   projects/aop/branches/Branch_2_0/aop/docs/examples/injboss/build.xml
Log:
[JBAOP-689] Fixed injboss build.xml script. Now, the appropriate servlet jar is used accordingly to the AS version.

Modified: projects/aop/branches/Branch_2_0/aop/docs/examples/injboss/build.xml
===================================================================
--- projects/aop/branches/Branch_2_0/aop/docs/examples/injboss/build.xml	2009-01-01 01:03:34 UTC (rev 82577)
+++ projects/aop/branches/Branch_2_0/aop/docs/examples/injboss/build.xml	2009-01-01 01:06:36 UTC (rev 82578)
@@ -61,8 +61,26 @@
       <property name="example.jar.name" value="aopexample.jar"/>
       <property name="example.jar" value="${lib.dir}/${example.jar.name}"/>
 
+      <property name="jboss.lib.dir" value="${jboss.dir}/lib"/>
+      <property name="lib.jboss-system" value="${jboss.lib.dir}/jboss-system.jar"/>
+      <available file="${lib.jboss-system}" property="lib.jboss-system.exists"/>
+      <fail unless="lib.jboss-system.exists" message="Modify 'jboss.home' in build.xml to be a valid root of a jboss installation"/>
+      <loadproperties>
+         <zipentry zipfile="${lib.jboss-system}" name="META-INF/MANIFEST.MF"/>
+         <!-- Add the prefix -->
+         <filterchain>
+            <linecontains>
+               <contains value="Version"/>
+            </linecontains>
+            <prefixlines prefix="AS-"/>
+         </filterchain>
+      </loadproperties>
+      <condition property="servlet-api" value="javax.servlet.jar" else="servlet-api.jar">
+            <matches pattern="4.0.*" string="${AS-Specification-Version}"/>
+      </condition>
+
       <path id="jboss.classpath">
-         <pathelement path="${jboss.dir}/server/default/lib/servlet-api.jar"/>
+         <pathelement path="${jboss.dir}/server/default/lib/${servlet-api}"/>
          <pathelement path="${jboss.dir}/server/default/lib/jboss-j2ee.jar"/>
       </path>
 




More information about the jboss-cvs-commits mailing list