Changeset 14003 in osm for applications/editors/josm/plugins/openstreetbugs
- Timestamp:
- 2009-03-08T12:02:49+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/openstreetbugs/build.xml
r12780 r14003 1 1 <project name="openstreetbugs" default="dist" basedir="."> 2 <!-- the path to JOSM source code (project directory) --> 3 <property name="josm.base.dir" value="../../core" /> 4 <property name="josm.dist.dir" value="../../dist" /> 5 <!--a osm file, which will be loaded, when running the test target --> 6 <property name="osmfile" value="/tmp/hoe.osm" /> 7 <!-- compilation properties --> 8 <property name="josm.build.dir" value="${josm.base.dir}/build" /> 9 <property name="josm.home.dir" value="${user.home}/.josm" /> 10 <property name="josm" location="${josm.base.dir}/dist/josm-custom.jar" /> 11 <property name="lib.dir" value="lib" /> 12 <property name="plugin.build.dir" value="build" /> 13 <property name="plugin.name" value="${ant.project.name}" /> 14 <property name="plugin.jar" value="${plugin.build.dir}/${plugin.name}.jar" /> 15 <property name="ant.build.javac.target" value="1.5" /> 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"/> 16 7 <target name="init"> 17 <mkdir dir="${plugin.build.dir}" 8 <mkdir dir="${plugin.build.dir}"/> 18 9 </target> 19 10 <target name="compile" depends="init"> 20 <echo message="creating ${plugin.jar}" /> 21 <javac srcdir="src" classpath="${josm}" destdir="${plugin.build.dir}" debug="true"> 22 <include name="**/*.java" /> 11 <echo message="creating ${plugin.jar}"/> 12 <javac srcdir="src" classpath="${josm}" debug="false" destdir="${plugin.build.dir}"> 13 <compilerarg value="-Xlint:deprecation"/> 14 <compilerarg value="-Xlint:unchecked"/> 23 15 </javac> 24 16 </target> 25 <target name="dist" depends="clean, compile"> 26 <!-- copy images to jar --> 17 <target name="dist" depends="compile,revision"> 27 18 <copy todir="${plugin.build.dir}/images"> 28 <fileset dir="images" 19 <fileset dir="images"/> 29 20 </copy> 21 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 22 <manifest> 23 <attribute name="Author" value="Henrik Niehaus"/> 24 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.osb.OsbPlugin"/> 25 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 26 <attribute name="Plugin-Description" value="Imports issues from OpenStreetBugs"/> 27 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/OpenStreetBugs"/> 28 <attribute name="Plugin-Mainversion" value="1465"/> 29 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 30 </manifest> 31 </jar> 32 </target> 33 <target name="revision"> 30 34 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 31 35 <env key="LANG" value="C"/> … … 36 40 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/> 37 41 <delete file="REVISION"/> 38 <!-- create the jar file -->39 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">40 <manifest>41 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.osb.OsbPlugin" />42 <attribute name="Plugin-Description" value="Imports issues from OpenStreetBugs" />43 <attribute name="Plugin-Date" value="${version.entry.commit.date}" />44 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" />45 <attribute name="Plugin-Mainversion" value="1180"/>46 <attribute name="Author" value="Henrik Niehaus" />47 </manifest>48 </jar>49 <copy todir="${josm.dist.dir}" file="${plugin.jar}" />50 42 </target> 51 <!-- clean target -->52 43 <target name="clean"> 53 <delete dir="build" /> 44 <delete dir="${plugin.build.dir}"/> 45 <delete file="${plugin.jar}"/> 54 46 </target> 55 47 <target name="install" depends="dist"> 56 <condition property="isWindows"> 57 <os family="windows" /> 48 <property environment="env"/> 49 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins"> 50 <and> 51 <os family="windows"/> 52 </and> 58 53 </condition> 59 <condition property="isUnix"> 60 <os family="unix" /> 61 </condition> 62 <antcall target="install_win" /> 63 <antcall target="install_linux" /> 64 </target> 65 <target name="install_win" if="isWindows"> 66 <property environment="env"/> 67 <copy file="${plugin.jar}" todir="${env.APPDATA}/JOSM/plugins" /> 68 </target> 69 <target name="install_linux" if="isUnix"> 70 <copy file="${plugin.jar}" todir="${user.home}/.josm/plugins" /> 71 </target> 72 <target name="test" depends="install"> 73 <java jar="${josm}" fork="true"> 74 <arg value="${osmfile}" /> 75 <jvmarg value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=7777" /> 76 </java> 54 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 77 55 </target> 78 56 </project>
Note:
See TracChangeset
for help on using the changeset viewer.