2011-07-26 00:35:47 +02:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2011-08-07 12:14:40 +02:00
|
|
|
|
|
|
|
<!--
|
|
|
|
|
|
|
|
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/>.
|
|
|
|
|
|
|
|
-->
|
|
|
|
|
2011-07-26 00:35:47 +02:00
|
|
|
<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" />
|
2011-07-26 00:39:19 +02:00
|
|
|
<property name="distFolder" location="${basedir}/dist" />
|
|
|
|
<property name="distJar" location="${distFolder}/${jar}" />
|
2011-07-26 00:42:09 +02:00
|
|
|
|
2011-07-26 00:35:47 +02:00
|
|
|
<!-- 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">
|
2011-07-26 00:42:09 +02:00
|
|
|
|
2011-07-26 00:39:19 +02:00
|
|
|
<!-- create dist directory if it does not exist -->
|
2011-07-26 00:42:09 +02:00
|
|
|
<mkdir dir="${distFolder}" />
|
2011-07-26 00:35:47 +02:00
|
|
|
|
|
|
|
<!-- 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 -->
|
2011-07-27 22:21:17 +02:00
|
|
|
<jar jarfile="${distJar}" basedir="${buildFolder}" manifest="${basedir}/MANIFEST.MF">
|
|
|
|
<fileset dir="${basedir}" defaultexcludes="true" includes="docs/" />
|
|
|
|
<fileset dir="${basedir}" defaultexcludes="true" includes="config/" />
|
2011-08-07 12:14:40 +02:00
|
|
|
<fileset dir="${basedir}" defaultexcludes="true" includes="COPYING*" />
|
2011-11-09 15:05:36 +01:00
|
|
|
<fileset dir="${basedir}" defaultexcludes="true" includes="README" />
|
2011-07-27 22:21:17 +02:00
|
|
|
</jar>
|
2011-07-26 00:35:47 +02:00
|
|
|
|
|
|
|
</target>
|
|
|
|
|
2011-07-26 00:42:09 +02:00
|
|
|
<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>
|
|
|
|
|
2011-07-26 00:35:47 +02:00
|
|
|
</project>
|