Project

Profile

Help

Revision 6717e3bc

Added by O'Neil Delpratt almost 8 years ago

update to build files in 9.5

View differences:

latest9.5/build/build-j.xml
18 18
    <property name="drivers-j.dir" value="../MyJava/testcode/test"/>		    
19 19
		    
20 20

  
21
    <taskdef resource="com/igormaznitsa/jcp/ant/tasks.properties" classpath="../lib/jcp-5.3.jar"/>
21
    <taskdef resource="com/igormaznitsa/jcp/ant/tasks.properties" classpath="../lib/jcp-5.3.2.jar"/>
22 22
    <!-- following locations are relative to the build file -->
23 23
        
24 24
    <property name="services.dir" value="services"/>
......
71 71
             just to use the first line: this works for JDK 1.6. But JDK 1.5 incorrectly
72 72
             expects a properties file, in the form of the subsequent line. The combination
73 73
             works with both Java releases -->
74
        <!-- See bug 1944. The next 9.5 maintenance release will use the JDK 1.6 format;
75
             the next full release will drop the XPath services data entirely -->
74 76
        <echo file="${services.dir}/saxon9he/META-INF/services/javax.xml.xpath.XPathFactory"
75 77
>net.sf.saxon.xpath.XPathFactoryImpl
76
http\://java.sun.com/jaxp/xpath/dom:    net.sf.saxon.xpath.XPathFactoryImpl
77
http\://saxon.sf.net/jaxp/xpath/om:     net.sf.saxon.xpath.XPathFactoryImpl
78
</echo>
78
        </echo>
79
        
80
        <!-- dropped from the above:
81
            http\://java.sun.com/jaxp/xpath/dom:    net.sf.saxon.xpath.XPathFactoryImpl
82
            http\://saxon.sf.net/jaxp/xpath/om:     net.sf.saxon.xpath.XPathFactoryImpl
83
        -->
79 84

  
80 85
        <mkdir dir="${services.dir}/saxon9pe/META-INF/services"/>
81 86
        <echo file="${services.dir}/saxon9pe/META-INF/services/javax.xml.transform.TransformerFactory"
82 87
              message="com.saxonica.config.ProfessionalTransformerFactory"/> 
83 88
        <echo file="${services.dir}/saxon9pe/META-INF/services/javax.xml.xpath.XPathFactory"
84 89
>com.saxonica.config.ProfessionalXPathFactory
85
http\://java.sun.com/jaxp/xpath/dom:    com.saxonica.config.ProfessionalXPathFactory
86
http\://saxon.sf.net/jaxp/xpath/om:     com.saxonica.config.ProfessionalXPathFactory
87
http\://www.xom.nu/jaxp/xpath/xom:      com.saxonica.config.ProfessionalXPathFactory
88
http\://jdom.org/jaxp/xpath/jdom:       com.saxonica.config.ProfessionalXPathFactory
89
http\://www.dom4j.org/jaxp/xpath/dom4j: com.saxonica.config.ProfessionalXPathFactory
90
</echo>
90
        </echo>
91
        
92
        <!-- dropped from the above:
93
            http\://java.sun.com/jaxp/xpath/dom:    com.saxonica.config.ProfessionalXPathFactory
94
            http\://saxon.sf.net/jaxp/xpath/om:     com.saxonica.config.ProfessionalXPathFactory
95
            http\://www.xom.nu/jaxp/xpath/xom:      com.saxonica.config.ProfessionalXPathFactory
96
            http\://jdom.org/jaxp/xpath/jdom:       com.saxonica.config.ProfessionalXPathFactory
97
            http\://www.dom4j.org/jaxp/xpath/dom4j: com.saxonica.config.ProfessionalXPathFactory
98
            -->
91 99

  
92 100
               
93 101
        <mkdir dir="${services.dir}/saxon9ee/META-INF/services"/>
......
95 103
              message="com.saxonica.config.EnterpriseTransformerFactory"/>
96 104
        <echo file="${services.dir}/saxon9ee/META-INF/services/javax.xml.xpath.XPathFactory"
97 105
>com.saxonica.config.EnterpriseXPathFactory
98
http\://java.sun.com/jaxp/xpath/dom:    com.saxonica.config.EnterpriseXPathFactory
99
http\://saxon.sf.net/jaxp/xpath/om:     com.saxonica.config.EnterpriseXPathFactory
100
http\://www.xom.nu/jaxp/xpath/xom:      com.saxonica.config.EnterpriseXPathFactory
101
http\://jdom.org/jaxp/xpath/jdom:       com.saxonica.config.EnterpriseXPathFactory
102
http\://www.dom4j.org/jaxp/xpath/dom4j: com.saxonica.config.EnterpriseXPathFactory
103
</echo>
106
        </echo>
107
        <!-- Dropped from the above:
108
            http\://java.sun.com/jaxp/xpath/dom:    com.saxonica.config.EnterpriseXPathFactory
109
            http\://saxon.sf.net/jaxp/xpath/om:     com.saxonica.config.EnterpriseXPathFactory
110
            http\://www.xom.nu/jaxp/xpath/xom:      com.saxonica.config.EnterpriseXPathFactory
