aslom       2003/03/21 09:41:14

  Modified:    java     build.xml
  Log:
  updated build.xml so it can work with ANT directly (tested with ANT 1.5.2)
  
  Revision  Changes    Path
  1.37      +92 -14    xml-axis-wsif/java/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/build.xml,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- build.xml 20 Mar 2003 12:50:32 -0000      1.36
  +++ build.xml 21 Mar 2003 17:41:14 -0000      1.37
  @@ -103,6 +103,23 @@
     </target>
   
     <!-- =================================================================== -->
  +  <!-- Project classpath to use                                            -->
  +  <!-- =================================================================== -->
  +
  +<path id="project.classpath">
  +   <!--pathelement location="${build.tests}"/>
  +   <pathelement path="${build.samples}"/>
  +   <pathelement path="${build.dest}"/>
  +   <pathelement path="."/-->
  +   <fileset dir=".">
  +     <include name="lib/*.jar"/>
  +   </fileset>
  +   <!-- this build file will utilize the classpath set in the users environment. -->
  +  <pathelement path="${java.class.path}"/>
  +</path> 
  +
  +
  +  <!-- =================================================================== -->
     <!-- Prepares the build directory                                        -->
     <!-- =================================================================== -->
     <target name="prepare" depends="init">
  @@ -119,16 +136,43 @@
                 targetfile="${jar}">
         <srcfiles dir="${build.dir}" includes="**/*.html"/>
       </uptodate>
  -    <available property="soaprmi.present" classname="soaprmi.Remote" />
  -    <available property="jms.present" classname="javax.jms.Message" />
  -    <available property="ejb.present" classname="javax.ejb.EJBHome" />
  -    <available property="apachesoap.present" classname="org.apache.soap.Envelope" />
  -    <available property="apacheaxis.present" 
classname="org.apache.axis.message.SOAPEnvelope" />
  -    <available property="j2c.present" classname="javax.resource.Referenceable" />
  -    <available property="junit.present" classname="junit.framework.TestCase" />
  -    <available property="forrest.present" file="${forrest.home}" type="dir" />
  +
  +    <available property="soaprmi.present" classname="soaprmi.Remote" 
classpathref="project.classpath"  />
  +    <available property="jms.present" classname="javax.jms.Message" 
classpathref="project.classpath"   />
  +    <available property="ejb.present" classname="javax.ejb.EJBHome" 
classpathref="project.classpath"   />
  +    <available property="apachesoap.present" classname="org.apache.soap.Envelope" 
classpathref="project.classpath"   />
  +    <available property="apacheaxis.present" 
classname="org.apache.axis.message.SOAPEnvelope" classpathref="project.classpath"   />
  +    <available property="j2c.present" classname="javax.resource.Referenceable" 
classpathref="project.classpath"   />
  +    <available property="junit.present" classname="junit.framework.TestCase" 
classpathref="project.classpath"   />
  +    <available property="forrest.present" file="${forrest.home}" type="dir" 
classpathref="project.classpath"   />
  +
  +    <available property="wsdl.present" classname="javax.wsdl.WSDLException" 
classpathref="project.classpath"   />
  +    <fail unless="wsdl.present">Warning: WSDL4J is required 
  +    Put WSDL4J JAR in lib directory and for more details see lib/README.html</fail>
  +
  +    <available property="qname.present" classname="javax.xml.namespace.QName" 
classpathref="project.classpath"  />
  +    <fail unless="qname.present">Warning: QName class is required 
  +    JAR file with QName class can be obtained from WSDL4J and should be put in lib 
directory.
  +    For more details see lib/README.html</fail>
  +
  +    <available property="activation.present" 
classname="javax.activation.DataHandler" classpathref="project.classpath"  />
  +    <fail unless="activation.present">Warning: Java Acticvation is required 
  +    Put J2EE or Java Activation JAR in lib directory and for more details see 
lib/README.html</fail>
  +
  +    <available property="commons.logging.present" 
classname="org.apache.commons.logging.Log" classpathref="project.classpath"  />
  +    <fail unless="commons.logging.present">Warning: Commons Logging is required 
  +    Put Commons Logging JAR in lib directory and for more details see 
lib/README.html</fail>
  +
  +    <available property="axis.present" classname="org.apache.axis.utils.CLUtil" 
classpathref="project.classpath"  />
  +    <fail unless="commons.logging.present">Warning: AXIS is required 
  +    Put AXIS JAR in lib directory and for more details see lib/README.html</fail>
  +
  +
     </target>
   
  +  <!--target name="require_activation" unless="activation_present" 
depends="prepare">
  +  </target-->
  +
     <target name="checkSoapRMI" unless="soaprmi.present">
       <echo message="Warning: SoapRMI dependencies were not resolved (see 
