1 | <project name="remotecontrol" default="dist" basedir=".">
|
---|
2 | <property name="josm" location="../../core/dist/josm-custom.jar" />
|
---|
3 | <property name="plugin.dist.dir" value="../../dist"/>
|
---|
4 | <property name="plugin.build.dir" value="build"/>
|
---|
5 | <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
|
---|
6 | <property name="ant.build.javac.target" value="1.5"/>
|
---|
7 | <target name="init">
|
---|
8 | <mkdir dir="${plugin.build.dir}"/>
|
---|
9 | </target>
|
---|
10 | <target name="compile" depends="init">
|
---|
11 | <echo message="creating ${plugin.jar}"/>
|
---|
12 | <javac srcdir="src" classpath="${josm}" debug="true" destdir="build">
|
---|
13 | <compilerarg value="-Xlint:deprecation"/>
|
---|
14 | <compilerarg value="-Xlint:unchecked"/>
|
---|
15 | <include name="**/*.java" />
|
---|
16 | </javac>
|
---|
17 | </target>
|
---|
18 | <target name="dist" depends="compile">
|
---|
19 | <copy todir="${plugin.build.dir}/images" >
|
---|
20 | <fileset dir="images" />
|
---|
21 | </copy>
|
---|
22 | <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
|
---|
23 | <env key="LANG" value="C"/>
|
---|
24 | <arg value="info"/>
|
---|
25 | <arg value="--xml"/>
|
---|
26 | <arg value="."/>
|
---|
27 | </exec>
|
---|
28 | <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
|
---|
29 | <delete file="REVISION"/>
|
---|
30 | <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
|
---|
31 | <manifest>
|
---|
32 | <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.remotecontrol.RemoteControlPlugin"/>
|
---|
33 | <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
|
---|
34 | <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
|
---|
35 | <attribute name="Plugin-Description" value="A plugin allowing other applications to send commands to JOSM." />
|
---|
36 | <attribute name="Plugin-Mainversion" value="1180"/>
|
---|
37 | <attribute name="Author" value="Frederik Ramm <frederik@remote.org>"/>
|
---|
38 | </manifest>
|
---|
39 | </jar>
|
---|
40 | </target>
|
---|
41 | <target name="clean">
|
---|
42 | <delete dir="${plugin.build.dir}" />
|
---|
43 | <delete file="${plugin.jar}" />
|
---|
44 | </target>
|
---|
45 | </project>
|
---|