111
            http\://jdom.org/jaxp/xpath/jdom:       com.saxonica.config.EnterpriseXPathFactory
112
            http\://www.dom4j.org/jaxp/xpath/dom4j: com.saxonica.config.EnterpriseXPathFactory
113
            -->
104 114
<echo file="${services.dir}/saxon9ee/META-INF/services/javax.xml.validation.SchemaFactory"
105 115
>com.saxonica.jaxp.SchemaFactoryImpl</echo>     
106 116
       <!--<echo file="${services.dir}/saxon9ee/META-INF/services/javax.xml.validation.SchemaFactory"
......
185 195
            <include name="net/sf/saxon/**/*.java"/>
186 196
            <include name="javax/xml/xquery/*.java"/>
187 197
            <exclude name="**/dotnet/**"/>
198
            <exclude name="net/sf/saxon/option/expath/zip/**"/>  
188 199
            <include name="net/sf/saxon/**/package.html"/>
200
	    <exclude name="net/sf/saxon/option/expath/zip/**" />		
189 201
          </fileset>
190 202
          <fileset dir="${source-eej.dir}">
191 203
            <include name="com/saxonica/**/*.java"/>
......
225 237
            <include name="net/sf/saxon/**/*.java"/>
226 238
            <include name="javax/xml/xquery/*.java"/>
227 239
            <exclude name="**/dotnet/**"/>
240
            <exclude name="net/sf/saxon/option/expath/zip/**"/>  
228 241
            <include name="net/sf/saxon/**/package.html"/>
242
	    <exclude name="net/sf/saxon/option/expath/zip/**" />		
229 243
          </fileset>
230 244
          <fileset dir="${source-eej.dir}">
231 245
            <include name="com/saxonica/**/*.java"/>
232 246
            <exclude name="com/saxonica/testdriver/**/*.java"/>
233 247
            <!--<exclude name="com/saxonica/jaxp/*.java"/>-->
234
            <exclude name="com/saxonica/config/pe/**" />
248
            <!--<exclude name="com/saxonica/config/pe/**" />-->
235 249
            <!--<exclude name="com/saxonica/config/DotNetVerifier.java"/>-->
236 250
            <exclude name="com/saxonica/config/DotNetExtensionFunctionFactory.java"/>
237 251
            <exclude name="com/saxonica/config/DotNetExtensionLibrary.java"/>
......
327 341
            destination="${temp-src-prep-eej.dir}"
328 342
            verbose="true">
329 343
        <global name="EE" value="true"/>
330
        <global name="PE" value="false"/>
344
        <global name="PE" value="true"/>
331 345
       <global name="STREAM" value="true"/>
332 346
       <global name="HOF" value="true"/>
333 347
       <global name="BYTECODE" value="true"/>
......
336 350
       </preprocess>
337 351
       <replaceregexp file="${temp-src-prep-eej.dir}/net/sf/saxon/Configuration.java" match="import net\.sf\.saxon\.dotnet\.DotNetPlatform(.*)" replace="" byline="yes" />
338 352
       <replaceregexp file="${temp-src-prep-eej.dir}/net/sf/saxon/Configuration.java" match="import com\.saxonica\.config\.DotNetPlatform(.*)" replace="" byline="yes" />
353
             <!--<replaceregexp match="import com\.saxonica\.bytecode(.*)" replace="" flags="g"  byline="true">
354
	     <fileset dir="${temp-src-prep-eej.dir}"  includes="**/*.java" />
355
       </replaceregexp>   -->
339 356
       <echo>Preprocessing eej complete!</echo>
340 357
    </target>
341 358
        
......
412 429
        </javac>
413 430
    </target>
414 431

  
432
<target name="unpack">
433
    <!-- saxon9-unpack.jar -->
434
    <jar basedir="${classes-j.dir}" compress="${build.compress}" jarfile="${product.dir}/hej/saxon9-unpack.jar" update="true">
435
        <include name="com/saxonica/ptree/PTreeReader.class"/>
436
        <include name="com/saxonica/ptree/PTreeReader$PTreeException.class"/>
437
        <include name="com/saxonica/ptree/TextMangler.class"/>
438
        <include name="com/saxonica/ptree/TextObfuscator.class"/>
439
        <include name="com/saxonica/ptree/PackageURIResolver.class"/>
440
    </jar>
441
</target>
415 442
          
416
    <target name="jar-hej" description="Create Saxon-HE jar files for Java" depends="compile-hej">
443
    <target name="jar-hej" description="Create Saxon-HE jar files for Java" depends="compile-hej, unpack">
417 444
        <mkdir dir="${product.dir}/hej"/>
418 445
        <mkdir dir="${classes-j.dir}/he"/>
419 446

  
......
460 487

  
461 488
    </target>
462 489
    
463
    <target name="jar-pej" description="Create Saxon-PE jar files for Java" depends="compile-pej">
490
    <target name="jar-pej" description="Create Saxon-PE jar files for Java" depends="compile-pej, unpack">
464 491
        <mkdir dir="${product.dir}/pej"/>
