source: subversion/applications/editors/josm/plugins/terracer/build.xml @ 13554

Last change on this file since 13554 was 13554, checked in by zere, 11 years ago

Fixed versioning in build.xml

File size: 2.3 KB
Line 
1<project name="terracer" default="dist" basedir=".">
2<!-- compilation properties -->
3    <property name="josm.build.dir"   value="../../core"/>
4    <property name="josm.home.dir"    value="${user.home}/.josm"/>
5    <property name="josm"         location="../../core/dist/josm-custom.jar" />
6    <property name="plugin.build.dir" value="build"/>
7    <property name="plugin.dist.dir"  value="../../dist"/>
8    <property name="plugin.name"      value="${ant.project.name}"/>
9    <property name="plugin.jar"       value="../../dist/${plugin.name}.jar"/>
10<!-- point to your JOSM directory -->
11    <property name="josm" location="${josm.build.dir}/dist/josm-custom.jar" />
12    <property name="ant.build.javac.target" value="1.5"/>
13    <target name="init">
14        <mkdir dir="build"></mkdir>
15        <mkdir dir="dist"></mkdir>
16    </target>
17    <target name="compile" depends="init">
18        <echo message="creating ${plugin.jar}"/>
19        <javac srcdir="src" classpath="${josm}" debug="true" destdir="build">
20            <compilerarg value="-Xlint:deprecation"/>
21            <compilerarg value="-Xlint:unchecked"/>
22            <include name="**/*.java" />
23        </javac>
24    </target>
25    <target name="dist" depends="compile">
26        <copy todir="build/images" >
27            <fileset dir="images" />
28        </copy>
29        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
30            <env key="LANG" value="C"/>
31            <arg value="info"/>
32            <arg value="--xml"/>
33            <arg value="."/>
34        </exec>
35        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
36        <delete file="REVISION"/>
37        <jar destfile="${plugin.jar}" basedir="build">
38            <manifest>
39                <attribute name="Plugin-Class" value="terracer.TerracerPlugin" />
40                <attribute name="Plugin-Description" value="Easy creation of individual terraced houses." />
41                <attribute name="Plugin-Version" value="${version.entry.commit.revision}" />
42            </manifest>
43        </jar>
44    </target>
45    <target name="clean">
46        <delete dir="${plugin.build.dir}" />
47        <delete file="${plugin.jar}" />
48    </target>
49    <target name="install" depends="dist">
50        <copy file="${plugin.jar}" todir="${user.home}/.josm/plugins"/>
51    </target>
52</project>
Note: See TracBrowser for help on using the repository browser.