Annotation of 2002/css-validator/build.xml, revision 1.16

1.1       sijtsche    1: <?xml version="1.0" encoding="UTF-8"?>
1.16    ! jean-gui    2: <!-- $Id: build.xml,v 1.15 2009/01/23 15:32:02 jean-gui Exp $ -->
1.4       ot          3: <project default="jar" name="W3C CSS Validator">
1.1       sijtsche    4: 
1.4       ot          5:   <!-- =================================================================== -->
                      6:   <!-- User-overrideable properties                                      -->
                      7:   <!-- =================================================================== -->
                      8:       
                      9:   <property name="servlet.lib" value="/usr/share/java/servlet-2.3.jar"/>
                     10: 
                     11:   <!-- =================================================================== -->
                     12:   <!-- Project-wide properties                                           -->
                     13:   <!-- =================================================================== -->
                     14:   <!-- Overriding those properties works too, but is not advisable. -->
                     15: 
                     16:   <property name="app.name" value="css-validator"/>
                     17:   <property name="jar.file" value="${app.name}.jar"/>
                     18:   <property name="war.file" value="${app.name}.war"/>
                     19:        
                     20:   <!-- =================================================================== -->
                     21:   <!-- Targets                                                             -->
                     22:   <!-- =================================================================== -->
                     23: 
                     24:        <path id="build.class.path">
                     25:                <pathelement location="${servlet.lib}"/>
1.9       jean-gui   26:     <fileset dir="lib">
                     27:         <include name="*.jar"/>
                     28:     </fileset>
1.4       ot         29:        </path>
1.1       sijtsche   30:        
1.10      jean-gui   31:   <target name="prepare.check">
                     32:     <condition property="prepare.run">
                     33:       <and>
                     34:         <available file="lib/jigsaw.jar"/>
                     35:         <available file="lib/commons-collections-3.2.1.jar"/>
                     36:         <available file="lib/commons-lang-2.4.jar"/>
                     37:         <available file="lib/velocity-1.6.1.jar"/>
                     38:         <available file="lib/xercesImpl.jar"/>
                     39:         <available file="lib/xml-apis.jar"/>
                     40:         <available file="lib/tagsoup-1.2.jar"/>
                     41:       </and>
                     42:     </condition>
                     43:   </target>
                     44: 
                     45: 
                     46:   <target name="prepare" description="Downloads necessary libs" depends="prepare.check" unless="prepare.run">
                     47:     <mkdir dir="lib"/>
                     48:     <mkdir dir="tmp"/>
                     49: 
                     50:     <get dest="tmp/jigsaw_2.2.6.tar.gz" src="http://jigsaw.w3.org/Distrib/jigsaw_2.2.6.tar.gz" usetimestamp="true"/>
                     51:     <get dest="tmp/commons-collections-3.2.1-bin.tar.gz" src="http://www.apache.org/dist/commons/collections/binaries/commons-collections-3.2.1-bin.tar.gz" usetimestamp="true"/>
                     52:     <get dest="tmp/commons-lang-2.4-bin.tar.gz" src="http://www.apache.org/dist/commons/lang/binaries/commons-lang-2.4-bin.tar.gz" usetimestamp="true"/>
                     53:     <get dest="tmp/velocity-1.6.1.tar.gz" src="http://www.apache.org/dist/velocity/engine/1.6.1/velocity-1.6.1.tar.gz" usetimestamp="true"/>
                     54:     <get dest="tmp/Xerces-J-bin.2.9.1.tar.gz" src="http://www.apache.org/dist/xerces/j/Xerces-J-bin.2.9.1.tar.gz" usetimestamp="true"/>
                     55: 
                     56:     <untar compression="gzip" src="tmp/jigsaw_2.2.6.tar.gz" dest="tmp"/>
                     57:     <untar compression="gzip" src="tmp/commons-collections-3.2.1-bin.tar.gz" dest="tmp"/>
                     58:     <untar compression="gzip" src="tmp/commons-lang-2.4-bin.tar.gz" dest="tmp"/>
                     59:     <untar compression="gzip" src="tmp/velocity-1.6.1.tar.gz" dest="tmp"/>
                     60:     <untar compression="gzip" src="tmp/Xerces-J-bin.2.9.1.tar.gz" dest="tmp"/>
                     61: 
                     62:     <copy file="tmp/Jigsaw/classes/jigsaw.jar" tofile="lib/jigsaw.jar"/>
                     63:     <copy file="tmp/commons-collections-3.2.1/commons-collections-3.2.1.jar" tofile="lib/commons-collections-3.2.1.jar"/>
                     64:     <copy file="tmp/commons-lang-2.4/commons-lang-2.4.jar" tofile="lib/commons-lang-2.4.jar"/>
                     65:     <copy file="tmp/velocity-1.6.1/velocity-1.6.1.jar" tofile="lib/velocity-1.6.1.jar"/>
                     66:     <copy file="tmp/xerces-2_9_1/xercesImpl.jar" tofile="lib/xercesImpl.jar"/>
                     67:     <copy file="tmp/xerces-2_9_1/xml-apis.jar" tofile="lib/xml-apis.jar"/>
                     68:     <get dest="lib/tagsoup-1.2.jar" src="http://home.ccil.org/~cowan/XML/tagsoup/tagsoup-1.2.jar"/>
                     69:   </target>
                     70: 
                     71:        <target name="build" description="Builds the validator" depends="prepare">
