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