linamh/dev-java/swtswing/files/build.xml
2016-08-29 15:34:45 +02:00

96 lines
3.1 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project name="swtswing" default="jar" basedir=".">
<description>
The basic runtime tools and interfaces for intarsys components
</description>
<!-- set global properties for this build -->
<property name="user.name" value="SWTSwing"/>
<property name="swtswing.src.dir" location="src/swtswing"/>
<target name="init">
<property file="build.properties" />
<property name="swtswing.build.root" location="${build.dir}/swtswing"/>
<property name="swtswing.build.dir" location="${swtswing.build.root}/build"/>
<property name="swtswing.dist.dir" location="${swtswing.build.root}/dist"/>
<property name="swtswing.javadoc.dir" location="${swtswing.build.root}/javadoc"/>
</target>
<target name="make-structure" depends="init">
<!-- Create the build directory structure used by compile -->
<mkdir dir="${swtswing.build.dir}"/>
<mkdir dir="${swtswing.dist.dir}"/>
<mkdir dir="${swtswing.javadoc.dir}"/>
</target>
<target name="clean" depends="init" description="clean up" >
<!-- Delete the ${dist} directory trees -->
<delete dir="${swtswing.javadoc.dir}"/>
<delete dir="${swtswing.dist.dir}"/>
<delete dir="${swtswing.build.dir}"/>
</target>
<target name="compile" depends="make-structure" description="swtswing compile" >
<!-- Construct classpath -->
<path id="swtswing.classpath">
<!-- <fileset dir="${libs.dir}">
<include name="**/${swtswing.jar.name}.jar"/>
<include name="**/${jna.jar.name}.jar"/>
</fileset> -->
<pathelement path="${swtswing.build.dir}"/>
</path>
<!-- Compile the java code -->
<javac compiler="javac1.6" target="1.6" source="1.6" srcdir="${swtswing.src.dir}" destdir="${swtswing.build.dir}" debug="true" encoding="iso-8859-1">
<classpath refid="swtswing.classpath"/>
</javac>
</target>
<target name="jar" depends="compile" description="generate the distribution" >
<jar jarfile="${swtswing.dist.dir}/${swtswing.jar.name}.jar" basedir="${swtswing.build.dir}">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value=""/>
<!-- <attribute name="Class-Path" value="${swtswing.jar.name}.jar ${jna.jar.name}.jar"/> -->
</manifest>
</jar>
</target>
<!-- Javadoc -->
<target name="javadoc" depends="make-structure">
<javadoc
packagenames="de.intarsys.tools.*"
sourcepath="${swtswing.src.dir}"
destdir="${swtswing.javadoc.dir}"
author="true"
version="true"
use="true"
windowtitle="tools API"
doctitle="tools API" >
<classpath refid="swtswing.classpath"/>
</javadoc>
</target>
<target name="buildZipSrcPackage" depends="javadoc" description="generate build sources zip package" >
<zip destfile="${swtswing.dist.dir}/${swtswing.jar.name}-build-src.zip">
<fileset dir="..">
<include name="swtswing/src/**/*"/>
</fileset>
<fileset dir="${build.dir}">
<include name="swtswing/javadoc/**/*.*"/>
</fileset>
<fileset dir="..">
<include name="swtswing/ant/**/*.*"/>
</fileset>
</zip>
</target>
</project>