[26174] | 1 | <?xml version="1.0" encoding="utf-8"?>
|
---|
[15166] | 2 | <project name="czechaddress" default="dist" basedir=".">
|
---|
[26174] | 3 | <property name="josm" location="../../core/dist/josm-custom.jar"/>
|
---|
| 4 | <property name="plugin.dist.dir" value="../../dist"/>
|
---|
| 5 | <property name="plugin.build.dir" value="build"/>
|
---|
| 6 | <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
|
---|
| 7 | <property name="plugin.manifest" value="${plugin.build.dir}/org/openstreetmap/josm/plugins/czechaddress/MANIFEST.MF"/>
|
---|
[15166] | 8 | <property name="ant.build.javac.target" value="1.5"/>
|
---|
[15763] | 9 | <target name="clean" description="Removes all build files and the plugins's jar">
|
---|
| 10 | <delete dir="${plugin.build.dir}"/>
|
---|
| 11 | <delete file="${plugin.jar}"/>
|
---|
| 12 | </target>
|
---|
[15166] | 13 | <target name="init">
|
---|
| 14 | <mkdir dir="${plugin.build.dir}"/>
|
---|
[15763] | 15 | <mkdir dir="${plugin.dist.dir}"/>
|
---|
[15166] | 16 | </target>
|
---|
[26174] | 17 | <target name="compile" depends="init,revision" description="Compile the plugin and make it ready for running">
|
---|
| 18 | <javac srcdir="src" classpath="${josm}" debug="true" encoding="utf8" destdir="${plugin.build.dir}">
|
---|
[15707] | 19 | <compilerarg value="-Xlint:deprecation"/>
|
---|
| 20 | <compilerarg value="-Xlint:unchecked"/>
|
---|
| 21 | </javac>
|
---|
[15558] | 22 | <copy todir="${plugin.build.dir}/images">
|
---|
| 23 | <fileset dir="images"/>
|
---|
| 24 | </copy>
|
---|
[26174] | 25 | <copy todir="${plugin.build.dir}/data">
|
---|
| 26 | <fileset dir="data"/>
|
---|
| 27 | </copy>
|
---|
[15763] | 28 | <manifest file="${plugin.manifest}">
|
---|
| 29 | <attribute name="Author" value="Radomír Černoch"/>
|
---|
| 30 | <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.czechaddress.CzechAddressPlugin"/>
|
---|
| 31 | <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
|
---|
| 32 | <attribute name="Plugin-Description" value="Creating and handling address nodes and buildings within Czech Republic."/>
|
---|
[27352] | 33 | <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/CS:JOSM/Plugins/CzechAddress"/>
|
---|
| 34 | <attribute name="Plugin-Icon" value="images/preferences/czech_flag.png"/>
|
---|
[27852] | 35 | <attribute name="Plugin-Mainversion" value="4980"/>
|
---|
[15829] | 36 | <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
|
---|
[15763] | 37 | </manifest>
|
---|
[15166] | 38 | </target>
|
---|
[15763] | 39 | <target name="dist" depends="compile">
|
---|
[26174] | 40 | <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}" manifest="${plugin.build.dir}/org/openstreetmap/josm/plugins/czechaddress/MANIFEST.MF"/>
|
---|
[15763] | 41 | </target>
|
---|
[15707] | 42 | <target name="revision">
|
---|
| 43 | <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
|
---|
| 44 | <env key="LANG" value="C"/>
|
---|
| 45 | <arg value="info"/>
|
---|
| 46 | <arg value="--xml"/>
|
---|
| 47 | <arg value="."/>
|
---|
| 48 | </exec>
|
---|
[26174] | 49 | <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
|
---|
[15707] | 50 | <delete file="REVISION"/>
|
---|
[15558] | 51 | </target>
|
---|
| 52 | <target name="install" depends="dist">
|
---|
| 53 | <property environment="env"/>
|
---|
[26174] | 54 | <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
|
---|
| 55 | <and>
|
---|
| 56 | <os family="windows"/>
|
---|
| 57 | </and>
|
---|
[15558] | 58 | </condition>
|
---|
| 59 | <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
|
---|
| 60 | </target>
|
---|
[15763] | 61 | <target name="run" depends="compile">
|
---|
| 62 | <java classname="JOSM" fork="true">
|
---|
| 63 | <jvmarg value="-Xmx1024m"/>
|
---|
| 64 | <jvmarg value="-Xdebug"/>
|
---|
| 65 | <jvmarg value="-ea"/>
|
---|
[22812] | 66 | <jvmarg value="-Djava.net.useSystemProxies=true"/>
|
---|
[15763] | 67 | <classpath>
|
---|
| 68 | <pathelement location="${plugin.build.dir}"/>
|
---|
| 69 | <pathelement path="${java.class.path}"/>
|
---|
| 70 | </classpath>
|
---|
| 71 | <classpath>
|
---|
| 72 | <pathelement location="${josm}"/>
|
---|
| 73 | <pathelement path="${java.class.path}"/>
|
---|
| 74 | </classpath>
|
---|
| 75 | </java>
|
---|
| 76 | </target>
|
---|
[26174] | 77 | <target name="profile" depends="compile" description="Profile CzechAddress with Netbeans">
|
---|
[18892] | 78 | <fail unless="netbeans.home">
|
---|
| 79 | This target can only run inside the NetBeans IDE.
|
---|
| 80 | </fail>
|
---|
[15763] | 81 | <nbprofiledirect>
|
---|
[18892] | 82 | <classpath>
|
---|
| 83 | <pathelement location="${plugin.build.dir}"/>
|
---|
| 84 | </classpath>
|
---|
[15763] | 85 | </nbprofiledirect>
|
---|
| 86 | <java classname="JOSM" fork="true">
|
---|
| 87 | <jvmarg value="${profiler.info.jvmargs.agent}"/>
|
---|
| 88 | <jvmarg value="-Xmx1024m"/>
|
---|
| 89 | <classpath>
|
---|
| 90 | <pathelement location="${plugin.build.dir}"/>
|
---|
| 91 | <pathelement path="${java.class.path}"/>
|
---|
| 92 | </classpath>
|
---|
| 93 | <classpath>
|
---|
| 94 | <pathelement location="${josm}"/>
|
---|
| 95 | <pathelement path="${java.class.path}"/>
|
---|
| 96 | </classpath>
|
---|
| 97 | </java>
|
---|
| 98 | </target>
|
---|
[26174] | 99 | <target name="debug" depends="compile" description="Debug CzechAddress with Netbeans">
|
---|
| 100 | <nbjpdastart addressproperty="jpda.address" name="czechaddress" transport="dt_socket"/>
|
---|
[18892] | 101 | <java classname="JOSM" fork="true">
|
---|
| 102 | <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
|
---|
| 103 | <jvmarg value="-Xmx1024m"/>
|
---|
| 104 | <jvmarg value="-Xdebug"/>
|
---|
| 105 | <jvmarg value="-ea"/>
|
---|
| 106 | <classpath>
|
---|
| 107 | <pathelement location="${plugin.build.dir}"/>
|
---|
| 108 | <pathelement path="${java.class.path}"/>
|
---|
| 109 | </classpath>
|
---|
| 110 | <classpath>
|
---|
| 111 | <pathelement location="${josm}"/>
|
---|
| 112 | <pathelement path="${java.class.path}"/>
|
---|
| 113 | </classpath>
|
---|
| 114 | </java>
|
---|
| 115 | </target>
|
---|
[15166] | 116 | </project>
|
---|