lib/README.html on how to required jar files)."/>
     </target>
  @@ -230,6 +274,7 @@
     <target name="dynamic" depends="checkDependencies">
       <mkdir dir="${dynamic.dest}"/>
       <javac srcdir="${src.dir}" destdir="${dynamic.dest}" debug="${debug}">
  +      <classpath refid="project.classpath"/>
         <patternset refid="dynamic.source.files"/>
       </javac>
   
  @@ -251,6 +296,7 @@
       <mkdir dir="${dynamic.dest}"/>
       <javac srcdir="${src.dir}" destdir="${dynamic.dest}" debug="${debug}">
         <patternset refid="compiler.source.files"/>
  +      <classpath refid="project.classpath"/>      
       </javac>
   
     </target>
  @@ -278,6 +324,7 @@
       <javac srcdir="${j2c.src}" destdir="${j2c.dest}" classpath="${dynamic.dest}">
         <include name="**/jca/**/*.java"/>
         <patternset refid="j2c.source.files"/>
  +      <classpath refid="project.classpath"/>
       </javac>
   
       <jar jarfile="${j2c.jar}" basedir="${j2c.dest}" update="true" />
  @@ -310,10 +357,34 @@
     <!-- Compiles the samples                                                -->
     <!-- =================================================================== -->
     <target name="samples" depends="dynamic,link">
  +
  +    <fail unless="ejb.present">Warning: EJB is required to compile samples
  +      Put J2EE JAR in lib directory and for more details see lib/README.html</fail>
  +
  +    <fail unless="jms.present">Warning: JMS is required to compile samples
  +      Put JMS or J2EE JAR in lib directory and for more details see 
lib/README.html</fail>
  +
  +    <available property="jaxrpc.present" 
classname="javax.xml.rpc.encoding.Deserializer" 
  +             classpathref="project.classpath"/>
  +    <fail unless="jaxrpc.present">Warning: JAXRPC is required to compile samples
  +      Put JAXRPC JAR in lib directory and for more details see 
lib/README.html</fail>
  +
  +     <path id="samples.classpath">
  +       <pathelement path="${dynamic.dest}"/>
  +       <pathelement path="${build.samples}"/>
  +       <path refid="project.classpath"/>
  +    </path>
  +
  +    <available property="apachesoap_provider.present" 
  +       
classname="org.apache.wsif.providers.soap.apachesoap.WSIFDynamicProvider_ApacheSOAP" 
  +       classpathref="samples.classpath"/>
  +    <fail unless="apachesoap_provider.present">Warning: ApacheSOAP provider is 
required to compile samples
  +      Put ApacheSOAP JAR in lib directory and recompile project (for more details 
see lib/README.html)</fail>
  +
       <mkdir dir="${build.samples}"/>
  -    <javac srcdir="samples" destdir="${build.samples}" 
  -           classpath="${dynamic.dest}" debug="${debug}">
  +    <javac srcdir="samples" destdir="${build.samples}" debug="${debug}">
         <patternset refid="samples.source.files"/>
  +      <classpath refid="samples.classpath"/>
       </javac>
   
       <copy todir="${build.samples}">
  @@ -327,10 +398,17 @@
     <!-- Compiles the j2c samples                                            -->
     <!-- =================================================================== -->
     <target name="samples_j2c" if="j2c.present">
  -     <javac srcdir="${build.samples}/jca/ra" destdir="${build.samples}/jca/ra"
  -            classpath="${dynamic.dest}:${j2c.jar}" debug="${debug}"/>
  -     <javac srcdir="${build.samples}/jca/customer" 
destdir="${build.samples}/jca/customer"
  -            classpath="${dynamic.dest}:${j2c.jar}:${build.samples}/jca/ra" 
debug="${debug}"/>
  +     <javac srcdir="${build.samples}/jca/ra" destdir="${build.samples}/jca/ra" 
debug="${debug}">
  +         <classpath path="${dynamic.dest}"/>
  +         <classpath path="${j2c.jar}"/>
  +         <classpath refid="project.classpath"/>
  +     </javac>
  +     <javac srcdir="${build.samples}/jca/customer" 
destdir="${build.samples}/jca/customer" debug="${debug}">
  +         <classpath path="${dynamic.dest}"/>
  +         <classpath path="${j2c.jar}"/>
  +         <classpath path="${build.samples}/jca/ra"/>
  +         <classpath refid="project.classpath"/>
  +     </javac>
        <jar jarfile="${j2c.sample.jar}" basedir="${build.samples}/jca/ra" 
update="true" excludes="**/j2c_plugin.xml,**/ra.xml"/>
        <copy file="${j2c.sample.jar}" todir="${build.samples}/jca/ra"/>
        <delete file="${j2c.sample.jar}"/>
  
  
  

Reply via email to