build.xml

changeset 286
f50545b5e2f1
parent 262
6d622b1b4db0
child 637
9c07ef4934dd
     1.1 --- a/build.xml	Fri Feb 24 18:22:57 2012 -0800
     1.2 +++ b/build.xml	Tue Mar 06 16:09:35 2012 -0800
     1.3 @@ -36,9 +36,6 @@
     1.4        javac.debug          - true or false for debug classfiles
     1.5        javac.target         - classfile version target
     1.6        javac.source         - source version
     1.7 -      drops.dir            - directory that holds source drop bundles
     1.8 -      allow.download       - permit downloads from public url (default is false)
     1.9 -                             (used if bundles not found in drops.dir)
    1.10  
    1.11        Run 'make help' for help using the Makefile.
    1.12      </description>
    1.13 @@ -46,15 +43,12 @@
    1.14      <!-- Project build properties. -->
    1.15      <property file="build.properties"/>
    1.16  
    1.17 -    <!-- See if drop sources were included. -->
    1.18 -    <condition property="drop.dir" 
    1.19 -               value="${drop.included.dir}" 
    1.20 -               else="${drop.expanded.dir}">
    1.21 -        <available file="${drop.included.dir}" type="dir"/>
    1.22 -    </condition>
    1.23 -
    1.24 -    <!-- Get shared targets. -->
    1.25 -    <import file="build-defs.xml"/>
    1.26 +    <property name="jaxws.src.dir" value="src/share/jaxws_classes"/>
    1.27 +    <property name="jaf.src.dir" value="src/share/jaf_classes"/>
    1.28 +    <path id="src.dir.id">
    1.29 +      <pathelement path="${jaxws.src.dir}"/>
    1.30 +      <pathelement path="${jaf.src.dir}"/>
    1.31 +    </path>
    1.32  
    1.33      <!-- Initialization of directories needed for build. -->
    1.34      <target name="init">
    1.35 @@ -79,14 +73,20 @@
    1.36              unless="javac.jar.exists">
    1.37          <echo message="WARNING: Cannot find ${javac.jar}"/>
    1.38      </target>
    1.39 +    
    1.40 +    <!-- Create src.zip. -->
    1.41 +    <target name="-dist-src-zip" depends="init">
    1.42 +        <zip file="${dist.src.zip}" basedir="${jaxws.src.dir}"/>
    1.43 +        <zip file="${dist.src.zip}" basedir="${jaf.src.dir}" update="true"/>
    1.44 +    </target>
    1.45  
    1.46      <!-- Creation of distribution files to jdk build process. -->
    1.47      <target name="dist"
    1.48 -	    depends="init, -init-src-dirs, build, -dist-classes-jar, -dist-src-zip"
    1.49 +	    depends="init, build, -dist-classes-jar, -dist-src-zip"
    1.50              description="Create all built distribution files.">
    1.51      </target>
    1.52      <target name="-dist-classes-jar-uptodate"
    1.53 -	    depends="init, -init-src-dirs">
    1.54 +	    depends="init">
    1.55          <condition property="dist.classes.jar.uptodate">
    1.56              <and>
    1.57                  <available file="${dist.classes.jar}" type="file"/>
    1.58 @@ -97,14 +97,39 @@
    1.59          </condition>
    1.60      </target>
    1.61      <target name="-dist-classes-jar"
    1.62 -	    depends="init, -init-src-dirs, -dist-classes-jar-uptodate"
    1.63 +	    depends="init, -dist-classes-jar-uptodate"
    1.64              unless="dist.classes.jar.uptodate">
    1.65          <delete file="${dist.classes.jar}"/>
    1.66          <jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/>
    1.67      </target>
    1.68  
    1.69 -    <target name="-build-setup"
    1.70 -	    depends="init, -init-src-dirs, -drop-build-setup">
    1.71 +    <!-- Special build area setup. -->
    1.72 +    <target name="-build-setup" depends="init">
    1.73 +        <mkdir dir="${build.classes.dir}"/>
    1.74 +        <copy todir="${build.classes.dir}">
    1.75 +            <fileset dir="${jaxws.src.dir}"
    1.76 +                includes="**/*.xsd, **/*.default, **/*.properties"
    1.77 +                excludes="**/*.java, **/*.package.html"/>
    1.78 +        </copy>
    1.79 +        <replaceregexp match="#(.*)$" replace="#" flags="gm">
    1.80 +            <fileset dir="${build.classes.dir}" includes="**/*.properties"/>
    1.81 +        </replaceregexp>
    1.82 +
    1.83 +        <mkdir dir="${build.classes.dir}/META-INF/services"/>
    1.84 +        <copy todir="${build.classes.dir}/META-INF"
    1.85 +            file="${jaf.src.dir}/META-INF/mailcap.default"/>
    1.86 +        <copy todir="${build.classes.dir}/META-INF"
    1.87 +            file="${jaf.src.dir}/META-INF/mimetypes.default"/>
    1.88 +        <copy todir="${build.classes.dir}/META-INF/services"
    1.89 +            file="${jaxws.src.dir}/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin"/>
    1.90 +        <copy todir="${build.classes.dir}/META-INF/services"
    1.91 +            file="${jaxws.src.dir}/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin"/>
    1.92 +        <mkdir dir="${build.classes.dir}/com/sun/tools/internal/xjc/runtime"/>
    1.93 +        <copy todir="${build.classes.dir}/com/sun/tools/internal/xjc/runtime">
    1.94 +            <fileset dir="${jaxws.src.dir}/com/sun/tools/internal/xjc/runtime"
    1.95 +                includes="**/*.java"
    1.96 +                excludes="**/*.package.html"/>
    1.97 +        </copy>
    1.98      </target>
    1.99  
   1.100      <!-- Build (compilation) of sources to class files. -->
   1.101 @@ -112,7 +137,7 @@
   1.102  	    depends="compile, -build-setup">
   1.103      </target>
   1.104      <target name="compile"
   1.105 -	    depends="init, -init-src-dirs">
   1.106 +	    depends="init">
   1.107          <mkdir dir="${build.classes.dir}"/>
   1.108          <javac 
   1.109  	     includeAntRuntime="false" 
   1.110 @@ -132,26 +157,16 @@
   1.111  
   1.112      <!-- Test. (FIXME: Need to know how to run tests.) -->
   1.113      <target name="test"
   1.114 -	    depends="init, -init-src-dirs, dist">
   1.115 +	    depends="init, dist">
   1.116          <echo message="FIXME: How do you run the tests"/>
   1.117      </target>
   1.118      
   1.119      <!-- Populate source area if needed. -->
   1.120      <target name="source"
   1.121 -            depends="init, -init-src-dirs"
   1.122 +            depends="init"
   1.123              description="Populate all source file directories">
   1.124      </target>
   1.125  
   1.126 -    <!-- Populate drop_included area. -->
   1.127 -    <target name="drop_included"
   1.128 -            depends="clobber"
   1.129 -            description="Populate all source file directories">
   1.130 -        <delete dir="${drop.included.dir}"/>
   1.131 -        <antcall target="source"/>
   1.132 -        <move file="${drop.expanded.dir}" tofile="${drop.included.dir}"/>
   1.133 -        <delete dir="${drop.included.dir}/bundles"/>
   1.134 -    </target>
   1.135 -
   1.136      <!-- Clean up compiled files. -->
   1.137      <target name="clean"
   1.138              description="Delete all generated files">
   1.139 @@ -163,7 +178,6 @@
   1.140      <target name="clobber"
   1.141  	    depends="clean"
   1.142              description="Delete all generated files, including imported sources">
   1.143 -        <delete dir="${drop.expanded.dir}"/>
   1.144      </target>
   1.145  
   1.146      <target name="-banner">

mercurial