1.3       sijtsche   72:                <mkdir dir="./build"/>
1.11      jean-gui   73:                <javac classpathref="build.class.path" destdir="./build" encoding="UTF-8"
1.12      jean-gui   74:            debug="yes" includes="org/w3c/**" srcdir="." source="1.5" target="1.5"/>
1.3       sijtsche   75:                <copy todir="./build">
1.11      jean-gui   76:       <fileset dir="./">
                     77:         <include name="org/**"/>
                     78:         <exclude name="**/*.java"/>
                     79:         <exclude name="**/*.class"/>
                     80:       </fileset>
1.2       sijtsche   81:                </copy>
1.1       sijtsche   82:        </target>
                     83: 
1.14      jean-gui   84:        <target name="jigsaw" description="Builds the validator for Jigsaw" depends="prepare">
1.10      jean-gui   85:                <mkdir dir="./build"/>
1.12      jean-gui   86:                <javac classpathref="build.class.path" destdir="." encoding="UTF-8"
                     87:            debug="yes" source="1.5" target="1.5">
1.10      jean-gui   88:                        <src path="./org/w3c"/>
                     89:                </javac>
                     90:        </target>
                     91: 
1.4       ot         92:        <target name="javadoc" description="Generates API docs">
1.1       sijtsche   93:                <mkdir dir="./javadoc"/>
                     94:                <javadoc 
                     95:                        packagenames="org.w3c.*"
                     96:                        sourcepath="./"
                     97:                        destdir="./javadoc"
                     98:                        author="true"
                     99:                        version="true"
1.4       ot        100:                        windowtitle="W3C CSS Validator API"/>
1.1       sijtsche  101:        </target>       
1.3       sijtsche  102:        
1.4       ot        103:        <target name="jar" depends="build" description="Creates the lib archive">
                    104:                <delete file="${jar.file}"/>
1.11      jean-gui  105:                <jar jarfile="${jar.file}" basedir="build" excludes="org/**/*.java">
1.4       ot        106:                        <include name="org/**"/>
                    107:                        <manifest>
1.11      jean-gui  108:         <attribute name="Main-Class" value="org.w3c.css.css.CssValidator"/>
1.13      jean-gui  109:         <attribute name="Class-path" value=". lib/commons-collections-3.2.1.jar lib/commons-lang-2.4.jar lib/jigsaw.jar lib/tagsoup-1.2.jar lib/velocity-1.6.1.jar lib/xercesImpl.jar lib/xml-apis.jar"/>
1.4       ot        110:                        </manifest>
                    111:                </jar>
                    112:        </target>
                    113: 
                    114:        <target name="war" depends="build" description="Creates the webapp module">
                    115:                <delete file="${war.file}"/>
1.11      jean-gui  116:                <war warfile="${war.file}" webxml="web.xml" basedir="." includes="*html*,favicon.ico,images/**,style/**,scripts/**,tabtastic/**" excludes="html,css-validator.*">
                    117:       <classes dir="build"/>
1.9       jean-gui  118:       <lib dir="lib"/>
1.3       sijtsche  119:                </war>
                    120:        </target>
                    121: 
1.10      jean-gui  122:   <target name="clean" description="Cleans up generated files">
                    123:     <delete file="${jar.file}"/>
                    124:     <delete file="${war.file}"/>
                    125:     <delete dir="./build"/>
                    126:     <delete dir="./javadoc"/>
                    127:     <delete dir="./tmp"/>
                    128:   </target>
1.1       sijtsche  129: 
                    130: </project>

Webmaster