msv.msv.build.xml Maven / Gradle / Ivy
<?xml version="1.0"?>
<!--
Ant build script for MSV and related projects.
Tasks to help development
=========================
binary
compile everything to the bin directory.
javadoc
run javadoc on the working copy. Useful to check the documentation
without actually creating a distribution package.
test_msv
test core msv codes. parser, verifier and several related codes.
release
create a distribution package of MSV
-->
<project name="tranquilo" basedir="." default="binary">
<!-- import the global configuration file -->
<property file="../shared/ant.config"/>
<!--
Files that are necessary for MSV at run-time.
These files will be copied into the /bin directory
and will be added to the jar file.
-->
<patternset id="resource.files">
<include name="**/*.properties"/>
<include name="**/*.rng"/>
<include name="**/*.xsd"/>
<include name="**/*.dtd"/>
</patternset>
<!-- compile Java source files -->
<target name="binary">
<mkdir dir="./bin"/>
<javac
srcdir="./src"
destdir="./bin"
debug="on"
optimize="off" source="1.5" target="1.5">
<classpath>
<pathelement path="${cpath.fromsource}"/>
</classpath>
<classpath path="../xsdlib/bin"/>
<classpath path="../testharness/bin"/>
<classpath path="${resolver.jar}"/>
<classpath path="${xerces.jar}"/>
<classpath path="${isorelax.jar}"/>
<classpath path="${relaxngDatatype.jar}"/>
</javac>
<!-- copy resource files -->
<copy todir="./bin">
<fileset dir="./src">
<patternset refid="resource.files"/>
</fileset>
</copy>
</target>
<!-- generate javadoc documentation from the working copy -->
<target name="javadoc">
<mkdir dir="./javadoc"/>
<javadoc source="1.5" locale="en_US"
packagenames="com.sun.msv.*"
sourcepath="./src"
classpath="${java.class.path}"
destdir="javadoc"
windowtitle="Internal Use Only --- Sun Multi Schema XML Validator"
public="yes"
author="yes"
overview="src/com/sun/msv/overview.html"
>
<classpath>
<pathelement path="${cpath.fromsource}"/>
</classpath>
<link offline="true" href="http://java.sun.com/products/jdk/1.2/docs/api"
packagelistLoc="../shared/ExternalPackageLists/CoreAPI" />
<link offline="true" href="http://xml.apache.org/apiDocs/"
packagelistLoc="../shared/ExternalPackageLists/XML" />
<link offline="true" href="http://iso-relax.sourceforge.net/apiDoc/"
packagelistLoc="../shared/ExternalPackageLists/ISO-RELAX" />
<link offline="true" href="http://relaxng.sourceforge.net/datatype/java/apiDocs/"
packagelistLoc="../shared/ExternalPackageLists/RELAXNG" />
</javadoc>
</target>
<target name="test">
<ant antfile="../shared/ant.test.xml" target="test" />
</target>
<target name="test_release">
<ant antfile="../shared/ant.test.xml" target="test_release">
<property name="testJar" value="./package/msv.jar"/>
</ant>
</target>
<!-- generate MSV release -->
<target name="dist" description="build the distribution package into the dist/ dir">
<tstamp>
<format property="YEAR" pattern="yyyy" locale="en"/>
</tstamp>
<delete dir="dist" />
<mkdir dir="dist/src" />
<delete dir="temp"/>
<mkdir dir="temp"/>
<delete dir="temp_xsdlibsrc"/>
<mkdir dir="temp_xsdlibsrc"/>
<!-- copy source code -->
<copy todir="dist/src">
<fileset dir="src" />
</copy>
<!-- copy document files -->
<copy todir="dist">
<fileset dir="doc" />
</copy>
<replace dir="dist">
<include name="**/*.html"/>
<include name="**/*.txt"/>
<replacefilter token="@@VERSION@@" value="${DSTAMP}" />
<replacefilter token="@@YEAR@@" value="${YEAR}" />
</replace>
<!-- copy contrib files -->
<copy todir="dist/contrib">
<fileset dir="contrib" />
</copy>
<!-- obtain examples -->
<copy todir="dist/examples">
<fileset dir="examples" />
</copy>
<!-- compile files -->
<javac srcdir="dist/src" debug="on"
destdir="temp" source="1.5" target="1.5">
<classpath>
<pathelement path="${cpath.fromsource}"/>
</classpath>
<classpath path="temp"/>
<classpath path="${java.class.path}"/>
<classpath path="${relaxngDatatype.jar}"/>
<classpath path="${isorelax.jar}"/>
<classpath path="../package/xsdlib.jar"/>
<classpath path="${resolver.jar}"/>
<classpath path="${xerces.jar}"/>
<classpath path="${junit.jar}"/>
<include name="**/*.java" />
</javac>
<!-- <copy file="../package/xsdlib.jar" tofile="dist/xsdlib.jar" />
<copy file="${relaxngDatatype.jar}" tofile="dist/relaxngDatatype.jar" />
<copy file="${isorelax.jar}" tofile="dist/isorelax.jar" />
<copy file="${xerces.jar}" tofile="dist/xercesImpl.jar" />
<copy file="${xmlParserAPIs.jar}" tofile="dist/xmlParserAPIs.jar" />
-->
<!-- create a time stamp file -->
<echo file="temp/version.properties">version=${DSTAMP}</echo>
<!-- create META-INF/services file -->
<mkdir dir="temp/META-INF/services"/>
<echo file="temp/META-INF/services/org.iso_relax.verifier.VerifierFactoryLoader"
>com.sun.msv.verifier.jarv.FactoryLoaderImpl</echo>
<!-- creates binary jar -->
<jar jarfile="dist/msv.jar"
manifest="./MANIFEST.MF"
compress="${compress}">
<fileset dir="dist/src">
<patternset refid="resource.files" />
</fileset>
<fileset dir="temp" />
</jar>
<!-- creates javadoc -->
<mkdir dir="dist/javadoc" />
<javadoc locale="en_US"
packagenames="com.sun.msv.*"
sourcepath="dist/src:temp_xsdlibsrc"
destdir="dist/javadoc"
windowtitle="Sun Multi Schema XML Validator"
overview="dist/src/com/sun/msv/overview.html"
author="yes"
public="yes"
source="1.5"
>
<classpath>
<pathelement path="${cpath.fromsource}"/>
</classpath>
<classpath path="temp"/>
<classpath path="${isorelax.jar}"/>
<classpath path="${relaxngDatatype.jar}"/>
<classpath path="${java.class.path}"/>
<!--
if you have encountered error around here,
please remove all offline="true" and packagelistLoc="...".
-->
<link offline="true" href="http://java.sun.com/products/jdk/1.2/docs/api"
packagelistLoc="ExternalPackageLists\CoreAPI" />
<link offline="true" href="http://xml.apache.org/apiDocs/"
packagelistLoc="ExternalPackageLists\XML" />
<link offline="true" href="http://iso-relax.sourceforge.net/apiDoc/"
packagelistLoc="ExternalPackageLists\ISO-RELAX" />
<link offline="true" href="http://relaxng.sourceforge.net/datatype/java/apiDocs/"
packagelistLoc="../shared/ExternalPackageLists/RELAXNG" />
</javadoc>
<!-- remove Visio files from release package -->
<delete dir="dist" includes="**/*.vsd" />
<delete dir="temp" />
<!-- compile sample files -->
<!-- <javac srcdir="dist/examples">
<classpath>
<pathelement path="${cpath.fromsource}"/>
</classpath>
<classpath path="dist/msv.jar"/>
<classpath path="dist/xsdlib.jar"/>
<classpath path="${relaxngDatatype.jar}"/>
<classpath path="${isorelax.jar}"/>
<classpath path="../shared/lib/servlet.jar"/>
<classpath path="${java.class.path}"/>
<classpath path="${resolver.jar}"/>
<include name="**/*.java" />
</javac>-->
</target>
<!-- generate MSV release -->
<target name="release" depends="dist" description="build the distribution zip file">
<tstamp>
<format property="YEAR" pattern="yyyy" locale="en"/>
</tstamp>
<property name="stageName" value="msv-${DSTAMP}" />
<!-- copy jar file to package dir -->
<copy file="dist/msv.jar" tofile="../package/msv.jar" />
<!-- build src zip file -->
<zip zipfile="../package/msv-src.zip" compress="true">
<fileset dir="dist/src" />
</zip>
<!-- create distribution package -->
<zip zipfile="../package/msv.${DSTAMP}.zip">
<zipfileset dir="dist" prefix="${stageName}" />
</zip>
</target>
</project>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy