Changeset 23571 in osm for applications/editors/josm/plugins/turnrestrictions/build.xml
- Timestamp:
- 2010-10-12T16:31:47+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/turnrestrictions/build.xml
r23559 r23571 39 39 ** should not be necessary to change the following properties 40 40 --> 41 <property name="josm" location="../../core/dist/josm-custom.jar"/>42 <property name="plugin.build.dir" value="build"/>43 <property name="plugin.src.dir" value="src"/>41 <property name="josm" location="../../core/dist/josm-custom.jar" /> 42 <property name="plugin.build.dir" value="build" /> 43 <property name="plugin.src.dir" value="src" /> 44 44 <!-- this is the directory where the plugin jar is copied to --> 45 <property name="plugin.dist.dir" value="dist"/>46 <property name="ant.build.javac.target" value="1.6" />47 <property name="plugin.jar" value="../../dist/${ant.project.name}.jar"/>48 <property name="test.build.dir"value="test/build" />45 <property name="plugin.dist.dir" value="dist" /> 46 <property name="ant.build.javac.target" value="1.6" /> 47 <property name="plugin.jar" value="../../dist/${ant.project.name}.jar" /> 48 <property name="test.build.dir" value="test/build" /> 49 49 <!-- 50 50 ********************************************************** … … 53 53 --> 54 54 <target name="init"> 55 <mkdir dir="${plugin.build.dir}" />56 <mkdir dir="${test.build.dir}" />55 <mkdir dir="${plugin.build.dir}" /> 56 <mkdir dir="${test.build.dir}" /> 57 57 </target> 58 58 … … 63 63 --> 64 64 <target name="compile" depends="init"> 65 <echo message="compiling sources for ${plugin.jar} ... " />65 <echo message="compiling sources for ${plugin.jar} ... " /> 66 66 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}"> 67 <compilerarg value="-Xlint:deprecation" />68 <compilerarg value="-Xlint:unchecked" />67 <compilerarg value="-Xlint:deprecation" /> 68 <compilerarg value="-Xlint:unchecked" /> 69 69 </javac> 70 70 </target> … … 76 76 --> 77 77 <target name="dist" depends="compile,revision"> 78 <echo message="creating ${ant.project.name}.jar ... " />78 <echo message="creating ${ant.project.name}.jar ... " /> 79 79 <copy todir="${plugin.build.dir}/resources"> 80 <fileset dir="resources" />80 <fileset dir="resources" /> 81 81 </copy> 82 82 <copy todir="${plugin.build.dir}/images"> 83 <fileset dir="images" />83 <fileset dir="images" /> 84 84 </copy> 85 85 <copy todir="${plugin.build.dir}"> … … 99 99 --> 100 100 <manifest> 101 <attribute name="Author" value="Karl Guggisberg" />102 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionsPlugin" />103 <attribute name="Plugin-Date" value="${version.entry.commit.date}" />104 <attribute name="Plugin-Description" value="The turnrestrictions plugin allows to enter maintain information about turn restrictions in the OpenStreetMap database." />105 <attribute name="Plugin-Icon" value="images/preferences/turnrestrictions.png" />106 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/turnrestrictions" />107 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" />108 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" />101 <attribute name="Author" value="Karl Guggisberg" /> 102 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionsPlugin" /> 103 <attribute name="Plugin-Date" value="${version.entry.commit.date}" /> 104 <attribute name="Plugin-Description" value="The turnrestrictions plugin allows to enter maintain information about turn restrictions in the OpenStreetMap database." /> 105 <attribute name="Plugin-Icon" value="images/preferences/turnrestrictions.png" /> 106 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/turnrestrictions" /> 107 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" /> 108 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" /> 109 109 </manifest> 110 110 </jar> … … 121 121 122 122 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 123 <env key="LANG" value="C" />124 <arg value="info" />125 <arg value="--xml" />126 <arg value="." />127 </exec> 128 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true" />129 <delete file="REVISION" />123 <env key="LANG" value="C" /> 124 <arg value="info" /> 125 <arg value="--xml" /> 126 <arg value="." /> 127 </exec> 128 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true" /> 129 <delete file="REVISION" /> 130 130 </target> 131 131 … … 136 136 --> 137 137 <target name="clean"> 138 <delete dir="${plugin.build.dir}" />139 <delete file="${plugin.jar}" />138 <delete dir="${plugin.build.dir}" /> 139 <delete file="${plugin.jar}" /> 140 140 </target> 141 141 … … 146 146 --> 147 147 <target name="install" depends="dist"> 148 <property environment="env" />148 <property environment="env" /> 149 149 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins"> 150 150 <and> 151 <os family="windows" />151 <os family="windows" /> 152 152 </and> 153 153 </condition> 154 <copy file="${plugin.jar}" todir="${josm.plugins.dir}" />154 <copy file="${plugin.jar}" todir="${josm.plugins.dir}" /> 155 155 </target> 156 156 … … 165 165 <target name="core-info"> 166 166 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false"> 167 <env key="LANG" value="C" />168 <arg value="info" />169 <arg value="--xml" />170 <arg value="../../core" />171 </exec> 172 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true" />167 <env key="LANG" value="C" /> 168 <arg value="info" /> 169 <arg value="--xml" /> 170 <arg value="../../core" /> 171 </exec> 172 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true" /> 173 173 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo> 174 174 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo> … … 182 182 <echo>Commiting the plugin source with message '${commit.message}' ...</echo> 183 183 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 184 <env key="LANG" value="C" />185 <arg value="commit" />186 <arg value="-m '${commit.message}'" />187 <arg value="." />184 <env key="LANG" value="C" /> 185 <arg value="commit" /> 186 <arg value="-m '${commit.message}'" /> 187 <arg value="." /> 188 188 </exec> 189 189 </target> … … 195 195 <echo>Updating plugin source ...</echo> 196 196 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 197 <env key="LANG" value="C" />198 <arg value="up" />199 <arg value="." />197 <env key="LANG" value="C" /> 198 <arg value="up" /> 199 <arg value="." /> 200 200 </exec> 201 201 <echo>Updating ${plugin.jar} ...</echo> 202 202 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 203 <env key="LANG" value="C" />204 <arg value="up" />205 <arg value="../dist/${plugin.jar}" />203 <env key="LANG" value="C" /> 204 <arg value="up" /> 205 <arg value="../dist/${plugin.jar}" /> 206 206 </exec> 207 207 </target> … … 222 222 </echo> 223 223 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 224 <env key="LANG" value="C" />225 <arg value="-m '${commit.message}'" />226 <arg value="commit" />227 <arg value="${plugin.jar}" />224 <env key="LANG" value="C" /> 225 <arg value="-m '${commit.message}'" /> 226 <arg value="commit" /> 227 <arg value="${plugin.jar}" /> 228 228 </exec> 229 229 </target> … … 261 261 262 262 <path id="groovy.path"> 263 <pathelement location="${eclipse.plugin.dir}/org.codehaus.groovy_1.7.5.xx-20100926-2000-e36-RC1\lib\groovy-all-1.7.5.jar" />263 <pathelement location="${eclipse.plugin.dir}/org.codehaus.groovy_1.7.5.xx-20100926-2000-e36-RC1\lib\groovy-all-1.7.5.jar" /> 264 264 </path> 265 265 … … 269 269 270 270 <path id="test.class.path"> 271 <pathelement location="${josm}" />271 <pathelement location="${josm}" /> 272 272 <pathelement location="${plugin.build.dir}" /> 273 <path refid="groovy.path" />274 <path refid="junit.path" />273 <path refid="groovy.path" /> 274 <path refid="junit.path" /> 275 275 </path> 276 276 … … 287 287 288 288 <target name="test-clean"> 289 <delete dir="${test.build.dir}" />290 <mkdir dir="${test.build.dir}" />291 289 <delete dir="${test.build.dir}" /> 290 <mkdir dir="${test.build.dir}" /> 291 </target> 292 292 293 293 <target name="test-compile" depends="compile,test-clean" description="Compiles the test files"> 294 294 295 <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="groovy.path" />296 297 <echo message="compiling java test cases for ${plugin.jar} ... "/>298 <javac srcdir="test/src" classpathref="test.class.path" debug="true" destdir="${test.build.dir}">299 <compilerarg value="-Xlint:deprecation"/>300 <compilerarg value="-Xlint:unchecked"/>301 302 303 <echo message="compiling groovy test cases for ${plugin.jar} ... " />295 <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="groovy.path" /> 296 297 <echo message="compiling test infrastructor for ${plugin.jar} ... " /> 298 <javac srcdir="test/src" classpathref="test.class.path" debug="true" destdir="${test.build.dir}" includes="org/openstreetmap/josm/plugins/turnrestrictions/fixtures/**/*"> 299 <compilerarg value="-Xlint:deprecation" /> 300 <compilerarg value="-Xlint:unchecked" /> 301 </javac> 302 303 <echo message="compiling groovy test cases for ${plugin.jar} ... " /> 304 304 <groovyc srcdir="test/src" destdir="${test.build.dir}" classpathref="groovyc.path"> 305 305 </groovyc> 306 307 <echo message="compiling java test cases for ${plugin.jar} ... " /> 308 <javac srcdir="test/src" classpathref="test.class.path" debug="true" destdir="${test.build.dir}"> 309 <compilerarg value="-Xlint:deprecation" /> 310 <compilerarg value="-Xlint:unchecked" /> 311 </javac> 306 312 </target> 307 313 308 314 <target name="test-run" depends="test-compile" description="Runs the junit tests"> 309 <delete dir="test/output" />310 <mkdir dir="test/output" />315 <delete dir="test/output" /> 316 <mkdir dir="test/output" /> 311 317 312 318 <junit printsummary="true" failureproperty="junit.failure"> 313 <classpath> 314 <path refid="groovyc.path" /> 315 <pathelement location="test/config"/> <!-- required for test config file --> 316 <pathelement location="."/> <!-- required to load images from subdir 'images/' --> 317 </classpath> 318 319 <test todir="test/output" name='org.openstreetmap.josm.plugins.turnrestrictions.AllUnitTests'> 320 <formatter type="xml"/> 321 </test> 319 <classpath> 320 <path refid="groovyc.path" /> 321 <pathelement location="test/config" /> 322 <!-- required for test config file --> 323 <pathelement location="." /> 324 <!-- required to load images from subdir 'images/' --> 325 </classpath> 326 327 <test todir="test/output" name='org.openstreetmap.josm.plugins.turnrestrictions.AllUnitTests'> 328 <formatter type="xml" /> 329 </test> 322 330 </junit> 323 331 </target>
Note:
See TracChangeset
for help on using the changeset viewer.