File:  [Repository] / FM2SQL / build.xml
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Wed Oct 4 12:39:32 2006 UTC (17 years, 7 months ago) by casties
Branches: MAIN
CVS tags: HEAD
more reorganisation and a new build structure with ant

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="build" name="FM2SQL">
    <property environment="env"/>
    <property name="debuglevel" value="source,lines,vars"/>
    <property name="target" value="1.5"/>
    <property name="source" value="1.5"/>
    <path id="FM2SQL.classpath">
        <pathelement location="bin"/>
        <pathelement location="lib/sljc.jar"/>
        <pathelement location="lib/mysql-connector-java-3.0.8-stable-bin.jar"/>
        <pathelement location="lib/JdbcClasses.jar"/>
        <pathelement location="lib/fmpjdbc12.jar"/>
        <pathelement location="lib/postgresql-8.1.jdbc3.jar"/>
    </path>
    <target name="init">
        <mkdir dir="bin"/>
        <copy includeemptydirs="false" todir="bin">
            <fileset dir="src" excludes="**/*.launch, **/*.java"/>
        </copy>
    </target>
    <target name="clean">
        <delete dir="bin"/>
    </target>
    <target depends="clean" name="cleanall"/>
    <target depends="build-subprojects,build-project" name="build"/>
    <target name="build-subprojects"/>
    <target depends="init" name="build-project">
        <echo message="${ant.project.name}: ${ant.file}"/>
        <javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
            <src path="src"/>
            <classpath refid="FM2SQL.classpath"/>
        </javac>
        <!-- Create the time stamp -->
        <tstamp/>
    </target>
    <target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
    <target name="FM2sql">
        <java classname="FM2SQL" failonerror="true" fork="yes">
            <classpath refid="FM2SQL.classpath"/>
        </java>
    </target>
	<target name="dist" depends="build">
	    <!-- Create the distribution directory -->
	    <mkdir dir="dist"/>
		<!-- unjar and add lib files -->
		<unjar dest="bin">
		    <fileset dir="lib">
		        <include name="sljc.jar"/>
		        <include name="JdbcClasses.jar"/>
		        <include name="fmpjdbc12.jar"/>
		        <include name="mysql-connector-java-3.0.8-stable-bin.jar"/>
		        <include name="postgresql-8.1.jdbc3.jar"/>
		    </fileset>
		</unjar>
	    <!-- Put everything in ${build} into the jar file -->
	    <jar jarfile="dist/fm2sql-${DSTAMP}.jar" basedir="bin" 
			manifest="manifest.mf" index="yes"/>
	</target>
</project>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>