Changeset 30131 in osm for applications/editors/josm/plugins/livegps
- Timestamp:
- 2013-12-17T15:58:32+01:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/livegps
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/livegps/build.xml
r29854 r30131 2 2 <project name="livegps" default="dist" basedir="."> 3 3 <property name="commit.message" value="Changed the constructor signature of the plugin main class"/> 4 <property name="plugin.main.version" value="6162"/> 5 <!-- 6 ************************************************ 7 ** should not be necessary to change the following properties 8 --> 9 <property name="josm" location="../../core/dist/josm-custom.jar"/> 10 <property name="plugin.dist.dir" value="../../dist"/> 11 <property name="plugin.build.dir" value="build"/> 12 <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/> 13 <property name="ant.build.javac.target" value="1.6"/> 14 <target name="init"> 15 <mkdir dir="${plugin.build.dir}"/> 16 </target> 17 <target name="compile" depends="init"> 18 <echo message="creating ${plugin.jar}"/> 19 <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}"> 20 <compilerarg value="-Xlint:deprecation"/> 21 <compilerarg value="-Xlint:unchecked"/> 22 </javac> 23 </target> 24 <target name="dist" depends="compile,revision"> 25 <copy todir="${plugin.build.dir}/images"> 26 <fileset dir="images"/> 27 </copy> 28 <copy todir="${plugin.build.dir}/data"> 29 <fileset dir="data"/> 30 </copy> 31 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 32 <manifest> 33 <attribute name="Author" value="Frederik Ramm"/> 34 <attribute name="Plugin-Class" value="livegps.LiveGpsPlugin"/> 35 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 36 <attribute name="Plugin-Description" value="Support live GPS input (moving dot) through a connection to gpsd server."/> 37 <attribute name="Plugin-Icon" value="images/dialogs/livegps.png"/> 38 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/LiveGPS"/> 39 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 40 <attribute name="Plugin-Stage" value="50"/> 41 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 42 </manifest> 43 </jar> 44 </target> 45 <target name="revision"> 46 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 47 <env key="LANG" value="C"/> 48 <arg value="info"/> 49 <arg value="--xml"/> 50 <arg value="."/> 51 </exec> 52 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/> 53 <delete file="REVISION"/> 54 </target> 55 <target name="clean"> 56 <delete dir="${plugin.build.dir}"/> 57 <delete file="${plugin.jar}"/> 58 </target> 59 <target name="install" depends="dist"> 60 <property environment="env"/> 61 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins"> 62 <and> 63 <os family="windows"/> 64 </and> 65 </condition> 66 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 67 </target> 68 <!-- 69 ************************** Publishing the plugin *********************************** 70 --> 71 <!-- 72 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 73 ** property ${coreversion.info.entry.revision} 74 ** 75 --> 76 <target name="core-info"> 77 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false"> 78 <env key="LANG" value="C"/> 79 <arg value="info"/> 80 <arg value="--xml"/> 81 <arg value="../../core"/> 82 </exec> 83 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/> 84 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo> 85 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo> 86 <delete file="core.info.xml"/> 87 </target> 88 <!-- 89 ** commits the source tree for this plugin 90 --> 91 <target name="commit-current"> 92 <echo>Commiting the plugin source with message '${commit.message}' ...</echo> 93 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 94 <env key="LANG" value="C"/> 95 <arg value="commit"/> 96 <arg value="-m '${commit.message}'"/> 97 <arg value="."/> 98 </exec> 99 </target> 100 <!-- 101 ** updates (svn up) the source tree for this plugin 102 --> 103 <target name="update-current"> 104 <echo>Updating plugin source ...</echo> 105 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 106 <env key="LANG" value="C"/> 107 <arg value="up"/> 108 <arg value="."/> 109 </exec> 110 <echo>Updating ${plugin.jar} ...</echo> 111 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 112 <env key="LANG" value="C"/> 113 <arg value="up"/> 114 <arg value="../dist/${plugin.jar}"/> 115 </exec> 116 </target> 117 <!-- 118 ** commits the plugin.jar 119 --> 120 <target name="commit-dist"> 121 <echo> 122 ***** Properties of published ${plugin.jar} ***** 123 Commit message : '${commit.message}' 124 Plugin-Mainversion: ${plugin.main.version} 125 JOSM build version: ${coreversion.info.entry.revision} 126 Plugin-Version : ${version.entry.commit.revision} 127 ***** / Properties of published ${plugin.jar} ***** 4 <property name="plugin.main.version" value="6484"/> 5 6 <!-- Configure these properties (replace "..." accordingly). 7 See http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins 8 --> 9 <property name="plugin.author" value="Frederik Ramm"/> 10 <property name="plugin.class" value="livegps.LiveGpsPlugin"/> 11 <property name="plugin.description" value="Support live GPS input (moving dot) through a connection to gpsd server."/> 12 <property name="plugin.icon" value="images/dialogs/livegps.png"/> 13 <property name="plugin.link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/LiveGPS"/> 14 <property name="plugin.stage" value="50"/> 15 16 <!-- ** include targets that all plugins have in common ** --> 17 <import file="../build-common.xml"/> 128 18 129 Now commiting ${plugin.jar} ...130 </echo>131 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">132 <env key="LANG" value="C"/>133 <arg value="-m '${commit.message}'"/>134 <arg value="commit"/>135 <arg value="${plugin.jar}"/>136 </exec>137 </target>138 <!-- ** make sure svn is present as a command line tool ** -->139 <target name="ensure-svn-present">140 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">141 <env key="LANG" value="C"/>142 <arg value="--version"/>143 </exec>144 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">145 <!-- return code not set at all? Most likely svn isn't installed -->146 <condition>147 <not>148 <isset property="svn.exit.code"/>149 </not>150 </condition>151 </fail>152 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">153 <!-- error code from SVN? Most likely svn is not what we are looking on this system -->154 <condition>155 <isfailure code="${svn.exit.code}"/>156 </condition>157 </fail>158 </target>159 <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">160 </target>161 19 </project>
Note:
See TracChangeset
for help on using the changeset viewer.