-
Notifications
You must be signed in to change notification settings - Fork 3
/
build1.xml
100 lines (86 loc) · 4.5 KB
/
build1.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?xml version="1.0" encoding="UTF-8"?>
<project name="josm-conflation-plugin" default="dist" basedir=".">
<property name="ant.build.javac.target" value="1.7"/>
<property name="ant.build.javac.source" value="1.7"/>
<property name="plugin.build.dir" value="build" />
<property name="plugin.src.dir" value="src" />
<property name="plugin.dist.dir" value="../../dist" />
<property name="plugin.jar" value="${plugin.dist.dir}/conflation.jar" />
<property name="josm" location="../../dist/josm-custom.jar"/>
<property name="jts.plugin.jar" location="${plugin.dist.dir}/jts.jar"/>
<property name="utilsplugin2.plugin.jar" location="${plugin.dist.dir}/utilsplugin2.jar"/>
<target name="init">
<available file="build.properties" property="build.properties.present" />
<fail unless="build.properties.present">**
** Property file 'build.properties' doesn't exist.
** Create a copy from 'build.properties.template' and update the properties
** according to your local environment.
</fail>
<property file="build.properties" />
<path id="compile.path">
<pathelement location="${josm}" />
<pathelement location="${jts.plugin.jar}"/>
<pathelement location="${utilsplugin2.plugin.jar}"/>
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
<mkdir dir="${plugin.build.dir}" />
</target>
<target name="compile" depends="init">
<echo message="compiling sources for ${plugin.jar} ... " />
<echo>Classpath includes ${josm}</echo>
<echo>Classpath includes ${jts.plugin.jar}</echo>
<echo>Classpath includes ${utilsplugin2.plugin.jar}</echo>
<javac srcdir="src" classpathref="compile.path" debug="true" destdir="${plugin.build.dir}" includeantruntime="false" encoding="UTF-8">
<compilerarg value="-Xlint:deprecation" />
<compilerarg value="-Xlint:unchecked" />
</javac>
</target>
<target name="dist" depends="clean,init,compile" description="Create the plugin jar">
<tstamp>
<format property="plugin.build.date" pattern="yyyy-MM-dd hh:mm aa" />
</tstamp>
<copy todir="${plugin.build.dir}/images">
<fileset dir="images">
<include name="**/*.png" />
</fileset>
</copy>
<copy todir="${plugin.build.dir}">
<fileset dir=".">
<include name="README" />
<include name="LICENSE" />
<include name="README.*" />
<include name="LICENSE.*" />
</fileset>
<zipfileset src="lib/miglayout-4.0-swing.jar"/>
</copy>
<jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
<manifest>
<attribute name="Author" value="Josh Doe" />
<attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.conflation.ConflationPlugin" />
<attribute name="Plugin-Date" value="${plugin.build.date}" />
<attribute name="Plugin-Description" value="(Warning: Experimental!) Tool for conflating (merging) data." />
<attribute name="Plugin-Icon" value="images/dialogs/conflation.png"/>
<attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/Conflation" />
<attribute name="Plugin-Mainversion" value="${josm.required.version}" />
<attribute name="Plugin-Requires" value="jts;utilsplugin2"/>
<attribute name="Plugin-Version" value="${plugin.version}" />
</manifest>
</jar>
</target>
<target name="clean" description="Clean the build environment">
<delete dir="${plugin.build.dir}" />
</target>
<target name="osm-svn-install" depends="">
<echo>Installing the plugin in ${local.osm.svn.path}</echo>
<copy file="${plugin.jar}" todir="${local.osm.svn.path}" />
</target>
<!-- ************************************************************************************ -->
<!-- * Targets for compiling and running tests -->
<!-- ************************************************************************************ -->
<target name="dev-install" depends="dist">
<echo>Installing the plugin in ${local.install.path}</echo>
<copy file="${plugin.jar}" todir="${local.install.path}" />
</target>
</project>