Changeset 26174 in osm for applications/editors/josm/plugins/routes
- Timestamp:
- 2011-06-25T19:02:31+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/routes
- Files:
-
- 30 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified applications/editors/josm/plugins/routes/build.xml ¶
r25199 r26174 1 <?xml version="1.0" encoding=" UTF-8"?>1 <?xml version="1.0" encoding="utf-8"?> 2 2 <!-- 3 3 ** This is the build file for the routes plugin … … 26 26 --> 27 27 <project name="routes" default="dist" basedir="."> 28 <property name="commit.message" value="Changed the constructor signature of the plugin main class"/> 29 <property name="plugin.main.version" value="3835"/> 30 <property name="josm" location="../../core/dist/josm-custom.jar"/> 31 <property name="plugin.dist.dir" value="../../dist"/> 32 <property name="plugin.build.dir" value="build"/> 33 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 34 <property name="ant.build.javac.target" value="1.5"/> 35 <target name="init"> 36 <mkdir dir="${plugin.build.dir}"/> 37 </target> 38 <target name="compile" depends="init"> 39 <echo message="creating ${plugin.jar}"/> 40 <javac srcdir="src" debug="true" destdir="${plugin.build.dir}"> 41 <compilerarg value="-Xlint:deprecation"/> 42 <compilerarg value="-Xlint:unchecked"/> 43 <classpath> 44 <pathelement location="${josm}"/> 45 <fileset dir="lib"> 46 <include name="**/*.jar"/> 47 </fileset> 48 </classpath> 49 </javac> 50 <copy file="src/org/openstreetmap/josm/plugins/routes/xml/routes.xml" todir="${plugin.build.dir}/org/openstreetmap/josm/plugins/routes/xml"/> 51 <copy file="src/org/openstreetmap/josm/plugins/routes/xml/routes.xsd" todir="${plugin.build.dir}/org/openstreetmap/josm/plugins/routes/xml"/> 52 </target> 53 <target name="dist" depends="compile,revision"> 54 <copy todir="${plugin.build.dir}/data"> 55 <fileset dir="data"/> 56 </copy> 57 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 58 <zipfileset src="lib/jsr173-1.0_api.jar" includes="**/*"/> 59 <zipfileset src="lib/jaxb-api.jar" includes="**/*"/> 60 <zipfileset src="lib/jaxb-impl.jar" includes="**/*.class"/> 61 <zipfileset src="lib/activation.jar" includes="**/*.class"/> 62 <manifest> 63 <attribute name="Author" value="Jiri Klement"/> 64 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.routes.RoutesPlugin"/> 65 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 66 <attribute name="Plugin-Description" value="Renders routes (bus, hiking trails, bicycle routes, ..). Route types must be defined in routes.xml file in plugin directory"/> 67 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 68 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 69 </manifest> 70 </jar> 71 </target> 72 <target name="revision"> 73 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 74 <env key="LANG" value="C"/> 75 <arg value="info"/> 76 <arg value="--xml"/> 77 <arg value="."/> 78 </exec> 79 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/> 80 <delete file="REVISION"/> 81 </target> 82 <target name="clean"> 83 <delete dir="${plugin.build.dir}"/> 84 <delete file="${plugin.jar}"/> 85 </target> 86 <target name="install" depends="dist"> 87 <property environment="env"/> 88 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins"> 89 <and> 90 <os family="windows"/> 91 </and> 92 </condition> 93 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 94 </target> 95 <!-- 96 ************************** Publishing the plugin *********************************** 97 --> 98 <!-- 99 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 100 ** property ${coreversion.info.entry.revision} 101 ** 102 --> 103 <target name="core-info"> 104 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false"> 105 <env key="LANG" value="C"/> 106 <arg value="info"/> 107 <arg value="--xml"/> 108 <arg value="../../core"/> 109 </exec> 110 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/> 111 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo> 112 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo> 113 <delete file="core.info.xml"/> 114 </target> 115 <!-- 116 ** commits the source tree for this plugin 117 --> 118 <target name="commit-current"> 119 <echo>Commiting the plugin source with message '${commit.message}' ...</echo> 120 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 121 <env key="LANG" value="C"/> 122 <arg value="commit"/> 123 <arg value="-m '${commit.message}'"/> 124 <arg value="."/> 125 </exec> 126 </target> 127 <!-- 128 ** updates (svn up) the source tree for this plugin 129 --> 130 <target name="update-current"> 131 <echo>Updating plugin source ...</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="."/> 136 </exec> 137 <echo>Updating ${plugin.jar} ...</echo> 138 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 139 <env key="LANG" value="C"/> 140 <arg value="up"/> 141 <arg value="../dist/${plugin.jar}"/> 142 </exec> 143 </target> 144 <!-- 145 ** commits the plugin.jar 146 --> 147 <target name="commit-dist"> 148 <echo> 149 ***** Properties of published ${plugin.jar} ***** 150 Commit message : '${commit.message}' 151 Plugin-Mainversion: ${plugin.main.version} 152 JOSM build version: ${coreversion.info.entry.revision} 153 Plugin-Version : ${version.entry.commit.revision} 154 ***** / Properties of published ${plugin.jar} ***** 28 155 29 <property name="commit.message" value="Changed the constructor signature of the plugin main class" /> 30 <property name="plugin.main.version" value="3835" /> 31 32 <property name="josm" location="../../core/dist/josm-custom.jar"/> 33 <property name="plugin.dist.dir" value="../../dist"/> 34 <property name="plugin.build.dir" value="build"/> 35 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 36 <property name="ant.build.javac.target" value="1.5"/> 37 <target name="init"> 38 <mkdir dir="${plugin.build.dir}"/> 39 </target> 40 <target name="compile" depends="init"> 41 <echo message="creating ${plugin.jar}"/> 42 <javac srcdir="src" debug="true" destdir="${plugin.build.dir}"> 43 <compilerarg value="-Xlint:deprecation"/> 44 <compilerarg value="-Xlint:unchecked"/> 45 <classpath> 46 <pathelement location="${josm}"/> 47 <fileset dir="lib"> 48 <include name="**/*.jar"/> 49 </fileset> 50 </classpath> 51 </javac> 52 <copy file="src/org/openstreetmap/josm/plugins/routes/xml/routes.xml" todir="${plugin.build.dir}/org/openstreetmap/josm/plugins/routes/xml"/> 53 <copy file="src/org/openstreetmap/josm/plugins/routes/xml/routes.xsd" todir="${plugin.build.dir}/org/openstreetmap/josm/plugins/routes/xml"/> 54 55 </target> 56 <target name="dist" depends="compile,revision"> 57 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 58 <zipfileset src="lib/jsr173-1.0_api.jar" includes="**/*"/> 59 <zipfileset src="lib/jaxb-api.jar" includes="**/*"/> 60 <zipfileset src="lib/jaxb-impl.jar" includes="**/*.class"/> 61 <zipfileset src="lib/activation.jar" includes="**/*.class"/> 62 <manifest> 63 <attribute name="Author" value="Jiri Klement"/> 64 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.routes.RoutesPlugin"/> 65 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 66 <attribute name="Plugin-Description" value="Renders routes (bus, hiking trails, bicycle routes, ..). Route types must be defined in routes.xml file in plugin directory"/> 67 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 68 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 69 </manifest> 70 </jar> 71 </target> 72 <target name="revision"> 73 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 74 <env key="LANG" value="C"/> 75 <arg value="info"/> 76 <arg value="--xml"/> 77 <arg value="."/> 78 </exec> 79 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/> 80 <delete file="REVISION"/> 81 </target> 82 <target name="clean"> 83 <delete dir="${plugin.build.dir}"/> 84 <delete file="${plugin.jar}"/> 85 </target> 86 <target name="install" depends="dist"> 87 <property environment="env"/> 88 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins"> 89 <and> 90 <os family="windows"/> 91 </and> 92 </condition> 93 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 94 </target> 95 96 97 <!-- 98 ************************** Publishing the plugin *********************************** 99 --> 100 <!-- 101 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 102 ** property ${coreversion.info.entry.revision} 103 ** 104 --> 105 <target name="core-info"> 106 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false"> 107 <env key="LANG" value="C"/> 108 <arg value="info"/> 109 <arg value="--xml"/> 110 <arg value="../../core"/> 111 </exec> 112 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/> 113 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo> 114 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo> 115 <delete file="core.info.xml" /> 116 </target> 117 118 <!-- 119 ** commits the source tree for this plugin 120 --> 121 <target name="commit-current"> 122 <echo>Commiting the plugin source with message '${commit.message}' ...</echo> 123 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 124 <env key="LANG" value="C"/> 125 <arg value="commit"/> 126 <arg value="-m '${commit.message}'"/> 127 <arg value="."/> 128 </exec> 129 </target> 130 131 <!-- 132 ** updates (svn up) the source tree for this plugin 133 --> 134 <target name="update-current"> 135 <echo>Updating plugin source ...</echo> 136 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 137 <env key="LANG" value="C"/> 138 <arg value="up"/> 139 <arg value="."/> 140 </exec> 141 <echo>Updating ${plugin.jar} ...</echo> 142 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 143 <env key="LANG" value="C"/> 144 <arg value="up"/> 145 <arg value="../dist/${plugin.jar}"/> 146 </exec> 147 </target> 148 149 <!-- 150 ** commits the plugin.jar 151 --> 152 <target name="commit-dist"> 153 <echo> 154 ***** Properties of published ${plugin.jar} ***** 155 Commit message : '${commit.message}' 156 Plugin-Mainversion: ${plugin.main.version} 157 JOSM build version: ${coreversion.info.entry.revision} 158 Plugin-Version : ${version.entry.commit.revision} 159 ***** / Properties of published ${plugin.jar} ***** 160 161 Now commiting ${plugin.jar} ... 162 </echo> 163 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 164 <env key="LANG" value="C"/> 165 <arg value="-m '${commit.message}'"/> 166 <arg value="commit"/> 167 <arg value="${plugin.jar}"/> 168 </exec> 169 </target> 170 171 <!-- ** make sure svn is present as a command line tool ** --> 172 <target name="ensure-svn-present"> 173 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code"> 174 <env key="LANG" value="C" /> 175 <arg value="--version" /> 176 </exec> 177 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system."> 178 <!-- return code not set at all? Most likely svn isn't installed --> 179 <condition> 180 <not> 181 <isset property="svn.exit.code" /> 182 </not> 183 </condition> 184 </fail> 185 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system."> 186 <!-- error code from SVN? Most likely svn is not what we are looking on this system --> 187 <condition> 188 <isfailure code="${svn.exit.code}" /> 189 </condition> 190 </fail> 191 </target> 192 193 <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist"> 194 </target> 156 Now commiting ${plugin.jar} ... 157 </echo> 158 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 159 <env key="LANG" value="C"/> 160 <arg value="-m '${commit.message}'"/> 161 <arg value="commit"/> 162 <arg value="${plugin.jar}"/> 163 </exec> 164 </target> 165 <!-- ** make sure svn is present as a command line tool ** --> 166 <target name="ensure-svn-present"> 167 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code"> 168 <env key="LANG" value="C"/> 169 <arg value="--version"/> 170 </exec> 171 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system."> 172 <!-- return code not set at all? Most likely svn isn't installed --> 173 <condition> 174 <not> 175 <isset property="svn.exit.code"/> 176 </not> 177 </condition> 178 </fail> 179 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system."> 180 <!-- error code from SVN? Most likely svn is not what we are looking on this system --> 181 <condition> 182 <isfailure code="${svn.exit.code}"/> 183 </condition> 184 </fail> 185 </target> 186 <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist"> 187 </target> 195 188 </project>
Note:
See TracChangeset
for help on using the changeset viewer.