You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by na...@apache.org on 2010/05/29 10:46:06 UTC

svn commit: r949356 - in /tuscany/sca-java-1.x/trunk/tutorials/travelsample: antdefs.xml binaries/src/main/resources/build-defs.xml

Author: nash
Date: Sat May 29 08:46:06 2010
New Revision: 949356

URL: http://svn.apache.org/viewvc?rev=949356&view=rev
Log:
Fix OpenEJB classpath problems on JDK 5 (TUSCANY-3576)

Modified:
    tuscany/sca-java-1.x/trunk/tutorials/travelsample/antdefs.xml
    tuscany/sca-java-1.x/trunk/tutorials/travelsample/binaries/src/main/resources/build-defs.xml

Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/antdefs.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/antdefs.xml?rev=949356&r1=949355&r2=949356&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/antdefs.xml (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/antdefs.xml Sat May 29 08:46:06 2010
@@ -104,7 +104,7 @@
    This file also defines the following targets for use with the "depends"
    attribute on targets in the build.xml file:
      "locate-openejb" Locates the OpenEJB dependencies needed by some
-       modules and sets the "openejb-files" files resource to bring in
+       modules and creates a path with id "openejb-path" to bring in
        these dependencies.
      "locate-jaxws" Locates the JAX-WS dependencies needed by some modules
        when running on JDK 5, and creates a path with id "jaxws-path"
@@ -652,9 +652,9 @@
         </condition>
     </target>
 
-    <!-- If running from a maven build, the OpenEJB jars are in binaries/target/openejb -->
+    <!-- If running from a complete build, the OpenEJB jars are in binaries/target/openejb -->
     <target name="#binaries-openejb" unless="#openejb-dir">
-        <condition property="#openejb-reldir" value="../../binaries/target/openejb">
+        <condition property="#openejb-dir" value="../../binaries/target/openejb">
             <available file="../../binaries/target/openejb" type="dir"/>
         </condition>
     </target>
@@ -663,11 +663,22 @@
     <target name="#tuscany-openejb" if="#openejb-dir">
         <path id="openejb-path">
             <fileset dir="${#openejb-dir}"/>
-            <fileset dir="${env.TUSCANY_HOME}/lib"/>
+            <!-- The openejb directory doesn't include all dependencies, so bring these in from Tuscany -->
+            <fileset dir="${env.TUSCANY_HOME}/lib">
+                <!-- exclude some jars to prevent them being loaded by OpenEJB -->
+                <exclude name="tuscany-sca-manifest.jar"/>
+                <exclude name="ode-*.jar"/>
+                <exclude name="jaxb-xjc-*.jar"/>
+                <exclude name="jython-*.jar"/>
+                <exclude name="activemq-all-*.jar"/>
+                <exclude name="js-*.jar"/>
+                <exclude name="org.apache.felix.main-*.jar"/>
+                <exclude name="saxon-*.jar"/>
+            </fileset>
         </path>
     </target>
 
-    <!-- Could be running from an ant build of a svn checkout, so try the OPENEJB_HOME environment variable -->
+    <!-- If OpenEJB jars not found in lib or binaries, try the OPENEJB_HOME environment variable -->
     <target name="#env-openejb" unless="#openejb-dir">
         <condition property="#openejb-home" value="${env.OPENEJB_HOME}/lib">
             <available file="${env.OPENEJB_HOME}/lib" type="dir"/>

Modified: tuscany/sca-java-1.x/trunk/tutorials/travelsample/binaries/src/main/resources/build-defs.xml
URL: http://svn.apache.org/viewvc/tuscany/sca-java-1.x/trunk/tutorials/travelsample/binaries/src/main/resources/build-defs.xml?rev=949356&r1=949355&r2=949356&view=diff
==============================================================================
--- tuscany/sca-java-1.x/trunk/tutorials/travelsample/binaries/src/main/resources/build-defs.xml (original)
+++ tuscany/sca-java-1.x/trunk/tutorials/travelsample/binaries/src/main/resources/build-defs.xml Sat May 29 08:46:06 2010
@@ -30,10 +30,9 @@
     </path>
 
     <path id="scatours.tuscany-openejb">
+        <fileset dir="${env.TUSCANY_HOME}/lib"/>
         <!-- We need the following if the jars were built using ant and have no manifest classpath -->
         <fileset dir="../openejb"/>
-        <!-- The openejb directory doesn't include all dependencies, so bring these in from Tuscany -->
-        <fileset dir="${env.TUSCANY_HOME}/lib"/>
     </path>
 
     <path id="scatours.openejb-runtime">