Changeset 28807 in osm for applications/editors/josm/plugins/mapdust/build.xml
- Timestamp:
- 2012-10-14T15:25:54+02:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/mapdust
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapdust
- Property svn:ignore
-
old new 1 1 build 2 doc
-
- Property svn:ignore
-
applications/editors/josm/plugins/mapdust/build.xml
r27852 r28807 4 4 <property name="commit.message" value="MapDust bug reporter plugin"/> 5 5 <property name="plugin.main.version" value="4980"/> 6 <property name="josm" location="../../core/dist/josm-custom.jar"/> 7 <property name="plugin.build.dir" value="build/classes"/> 8 <property name="apidoc.dir" value="build/doc"/> 9 <property name="plugin.src.dir" value="src"/> 10 <property name="plugin.lib.dir" value="lib"/> 11 <property name="plugin.dist.dir" value="../../dist"/> 12 <property name="ant.build.javac.target" value="1.5"/> 13 <property name="plugin.dist.dir" value="../../dist"/> 14 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 6 7 <property name="apidoc.dir" value="doc"/> 8 9 <!-- 10 ********************************************************** 11 ** include targets that all plugins have in common 12 ********************************************************** 13 --> 14 <import file="../build-common.xml"/> 15 15 16 <!-- classpath --> 16 17 <path id="classpath"> … … 18 19 <pathelement path="${josm}"/> 19 20 </path> 20 <!-- clean the build --> 21 <target name="clean"> 22 <delete dir="${plugin.build.dir}"/> 23 <delete file="${plugin.jar}"/> 24 </target> 25 <!-- initialize the build --> 26 <target name="init" depends="clean"> 27 <mkdir dir="${plugin.build.dir}"/> 28 </target> 29 <!-- compiles the sources --> 21 22 <!-- 23 ********************************************************** 24 ** compile - complies the source tree 25 ********************************************************** 26 --> 30 27 <target name="compile" depends="init"> 31 <echo message="compiling sources for ${plugin.jar} ..."/>32 <javac srcdir="src" classpathref="classpath" debug="true" destdir="${plugin.build.dir}" includeantruntime=" true" target="1.5" source="1.5">28 <echo message="compiling sources for ${plugin.jar} ..."/> 29 <javac srcdir="src" classpathref="classpath" debug="true" destdir="${plugin.build.dir}" includeantruntime="false"> 33 30 <compilerarg value="-Xlint:deprecation"/> 34 31 <compilerarg value="-Xlint:unchecked"/> 35 32 </javac> 36 33 </target> 34 35 <target name="clean"> 36 <delete dir="${plugin.build.dir}"/> 37 <delete dir="${apidoc.dir}"/> 38 <delete file="${plugin.jar}"/> 39 </target> 40 37 41 <!-- creates the javadocs --> 38 42 <target name="javadoc"> … … 45 49 </javadoc> 46 50 </target> 47 <!-- revision --> 48 <target name="revision"> 49 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 50 <env key="LANG" value="C"/> 51 <arg value="info"/> 52 <arg value="--xml"/> 53 <arg value="."/> 54 </exec> 55 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/> 56 <delete file="REVISION"/> 57 </target> 51 58 52 <!-- creates the .jar file of the plugin --> 59 53 <target name="dist" depends="compile,revision"> … … 80 74 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.mapdust.MapdustPlugin"/> 81 75 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 82 <attribute name="Plugin-Description" value="The MapDust Plug-In shows the MapDust bug reports on the map. You can create, close,invalidate, re-open and commentbug reports by using this plugin."/>76 <attribute name="Plugin-Description" value="The MapDust Plug-In shows the MapDust bug reports on the map. You can create, close,invalidate, re-open and comment bug reports by using this plugin."/> 83 77 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/MapDust"/> 84 78 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> … … 88 82 </jar> 89 83 </target> 90 <!-- installs the plugin -->91 <target name="install" depends="dist">92 <property environment="env"/>93 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">94 <and>95 <os family="windows"/>96 </and>97 </condition>98 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>99 </target>100 <!-- displays the information about the core josm -->101 <target name="core-info">102 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">103 <env key="LANG" value="C"/>104 <arg value="info"/>105 <arg value="--xml"/>106 <arg value="../../core"/>107 </exec>108 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>109 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>110 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>111 <delete file="core.info.xml"/>112 </target>113 <!-- commits the current sources -->114 <target name="commit-current">115 <echo>Commiting the plugin source with message '${commit.message}' ...</echo>116 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">117 <env key="LANG" value="C"/>118 <arg value="commit"/>119 <arg value="-m '${commit.message}'"/>120 <arg value="."/>121 </exec>122 </target>123 <!-- updates the plugin -->124 <target name="update-current">125 <echo>Updating plugin source ...</echo>126 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">127 <env key="LANG" value="C"/>128 <arg value="up"/>129 <arg value="."/>130 </exec>131 <echo>Updating ${plugin.jar} ...</echo>132 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">133 <env key="LANG" value="C"/>134 <arg value="up"/>135 <arg value="../dist/${plugin.jar}"/>136 </exec>137 </target>138 <!-- commit the .jar of the plugin -->139 <target name="commit-dist">140 <echo>141 ***** Properties of published ${plugin.jar} *****142 Commit message : '${commit.message}'143 Plugin-Mainversion: ${plugin.main.version}144 JOSM build version: ${coreversion.info.entry.revision}145 Plugin-Version : ${version.entry.commit.revision}146 ***** / Properties of published ${plugin.jar} *****147 148 Now commiting ${plugin.jar} ...149 </echo>150 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">151 <env key="LANG" value="C"/>152 <arg value="-m '${commit.message}'"/>153 <arg value="commit"/>154 <arg value="${plugin.jar}"/>155 </exec>156 </target>157 <!-- ** make sure svn is present as a command line tool ** -->158 <target name="ensure-svn-present">159 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">160 <env key="LANG" value="C"/>161 <arg value="--version"/>162 </exec>163 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">164 <!-- return code not set at all? Most likely svn isn't installed -->165 <condition>166 <not>167 <isset property="svn.exit.code"/>168 </not>169 </condition>170 </fail>171 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">172 <!-- error code from SVN? Most likely svn is not what we are looking on this system -->173 <condition>174 <isfailure code="${svn.exit.code}"/>175 </condition>176 </fail>177 </target>178 <!-- publish the plugin -->179 <target name="publish" depends="ensure-svn-present,core-info,commit-current, update-current,clean,dist,commit-dist">180 </target>181 84 </project>
Note:
See TracChangeset
for help on using the changeset viewer.