ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From THUFIR HAWAT <hawat.thu...@gmail.com>
Subject first build (well, not quite first)
Date Mon, 23 May 2005 10:21:25 GMT
I'm fairly new to ant, so I'm soliciting critique on what I have so
far.  Test16.java imports Tidy.jar, otherwise the source code is
straightforward.  I'm particularly interested in naming conventions.

[thufir@localhost java]$
[thufir@localhost java]$ cat build.xml
<project name="XHTML" default="package">

        <import file="properties.xml" />

        <target name="clean">
                <delete dir="${outputDir}" />
        </target>

        <target name="prepare" depends="clean">
                <mkdir dir="${outputDir}" />
        </target>

        <target name="compile" depends="prepare">
                <javac
                        srcdir          ="${sourceDir}"
                        destdir         ="${outputDir}"
                        classpath       ="${includeJar}"
                />
        </target>

        <target name="package" depends="compile">
                <jar jarfile="${outputDir}/${mainClass}.jar"
basedir="${outputDir}" >
                        <manifest>
                                <attribute name="Main-Class"
value="${pkgPath}${mainClass}"/>
                        </manifest>
                </jar>
        </target>

</project>
[thufir@localhost java]$ cat properties.xml
<project name="properties">
        <property name="outputDir" value="/home/thufir/java/bin/" />
        <property name="sourceDir" value="/home/thufir/java/src/" />
        <property name="mainClass" value="Test16" />
        <property name="pkgPath" value="atreides.tidyXhtml." />
        <property name="includeJar" value="/home/thufir/java/lib/Tidy.jar" />
        <property name="user.name" value="thufir" />
</project>
[thufir@localhost java]$



thanks,

Thufir

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message