Changeset 26174 in osm for applications/editors/josm/plugins/pdfimport
- Timestamp:
- 2011-06-25T19:02:31+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/pdfimport
- Files:
-
- 31 added
- 1 edited
-
build.xml (modified) (2 diffs)
-
data (added)
-
data/ar.lang (added)
-
data/bg.lang (added)
-
data/cs.lang (added)
-
data/da.lang (added)
-
data/de.lang (added)
-
data/el.lang (added)
-
data/en.lang (added)
-
data/en_AU.lang (added)
-
data/en_GB.lang (added)
-
data/es.lang (added)
-
data/et.lang (added)
-
data/eu.lang (added)
-
data/fi.lang (added)
-
data/fr.lang (added)
-
data/gl.lang (added)
-
data/he.lang (added)
-
data/is.lang (added)
-
data/it.lang (added)
-
data/ja.lang (added)
-
data/nb.lang (added)
-
data/nl.lang (added)
-
data/pl.lang (added)
-
data/pt_BR.lang (added)
-
data/ru.lang (added)
-
data/sk.lang (added)
-
data/sv.lang (added)
-
data/tr.lang (added)
-
data/uk.lang (added)
-
data/zh_CN.lang (added)
-
data/zh_TW.lang (added)
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/pdfimport/build.xml
r25260 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 pdfimport plugin. … … 30 30 --> 31 31 <project name="pdfimport" default="dist" basedir="."> 32 33 34 <!-- enter the SVN commit message --> 35 <property name="commit.message" value="Initial pdfimport version" /> 36 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 37 <property name="plugin.main.version" value="3872" /> 38 39 40 <!-- compilation properties --> 41 <property name="josm.build.dir" value="../../core" /> 42 <property name="josm.home.dir" value="${user.home}/.josm" /> 43 <property name="josm" location="../../core/dist/josm-custom.jar" /> 44 <property name="plugin.build.dir" value="build" /> 45 <property name="plugin.dist.dir" value="../../dist" /> 46 <property name="plugin.name" value="${ant.project.name}" /> 47 <property name="libpdf" value="lib/pdfbox.jar"/> 48 <property name="plugin.jar" value="${plugin.dist.dir}/${plugin.name}.jar" /> 49 50 <!-- There's no josm.jar in the svn, so point "josm" to a local copy of your JOSM binary --> 51 <property name="josm" location="../../core/dist/josm-custom.jar" /> 52 53 <property name="ant.build.javac.target" value="1.5" /> 54 55 <target name="init"> 56 <mkdir dir="${plugin.build.dir}"> 57 </mkdir> 58 <mkdir dir="${plugin.dist.dir}"> 59 </mkdir> 60 </target> 61 62 <target name="compile" depends="init"> 63 <echo message="creating ${plugin.jar}" /> 64 <javac srcdir="src" target="1.5" destdir="build" debug="true"> 65 <include name="**/*.java" /> 66 <classpath> 67 <pathelement location="${josm}"/> 68 <pathelement location="${libpdf}"/> 69 </classpath> 70 </javac> 71 </target> 72 73 <target name="revision"> 74 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 75 <env key="LANG" value="C" /> 76 <arg value="info" /> 77 <arg value="--xml" /> 78 <arg value="." /> 79 </exec> 80 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true" /> 81 <delete file="REVISION" /> 82 </target> 83 84 <target name="dist" depends="compile,revision"> 85 <unjar dest="${plugin.build.dir}" src="${libpdf}"/> 86 <copy todir="${plugin.build.dir}/images"> 87 <fileset dir="images" /> 88 </copy> 89 <copy todir="${plugin.build.dir}"> 90 <fileset dir="resources" /> 91 </copy> 92 93 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 94 <manifest> 95 <attribute name="Author" value="extropy" /> 96 <attribute name="Plugin-Class" value="pdfimport.PdfImportPlugin" /> 97 <attribute name="Plugin-Description" value="Import PDF file and convert to ways." /> 98 <attribute name="Plugin-Icon" value="images/pdf_import.png"/> 99 <attribute name="Plugin-Version" value="${version.entry.commit.revision}" /> 100 <attribute name="Plugin-Date" value="${version.entry.commit.date}" /> 101 <attribute name="Plugin-Link" value="http://svn.openstreetmap.org/applications/editors/josm/plugins/pdfimport/" /> 102 <attribute name="Plugin-Mainversion" value="${plugin.main.version}" /> 103 </manifest> 104 </jar> 105 </target> 106 107 <target name="clean"> 108 <delete dir="${plugin.build.dir}" /> 109 <delete file="${plugin.jar}" /> 110 </target> 111 112 <target name="clean_install"> 113 <delete file="${plugins}/pdfimport.jar" /> 114 </target> 115 116 <target name="install" depends="dist"> 117 <property environment="env" /> 118 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins"> 119 <and> 120 <os family="windows" /> 121 </and> 122 </condition> 123 <copy file="${plugin.jar}" todir="${josm.plugins.dir}" /> 124 </target> 125 126 <!-- 127 ************************** Publishing the plugin *********************************** 128 --> 129 <!-- 130 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 131 ** property ${coreversion.info.entry.revision} 132 ** 133 --> 134 <target name="core-info"> 135 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false"> 136 <env key="LANG" value="C" /> 137 <arg value="info" /> 138 <arg value="--xml" /> 139 <arg value="../../core" /> 140 </exec> 141 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true" /> 142 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo> 143 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo> 144 <delete file="core.info.xml" /> 145 </target> 146 147 <!-- 148 ** commits the source tree for this plugin 149 --> 150 <target name="commit-current"> 151 <echo>Commiting the plugin source with message '${commit.message}' ...</echo> 152 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 153 <env key="LANG" value="C" /> 154 <arg value="commit" /> 155 <arg value="-m '${commit.message}'" /> 156 <arg value="." /> 157 </exec> 158 </target> 159 160 <!-- 161 ** updates (svn up) the source tree for this plugin 162 --> 163 <target name="update-current"> 164 <echo>Updating plugin source ...</echo> 165 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 166 <env key="LANG" value="C" /> 167 <arg value="up" /> 168 <arg value="." /> 169 </exec> 170 <echo>Updating ${plugin.jar} ...</echo> 171 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 172 <env key="LANG" value="C" /> 173 <arg value="up" /> 174 <arg value="../dist/${plugin.jar}" /> 175 </exec> 176 </target> 177 178 <!-- 179 ** commits the plugin.jar 180 --> 181 <target name="commit-dist"> 182 <echo> 183 ***** Properties of published ${plugin.jar} ***** 184 Commit message : '${commit.message}' 185 Plugin-Mainversion: ${plugin.main.version} 186 JOSM build version: ${coreversion.info.entry.revision} 187 Plugin-Version : ${version.entry.commit.revision} 188 ***** / Properties of published ${plugin.jar} ***** 189 190 Now commiting ${plugin.jar} ... 191 </echo> 192 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 193 <env key="LANG" value="C" /> 194 <arg value="-m '${commit.message}'" /> 195 <arg value="commit" /> 196 <arg value="${plugin.jar}" /> 197 </exec> 198 </target> 199 200 <!-- ** make sure svn is present as a command line tool ** --> 201 <target name="ensure-svn-present"> 202 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code"> 203 <env key="LANG" value="C" /> 204 <arg value="--version" /> 205 </exec> 206 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system."> 207 <!-- return code not set at all? Most likely svn isn't installed --> 208 <condition> 209 <not> 210 <isset property="svn.exit.code" /> 211 </not> 212 </condition> 213 </fail> 214 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system."> 215 <!-- error code from SVN? Most likely svn is not what we are looking on this system --> 216 <condition> 217 <isfailure code="${svn.exit.code}" /> 218 </condition> 219 </fail> 220 </target> 221 222 <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist"> 223 </target> 224 32 <!-- enter the SVN commit message --> 33 <property name="commit.message" value="Initial pdfimport version"/> 34 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 35 <property name="plugin.main.version" value="3872"/> 36 <!-- compilation properties --> 37 <property name="josm.build.dir" value="../../core"/> 38 <property name="josm.home.dir" value="${user.home}/.josm"/> 39 <property name="josm" location="../../core/dist/josm-custom.jar"/> 40 <property name="plugin.build.dir" value="build"/> 41 <property name="plugin.dist.dir" value="../../dist"/> 42 <property name="plugin.name" value="${ant.project.name}"/> 43 <property name="libpdf" value="lib/pdfbox.jar"/> 44 <property name="plugin.jar" value="${plugin.dist.dir}/${plugin.name}.jar"/> 45 <!-- There's no josm.jar in the svn, so point "josm" to a local copy of your JOSM binary --> 46 <property name="josm" location="../../core/dist/josm-custom.jar"/> 47 <property name="ant.build.javac.target" value="1.5"/> 48 <target name="init"> 49 <mkdir dir="${plugin.build.dir}"> 50 </mkdir> 51 <mkdir dir="${plugin.dist.dir}"> 52 </mkdir> 53 </target> 54 <target name="compile" depends="init"> 55 <echo message="creating ${plugin.jar}"/> 56 <javac srcdir="src" target="1.5" destdir="build" debug="true"> 57 <include name="**/*.java"/> 58 <classpath> 59 <pathelement location="${josm}"/> 60 <pathelement location="${libpdf}"/> 61 </classpath> 62 </javac> 63 </target> 64 <target name="revision"> 65 <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false"> 66 <env key="LANG" value="C"/> 67 <arg value="info"/> 68 <arg value="--xml"/> 69 <arg value="."/> 70 </exec> 71 <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/> 72 <delete file="REVISION"/> 73 </target> 74 <target name="dist" depends="compile,revision"> 75 <unjar dest="${plugin.build.dir}" src="${libpdf}"/> 76 <copy todir="${plugin.build.dir}/images"> 77 <fileset dir="images"/> 78 </copy> 79 <copy todir="${plugin.build.dir}/data"> 80 <fileset dir="data"/> 81 </copy> 82 <copy todir="${plugin.build.dir}"> 83 <fileset dir="resources"/> 84 </copy> 85 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}"> 86 <manifest> 87 <attribute name="Author" value="extropy"/> 88 <attribute name="Plugin-Class" value="pdfimport.PdfImportPlugin"/> 89 <attribute name="Plugin-Description" value="Import PDF file and convert to ways."/> 90 <attribute name="Plugin-Icon" value="images/pdf_import.png"/> 91 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 92 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/> 93 <attribute name="Plugin-Link" value="http://svn.openstreetmap.org/applications/editors/josm/plugins/pdfimport/"/> 94 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 95 </manifest> 96 </jar> 97 </target> 98 <target name="clean"> 99 <delete dir="${plugin.build.dir}"/> 100 <delete file="${plugin.jar}"/> 101 </target> 102 <target name="clean_install"> 103 <delete file="${plugins}/pdfimport.jar"/> 104 </target> 105 <target name="install" depends="dist"> 106 <property environment="env"/> 107 <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins"> 108 <and> 109 <os family="windows"/> 110 </and> 111 </condition> 112 <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/> 113 </target> 114 <!-- 115 ************************** Publishing the plugin *********************************** 116 --> 117 <!-- 118 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 119 ** property ${coreversion.info.entry.revision} 120 ** 121 --> 122 <target name="core-info"> 123 <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false"> 124 <env key="LANG" value="C"/> 125 <arg value="info"/> 126 <arg value="--xml"/> 127 <arg value="../../core"/> 128 </exec> 129 <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/> 130 <echo>Building against core revision ${coreversion.info.entry.revision}.</echo> 131 <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo> 132 <delete file="core.info.xml"/> 133 </target> 134 <!-- 135 ** commits the source tree for this plugin 136 --> 137 <target name="commit-current"> 138 <echo>Commiting the plugin source with message '${commit.message}' ...</echo> 139 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 140 <env key="LANG" value="C"/> 141 <arg value="commit"/> 142 <arg value="-m '${commit.message}'"/> 143 <arg value="."/> 144 </exec> 145 </target> 146 <!-- 147 ** updates (svn up) the source tree for this plugin 148 --> 149 <target name="update-current"> 150 <echo>Updating plugin source ...</echo> 151 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 152 <env key="LANG" value="C"/> 153 <arg value="up"/> 154 <arg value="."/> 155 </exec> 156 <echo>Updating ${plugin.jar} ...</echo> 157 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 158 <env key="LANG" value="C"/> 159 <arg value="up"/> 160 <arg value="../dist/${plugin.jar}"/> 161 </exec> 162 </target> 163 <!-- 164 ** commits the plugin.jar 165 --> 166 <target name="commit-dist"> 167 <echo> 168 ***** Properties of published ${plugin.jar} ***** 169 Commit message : '${commit.message}' 170 Plugin-Mainversion: ${plugin.main.version} 171 JOSM build version: ${coreversion.info.entry.revision} 172 Plugin-Version : ${version.entry.commit.revision} 173 ***** / Properties of published ${plugin.jar} ***** 174 175 Now commiting ${plugin.jar} ... 176 </echo> 177 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false"> 178 <env key="LANG" value="C"/> 179 <arg value="-m '${commit.message}'"/> 180 <arg value="commit"/> 181 <arg value="${plugin.jar}"/> 182 </exec> 183 </target> 184 <!-- ** make sure svn is present as a command line tool ** --> 185 <target name="ensure-svn-present"> 186 <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code"> 187 <env key="LANG" value="C"/> 188 <arg value="--version"/> 189 </exec> 190 <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system."> 191 <!-- return code not set at all? Most likely svn isn't installed --> 192 <condition> 193 <not> 194 <isset property="svn.exit.code"/> 195 </not> 196 </condition> 197 </fail> 198 <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system."> 199 <!-- error code from SVN? Most likely svn is not what we are looking on this system --> 200 <condition> 201 <isfailure code="${svn.exit.code}"/> 202 </condition> 203 </fail> 204 </target> 205 <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist"> 206 </target> 225 207 </project>
Note:
See TracChangeset
for help on using the changeset viewer.
