strolch/build.xml

77 lines
2.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010, 2011
Robert von Burg <eitch@eitchnet.ch>
This file is part of Privilege.
Privilege is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Privilege is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with Privilege. If not, see <http://www.gnu.org/licenses/>.
-->
<project name="Build Jar" default="dist">
<!-- define export names -->
<property name="projectName" value="Privilege" />
<property name="jar" value="${projectName}.jar" />
<!-- define locations -->
<property name="buildFolder" location="${basedir}/bin" />
<property name="distFolder" location="${basedir}/dist" />
<property name="distJar" location="${distFolder}/${jar}" />
<!-- define class path with eclipse plugins -->
<path id="project.class.path">
<pathelement path="${java.class.path}" />
<fileset dir="${basedir}/lib" includes="*.jar" />
</path>
<target name="dist" description="generate the distribution">
<!-- create dist directory if it does not exist -->
<mkdir dir="${distFolder}" />
<!-- compile classes -->
<javac srcdir="${basedir}/src" destdir="${buildFolder}" classpathref="project.class.path" debug="yes" source="1.6" target="1.6" />
<!-- copy resources -->
<copy todir="${buildFolder}">
<fileset dir="${basedir}/src" defaultexcludes="true" />
<!--fileset dir="${basedir}/i18n" defaultexcludes="true" /-->
</copy>
<!-- create the jar -->
<jar jarfile="${distJar}" basedir="${buildFolder}" manifest="${basedir}/MANIFEST.MF">
<fileset dir="${basedir}" defaultexcludes="true" includes="docs/" />
<fileset dir="${basedir}" defaultexcludes="true" includes="config/" />
<fileset dir="${basedir}" defaultexcludes="true" includes="COPYING*" />
<fileset dir="${basedir}" defaultexcludes="true" includes="README" />
</jar>
</target>
<target name="clean" description="generate the distribution">
<!-- clean up old data -->
<delete includeemptydirs="true" verbose="true">
<fileset dir="${distFolder}" includes="**/*" />
<fileset dir="${buildFolder}" includes="**/*" />
</delete>
</target>
</project>