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