L-System/build.xml

52 lines
2.3 KiB
XML

<project name="l-system" default="packaging" basedir=".">
<property name="project.sources.dir" value="src"/>
<property name="project.bin.dir" value="bin"/>
<property name="project.lib.dir" value="lib"/>
<property name="project.resources.dir" value="resources"/>
<path id="project.classpath">
<fileset dir="${project.lib.dir}">
<include name="*/*.jar"/>
</fileset>
<pathelement location="${project.bin.dir}"/>
</path>
<target name="compile" description="Compilation des classes" depends="init">
<javac srcdir="${project.sources.dir}" destdir="${project.bin.dir}" debug="on" optimize="off" deprecation="on" includeantruntime="false">
<classpath refid="project.classpath"/>
</javac>
<copy todir="${basedir}/${project.bin.dir}/${project.resources.dir}">
<fileset dir="${basedir}/${project.resources.dir}">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="init">
<echo message="Initialisation de ${ant.project.name}"/>
<mkdir dir="${basedir}/${project.bin.dir}"/>
</target>
<target name="run" description="execution" depends="compile">
<java classname="lsystem.Main" fork="true">
<jvmarg value="-ea"/>
<jvmarg value="-XX:+UseG1GC"/>
<jvmarg value="-XX:+ParallelRefProcEnabled"/>
<classpath refid="project.classpath"/>
</java>
</target>
<target name="javadoc">
<javadoc sourcepath="src" destdir="doc">
<fileset dir="src" defaultexcludes="yes">
<include name="**"/>
</fileset>
<classpath refid="project.classpath"/>
</javadoc>
</target>
<target name="packaging" depends="compile">
<mkdir dir="${project.bin.dir}/META-INF" />
<mkdir dir="build"/>
<manifest file="${project.bin.dir}/META-INF/MANIFEST.MF">
<attribute name="Class-Path" value="." />
<attribute name="Main-Class" value="lsystem.Main" />
<attribute name="Built-By" value="${user.name} with Apache Ant"/>
</manifest>
<jar jarfile="build/l-system.jar" basedir="${project.bin.dir}" manifest="${project.bin.dir}/META-INF/MANIFEST.MF"/>
</target>
</project>