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