Skip to main content

Source code file content

Revision: 64298 (of 64298)

setting clean revision
» Project Revision History

» Checkout URL

svn / tags / jaxr-ri-1.0.7 / build.xml

Size: 8372 bytes, 1 line
<!--
 The contents of this file are subject to the terms 
 of the Common Development and Distribution License 
 (the License).  You may not use this file except in
 compliance with the License.
 
 You can obtain a copy of the license at 
 https://glassfish.dev.java.net/public/CDDLv1.0.html or
 glassfish/bootstrap/legal/CDDLv1.0.txt.
 See the License for the specific language governing 
 permissions and limitations under the License.
 
 When distributing Covered Code, include this CDDL 
 Header Notice in each file and include the License file 
 at glassfish/bootstrap/legal/CDDLv1.0.txt.  
 If applicable, add the following below the CDDL Header, 
 with the fields enclosed by brackets [] replaced by
 you own identifying information: 
 "Portions Copyrighted [year] [name of copyright owner]"
 
 Copyright 2007 Sun Microsystems, Inc. All rights reserved.
-->

 
<project name="The JAXR Project" default="main" basedir=".">

   <property name="wspack.home" value="${basedir}/build"/>
   
   <target name="init">
      <property file="${basedir}/build.properties"/> 
      <property name="jaxr.build" value="${basedir}/build"/>
      <property name="jaxr.lib" value="${basedir}/lib"/>
      <property name="jaxr.version" value="1.0.7"/>

      <!-- Jar files for classpath -->
      <property name="jaxr.cp" value="${basedir}/lib/jaxr-api.jar"/>

      <!-- The javadoc properties -->
      <property name="src.dir" value="${basedir}/src/java" />
      <property name="src.test.dir" value="${basedir}/src/test/java" />
      <property name="dist.javadoc.dir" value="${basedir}/javadoc"/>

      <property name="jaxr.build.classpath"
                value="${xerces.cp}:${jaxr.cp}:${fastinfoset.cp}:${mail.cp}:${activation.cp}:${jaxb-api.cp}:${jaxb.cp}:${jaxb-libs.cp}:${namespace.cp}:${xsdlib.cp}:${relax.cp}:${jnet.cp}:${jaas.cp}:${jaxm.cp}:${dom.cp}:${sax.cp}:${jsr173.cp}:${logging.cp}:${jaxr.build}/classes"/>

      <!-- Fix JAXR_HOME property in deployment descriptors -->
       <filter token="jaxr.home" value="${basedir}" />
   </target>

   <target name="prepare" depends="init">
      <mkdir dir="${jaxr.build}"/>
      <mkdir dir="${jaxr.build}/bin"/>
      <mkdir dir="${jaxr.build}/docs"/>
      <mkdir dir="${jaxr.build}/docs/api"/>
      <mkdir dir="${jaxr.build}/docs/taxonomies"/>
      <mkdir dir="${jaxr.build}/lib"/>
      <mkdir dir="${jaxr.build}/classes"/>
      <mkdir dir="${jaxr.build}/classes/com/sun/xml/registry/uddi/bindings_v2_2"/>
      <mkdir dir="${jaxr.build}/classes/com/sun/xml/registry/common/tools/bindings"/>

      <!--Copy lib to build/lib -->
      <copy todir="${jaxr.build}/lib">
         <fileset dir="${jaxr.lib}"/>
      </copy>

      <!-- copy xml files -->
      <copy todir="${jaxr.build}/classes/com/sun/xml/registry/common/tools/resources">
         <fileset dir="${basedir}/src/java/com/sun/xml/registry/common/tools/resources"/>
      </copy>

      <!-- copy LocalStrings.properties files -->
      <copy file="${basedir}/src/java/com/sun/xml/registry/uddi/LocalStrings.properties"
          todir="${jaxr.build}/classes/com/sun/xml/registry/uddi"/>
      <copy file="${basedir}/src/java/com/sun/xml/registry/common/LocalStrings.properties"
          todir="${jaxr.build}/classes/com/sun/xml/registry/common"/>

      <!-- copy docs -->
      <copy todir="${jaxr.build}/docs">
         <fileset dir="${basedir}/docs"
            includes="*.html,*.pdf"/>
      </copy>

      <!-- Copy query.properties to build directory. This file is used by the test classes -->
      <copy file="${src.test.dir}/com/sun/xml/registry/query.properties"
         todir="${jaxr.build}/classes/com/sun/xml/registry"/>

   </target>

   <target name="copy.jaxr-api">
      <exec executable="mvn" failonerror="true" >
        <arg line="dependency:copy" />
      </exec>
   </target>

   <target name="dist" depends="compile, samples">
      <delete dir="${jaxr.build}/classes"/>
      <unjar src="${basedir}/lib/jaxr-apidoc.jar"
         dest="${jaxr.build}/docs/api"/>
      <copy todir="${jaxr.build}/docs/taxonomies">
         <fileset dir="${basedir}/docs/taxonomies"/>
      </copy>
   </target>

   <target name="compile" depends="prepare">

      <!-- Compile all the sources -->
      <javac srcdir="src"
             destdir="${jaxr.build}/classes"
         debug="no"
             deprecation="no">
         <classpath path="${jaxr.build.classpath}"/>

         <exclude name="**/SCCS/**"/>
         <exclude name="javax/xml/registry/ebxml/**"/>
      </javac>
        <!-- Make the RI jar -->
      <jar jarfile="${jaxr.build}/lib/jaxr-impl.jar"
           manifest="${basedir}/misc/manifest"
         basedir="${jaxr.build}/classes">
      </jar>
      <copy file="${jaxr.build}/lib/jaxr-impl.jar"
         todir="${basedir}/lib"/>
   </target>

   <!-- build the sample programs -->
   <target name="samples" depends="compile">
      <javac srcdir="samples"
         includes="**/*.java"
         classpath="${jaxr.build.classpath}"/>

      <!-- jar and remove browser class files-->
      <jar jarfile="samples/jaxr-browser/jaxr-browser.jar"
         basedir="samples/jaxr-browser"
         includes="**/*.class,**/BrowserStrings.properties"/>
      <delete>
         <fileset dir="samples/jaxr-browser"
            includes="**/*.class"/>
      </delete>

      <!-- copy everything over and cleanup source directory -->
      <copy todir="${jaxr.build}/samples">
         <fileset dir="samples"/>
      </copy>
      <delete dir="${jaxr.build}/samples/jaxr-browser/help"/> <!-- remove later? -->
      <delete>
         <fileset dir="samples"
            includes="**/*.class,**/*.jar"/>
      </delete>

      <!-- copy browser.bat and browser.sh to build/bin -->
      <copy file="${basedir}/misc/jaxr-browser.sh"
         todir="${jaxr.build}/bin"/>
      <copy file="${basedir}/misc/jaxr-browser.bat"
         todir="${jaxr.build}/bin"/>

      <!-- make shell scripts executable -->
      <chmod file="${jaxr.build}/bin/jaxr-browser.sh" perm="+x"/>
      <chmod file="${jaxr.build}/samples/jaxr-publish/BLCM.sh" perm="+x"/>
      <chmod file="${jaxr.build}/samples/jaxr-query/BQM.sh" perm="+x"/>

   </target>

   <target name="main" depends="compile"/>

   <target name="clean">
      <delete dir="build"/>
      <delete dir="javadoc"/>
   </target>
   
   <!-- The test target is not currently functional. There is a ClassNotFoundException: 
     com.sun.xml.internal.bind.v2.ContextFactory . You can run the test in a terminal:
     java -cp build/lib/jaxr-impl.jar com.sun.xml.registry.BusinessQueryTest

     You should get this result:
     Successfully queried the registry for organization matching the name pattern: "%USA%"
     Results found: 0
   -->
   <target name="test" depends="compile">
      <java classname="com.sun.xml.registry.BusinessQueryTest" taskname="java1.6">
         <classpath>
           <path path="${java.class.path}:${jaxr.build.classpath}"/>
           <pathelement location="${java.home}/jre/lib/rt.jar"/>
           <pathelement location="${jaxr.build}/lib/jaxr-impl.jar"/>
         </classpath>
       </java>
   </target>

   <!--
   ======================
   JAVADOC SECTION
   ======================
   -->
   <target name="javadoc-build" depends="init">
       <mkdir dir="${dist.javadoc.dir}"/>
       <javadoc destdir="${dist.javadoc.dir}"
       source="${javac.source}"
       notree="${javadoc.notree}"
       use="${javadoc.use}"
       nonavbar="${javadoc.nonavbar}"
       noindex="${javadoc.noindex}"
       splitindex="${javadoc.splitindex}"
       author="${javadoc.author}"
       version="${javadoc.version}"
       windowtitle="${javadoc.windowtitle}"
       private="${javadoc.private}"
       additionalparam="${javadoc.additionalparam}"
       failonerror="true">
           <classpath>
               <path path="${javac.classpath}:${jaxr.build.classpath}"/>
           </classpath>
           <sourcepath>
               <pathelement location="${src.dir}"/>
           </sourcepath>
           <fileset dir="${src.dir}"/>
       </javadoc>
   </target>
   <target name="javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,javadoc-build">
       <nbbrowse file="${dist.javadoc.dir}/index.html"/>
   </target>
   <target name="javadoc" depends="init,javadoc-build,javadoc-browse" description="Build Javadoc."/>

</project>

 
 
Close
loading
Please Confirm
Close