All Downloads are FREE. Search and download functionalities are using the official Maven repository.

txw2.build.xml Maven / Gradle / Ivy

Go to download

Ehcache is an open source, standards-based cache used to boost performance, offload the database and simplify scalability. Ehcache is robust, proven and full-featured and this has made it the most widely-used Java-based cache.

There is a newer version: 2.10.9.2
Show newest version
<?xml version="1.0"?>

<!--
 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://jwsdp.dev.java.net/CDDLv1.0.html
 See the License for the specific language governing
 permissions and limitations under the License.
 
 When distributing Covered Code, include this CDDL
 HEADER in each file and include the License file at
 https://jwsdp.dev.java.net/CDDLv1.0.html  If applicable,
 add the following below this CDDL HEADER, with the
 fields enclosed by brackets "[]" replaced with your
 own identifying information: Portions Copyright [yyyy]
 [name of copyright owner]
-->

<project name="txw2" default="jar">
  <path id="runtime.lib">
    <fileset dir="lib" includes="runtime/*.jar"/>
  </path>
	
  <target name="compile">
    <mkdir dir="build/runtime-classes" />
    <mkdir dir="build/compiler-classes" />
    
    <javac source="1.5" target="1.5" srcdir="src/runtime" destdir="build/runtime-classes" debug="on">
    	<classpath refid="runtime.lib"/>
    </javac>
    
    <javac source="1.5" target="1.5" srcdir="src/compiler" destdir="build/compiler-classes" debug="on">
    	<classpath refid="runtime.lib"/>
    	<classpath>
            <pathelement path="${cpath.fromsource}"/>
    		<pathelement path="build/runtime-classes"/>
    		<fileset dir="lib" includes="compiler/*.jar"/>
    	</classpath>
    </javac>
  </target>
  
  <target name="test" depends="compile">
    <mkdir dir="build/test-classes" />
    <javac srcdir="src/test" destdir="build/test-classes">
    	<classpath refid="runtime.lib"/>
    	<classpath>
        <pathelement path="build/runtime-classes"/>
      </classpath>
    </javac>
    
    <!-- TODO: design a test framework -->
  </target>
  
  <target name="javadoc">
    <mkdir dir="build/javadoc"/>
    <javadoc locale="en_US" source="1.5" destdir="build/javadoc">
      <packageset dir="src/runtime"/>
      <classpath>
        <fileset dir="lib" includes="**/*.jar"/>
      </classpath>
    </javadoc>
  </target>
  
  <target name="jar" depends="compile">
    <tstamp>
      <format property="now" pattern="MM/dd/yyyy hh:mm" unit="hour"/>
    </tstamp>
    <property name="build.id" value="${now}(${user.name})" />
    
    <zip destfile="build/txw2-src.zip">
      <fileset dir="src/runtime" includes="**/*" defaultexcludes="no"/>
    </zip>
    <zip destfile="build/txw2c-src.zip">
      <fileset dir="src/compiler" includes="**/*" defaultexcludes="no"/>
    </zip>
    <zip destfile="build/txw2-full-src.zip">
      <zipfileset dir="nbproject" prefix="nbproject"/>
      <zipfileset dir="src" prefix="src"/>
      <zipfileset dir="wsdl11" prefix="wsdl11"/>
      <zipfileset dir="xmlschema" prefix="xmlschema"/>
      <fileset file="*.xml"/>
      <fileset file="*.pom"/>
    </zip>
    <jar destfile="build/txw2.jar">
      <manifest>
        <attribute name="Date" value="${TODAY}"/>
        <attribute name="Build-Id" value="${build.id}"/>
      </manifest>
      <!--metainf dir="doc" includes="lib/*LICENSE.txt"/-->
      
      <fileset dir="build/runtime-classes" includes="**/*.class, **/*.properties"/>
      <fileset dir="src" includes="**/*.properties"/>
    </jar>
    <jar destfile="build/txwc2.jar">
      <manifest>
        <attribute name="Date" value="${TODAY}"/>
        <attribute name="Build-Id" value="${build.id}"/>
        <attribute name="Class-Path" value="txw2.jar lib/relaxngDatatype.jar lib/rngom.jar lib/xsdlib.jar lib/commons-cli-1.0.jar"/>
        <attribute name="Main-Class" value="com.sun.tools.txw2.Main"/>
      </manifest>
      <!--metainf dir="doc" includes="lib/*LICENSE.txt"/-->
      
      <fileset dir="build/compiler-classes" includes="**/*.class, **/*.properties"/>
      <fileset dir="src" includes="**/*.properties"/>
    </jar>
  </target>
  
  <target name="dist" depends="clean, javadoc, jar">
    <tstamp/>
    <zip zipfile="build/txw2-${DSTAMP}.zip">
      <zipfileset prefix="txw2-${DSTAMP}" dir="build"
        includes="*.jar,*.zip"/>
      <zipfileset prefix="txw2-${DSTAMP}" dir="build"
        includes="javadoc/**/*"/>
      <zipfileset prefix="txw2-${DSTAMP}/lib" dir="lib/compiler" includes="*.jar" excludes="ant.jar"/>
      <zipfileset prefix="txw2-${DSTAMP}" dir="doc" includes="*.html, *.css"/>
    </zip>
  </target>
  
  <target name="clean">
    <delete dir="j2se-integration"/>
    <delete dir="build"/>
  </target>

  <target name="integrate-xsom">
    <get src="http://kohsuke.sfbay/hudson/job/xsom/lastSuccessfulBuild/artifact/jaxb2-sources/xsom/build/xsom.jar"
         dest="lib/compiler/xsom.jar" />
    <get src="http://kohsuke.sfbay/hudson/job/xsom/lastSuccessfulBuild/artifact/jaxb2-sources/xsom/build/xsom-src.zip"
         dest="lib/compiler/xsom-src.zip" />
   </target>

  <target name="integrate-package-rename-task">
    <get src="http://kohsuke.sfbay/hudson/job/package-rename-task/lastSuccessfulBuild/artifact/target/package-rename-task-1.0.jar"
         dest="lib/package-rename-task.jar"/>
  </target>

  <target name="j2se-integration"
          description="prepare renamed source code for J2SE integration">
    <taskdef name="prename" classname="com.sun.wts.tools.ant.PackageRenameTask">
      <classpath>
        <pathelement path="lib/package-rename-task.jar" />
      </classpath>
    </taskdef>

    <prename srcdir="src/runtime" destdir="j2se-integration/runtime">
      <pattern from="com.sun.xml.txw2" to="com.sun.xml.internal.txw2" />
    </prename>

    <!-- sanity test -->
    <mkdir dir="build/renamed-classes"/>
    <javac srcdir="j2se-integration/runtime" destdir="build/renamed-classes">
      <classpath>
        <fileset dir="lib" includes="*/*.jar"/>
      </classpath>
    </javac>
  </target>

  <target name="push-maven" depends="jar">
    <fail unless="version">The 'version' property needs to be defined</fail>
    <fail unless="repositoryURL">The 'version' property needs to be defined</fail>

    <macrodef name="push">
      <attribute name="artifactId" />
      <attribute name="jar" />
      <attribute name="srczip" />
      <sequential>
        <echo file="build/@{artifactId}.pom"><![CDATA[<project>
      <modelVersion>4.0.0</modelVersion>
      <groupId>com.sun.xml.txw2</groupId>
      <artifactId>@{artifactId}</artifactId>
      <packaging>jar</packaging>
      <version>${version}</version>
    </project>
        ]]></echo>
        <exec executable="mvn.bat">
          <arg value="deploy:deploy-file"/>
          <arg value="-DpomFile=build/@{artifactId}.pom"/>
          <arg value="-Dfile=@{jar}"/>
          <arg value="-DrepositoryId=java.net2"/>
          <arg value="-Durl=${repositoryURL}"/>
        </exec>
        <exec executable="mvn.bat">
          <arg value="deploy:deploy-file"/>
          <arg value="-DgroupId=com.sun.xml.txw2"/>
          <arg value="-DartifactId=@{artifactId}"/>
          <arg value="-Dversion=${version}"/>
          <arg value="-Dpackaging=jar"/>
          <arg value="-Dfile=@{srczip}"/>
          <arg value="-Dclassifier=sources"/>
          <arg value="-DrepositoryId=java.net2"/>
          <arg value="-Durl=${repositoryURL}"/>
        </exec>
      </sequential>
    </macrodef>

    <push artifactId="txw2" jar="build/txw2.jar" srczip="build/txw2-src.zip" />
    <!--push artifactId="txw2c" file="build/txw2c.jar" /-->
  </target>
</project>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy