Last change
on this file since 4468 was 4024, checked in by frsantos, 18 years ago |
Store version and build date in jar Manifest instead of REVISION file
|
File size:
1.6 KB
|
Rev | Line | |
---|
[2453] | 1 | <project name="validator" default="build" basedir=".">
|
---|
| 2 |
|
---|
| 3 | <!-- point to your JOSM directory -->
|
---|
[2842] | 4 | <property name="josm" location="../../core/dist/josm-custom.jar" />
|
---|
[2453] | 5 |
|
---|
| 6 |
|
---|
| 7 |
|
---|
| 8 | <target name="init">
|
---|
| 9 | <mkdir dir="build"/>
|
---|
| 10 | </target>
|
---|
| 11 |
|
---|
| 12 | <target name="compile" depends="init">
|
---|
| 13 | <javac srcdir="src" classpath="${josm}" destdir="build" debug="true">
|
---|
| 14 | <include name="**/*.java" />
|
---|
| 15 | </javac>
|
---|
| 16 | </target>
|
---|
| 17 |
|
---|
| 18 | <target name="build" depends="clean, compile">
|
---|
| 19 | <copy todir="build/images">
|
---|
| 20 | <fileset dir="images"/>
|
---|
| 21 | </copy>
|
---|
[4024] | 22 | <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
|
---|
[2845] | 23 | <env key="LANG" value="C"/>
|
---|
| 24 | <arg value="info"/>
|
---|
[4024] | 25 | <arg value="--xml"/>
|
---|
[2845] | 26 | <arg value="."/>
|
---|
| 27 | </exec>
|
---|
[4024] | 28 | <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
|
---|
| 29 | <delete file="REVISION"/>
|
---|
[2453] | 30 | <jar destfile="validator.jar" basedir="build">
|
---|
| 31 | <manifest>
|
---|
| 32 | <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.validator.OSMValidatorPlugin"/>
|
---|
| 33 | <attribute name="Plugin-Description" value="A OSM data validator"/>
|
---|
[4024] | 34 | <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
|
---|
| 35 | <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
|
---|
[2453] | 36 | <attribute name="Author" value="Francisco R. Santos <frsantos@gmail.com>"/>
|
---|
| 37 | </manifest>
|
---|
| 38 | </jar>
|
---|
| 39 | </target>
|
---|
| 40 |
|
---|
| 41 | <target name="clean">
|
---|
| 42 | <delete dir="build" />
|
---|
| 43 | </target>
|
---|
| 44 |
|
---|
| 45 | <target name="install" depends="build">
|
---|
| 46 | <copy file="validator.jar" todir="${user.home}/.josm/plugins"/>
|
---|
| 47 | </target>
|
---|
| 48 |
|
---|
| 49 | <target name="test" depends="install">
|
---|
| 50 | <java jar="${josm}" fork="true">
|
---|
| 51 | </java>
|
---|
| 52 | </target>
|
---|
| 53 | </project>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.