465 492
        <mkdir dir="${classes-j.dir}/pe"/>
466 493
        
......
519 546

  
520 547
    </target>
521 548
    
522
    <target name="jar-eej" description="Create Saxon-EE jar files for Java" depends="compile-eej">
549
    <target name="jar-eej" description="Create Saxon-EE jar files for Java" depends="compile-eej, unpack">
523 550
        <mkdir dir="${product.dir}/eej"/>
524 551
        <mkdir dir="${classes-j.dir}/ee"/>
525 552
        
......
734 761
    </target>           
735 762
    
736 763
                  
737
    <target name="product-javadoc" description="Generate Javadoc." depends="copysource-development-j">
764
    <target name="product-javadoc" description="Generate Javadoc." depends="copysource-development-j, preprocess-eej">
738 765
        <javadoc bottom="Copyright (c) 2004-2013 Saxonica Limited. All rights reserved."
739 766
            destdir="${javadoc.dir}" doctitle="Saxon9 Java API Documentation"
740 767
            noindex="false" notree="false" access="protected"
741 768
            maxmemory="512M" source="1.5">
742
            <packageset dir="${temp-src-j.dir}">
769
            <packageset dir="${temp-src-prep-eej.dir}">
743 770
                <include name="net/**"/>
744 771
                <include name="com/**"/>
745 772
                <include name="javax/xml/query/**"/>
......
783 810
    </target>
784 811

  
785 812

  
786
    <target name="signjars" depends="jar-hej, jar-pej, jar-eej, private-signjars" description="Sign all JAR files">
813
    <target name="signjars" depends="jar-hej, jar-pej, jar-eej, maven, private-signjars" description="Sign all JAR files">
787 814
        <!-- If the private-signjars task is not available, simply delete the dependency -->
788 815
    </target>
789 816
    
......
804 831
	  <zip zipfile="${issue.dir}/SaxonEE${versionh}J.zip">
805 832
        <fileset dir="${product.dir}/eej"/>
806 833
      </zip>                     
807
     </target>    
834
     </target>
835

  
836
    <target name="maven" description="Build files ready for maven" depends="compile-hej">
837
        <mkdir dir="product.dir/maven" />
838
       <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="../lib/jarjar-1.1.jar"/>
839
       <jar basedir="${temp-src-prep-hej.dir}" compress="true" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}-sources.jar">
840
           <include name="net/**/*.java"/>
841
           <include name="net/**/package.html"/>
842
      </jar>
843

  
844
      <jar basedir="${classes-j.dir}" compress="${build.compress}" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}.jar">
845
            <include name="net/**/*.class"/>
846
            <exclude name="net/sf/saxon/option/**/*.class"/>
847
            <!--<exclude name="**/javax/**/*.class"/>
848
            <exclude name="**/xpath/**/*.class"/>
849
            <exclude name="**/xqj/**/*.class"/>-->
850
            <include name="javax/xml/xquery/*.class"/>
851
            <include name="META-INF/**"/>
852
            <manifest>
853
                <attribute name="Project-Name" value="Saxon-HE"/>
854
                <attribute name="Main-Class" value="net.sf.saxon.Transform"/>
855
            </manifest>
856
            <metainf dir="${services.dir}/saxon9he/META-INF"/>
857
            <!--<metainf dir="${services.dir}/saxon9-xpath/META-INF"/>-->
858
            <!--
859
            <service type="javax.xml.transform.TransformerFactory"
860
                provider="net.sf.saxon.TransformerFactoryImpl"/>
861
            -->
862
        </jar>
863

  
864
        <jar basedir="${development-data.dir}" compress="${build.compress}" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}.jar" update="true">
865
            <include name="**"/>
866
        </jar>
867

  
868

  
869
        <jar basedir="${classes-j.dir}" compress="true" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}-compressed.jar">
870
            <include name="net/**/*.class"/>
871
            <exclude name="net/sf/saxon/option/**/*.class"/>
872
            <!--<exclude name="**/javax/**/*.class"/>
873
            <exclude name="**/xpath/**/*.class"/>
874
            <exclude name="**/xqj/**/*.class"/>-->
875
            <include name="javax/xml/xquery/*.class"/>
876
            <include name="META-INF/**"/>
877
            <manifest>
878
                <attribute name="Project-Name" value="Saxon-HE"/>
879
                <attribute name="Main-Class" value="net.sf.saxon.Transform"/>
880
            </manifest>
881
            <metainf dir="${services.dir}/saxon9he/META-INF"/>
882
            <!--<metainf dir="${services.dir}/saxon9-xpath/META-INF"/>-->
883
            <!--
884
            <service type="javax.xml.transform.TransformerFactory"
885
                provider="net.sf.saxon.TransformerFactoryImpl"/>
886
            -->
887
        </jar>
888

  
889
                <!-- add data files -->
890
        <jar basedir="${development-data.dir}" compress="true" jarfile="${product.dir}/maven/Saxon-HE-${version.maven}-compressed.jar" update="true">
891
            <include name="**"/>
892
        </jar>
893
    </target>
808 894
       
809 895
    
810 896
</project>

Also available in: Unified diff