source: osm/applications/editors/josm/plugins/turnrestrictions/build.xml@ 29909

Last change on this file since 29909 was 29854, checked in by donvip, 11 years ago

[josm_plugins] fix #8987 - bump min JOSM version of nearly all plugins to r6162 + code update/cleanup, fix warnings

  • Property svn:mime-type set to text/xml
File size: 7.0 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<project name="turnrestrictions" default="dist" basedir=".">
3 <!-- enter the SVN commit message -->
4 <property name="commit.message" value="Adapt to JOSM core change (DefaultNameFormatter)"/>
5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
6 <property name="plugin.main.version" value="6162"/>
7
8 <property name="test.build.dir" value="test/build"/>
9 <property name="eclipse.plugin.dir" value="C:\software\eclipse-3.6.1\plugins"/>
10
11 <!--
12 **********************************************************
13 ** include targets that all plugins have in common
14 **********************************************************
15 -->
16 <import file="../build-common.xml"/>
17
18 <!--
19 **********************************************************
20 ** init - initializes the build
21 **********************************************************
22 -->
23 <target name="init">
24 <mkdir dir="${plugin.build.dir}"/>
25 <mkdir dir="${test.build.dir}"/>
26 </target>
27
28 <!--
29 **********************************************************
30 ** clean - clean up the build environment
31 **********************************************************
32 -->
33 <target name="clean">
34 <delete dir="${plugin.build.dir}"/>
35 <delete dir="${test.build.dir}"/>
36 <delete file="${plugin.jar}"/>
37 </target>
38
39 <!--
40 **********************************************************
41 ** dist - creates the plugin jar
42 **********************************************************
43 -->
44 <target name="dist" depends="compile,revision">
45 <echo message="creating ${ant.project.name}.jar ... "/>
46 <copy todir="${plugin.build.dir}/resources">
47 <fileset dir="resources"/>
48 </copy>
49 <copy todir="${plugin.build.dir}/images">
50 <fileset dir="images"/>
51 </copy>
52 <copy todir="${plugin.build.dir}/data">
53 <fileset dir="data"/>
54 </copy>
55 <copy todir="${plugin.build.dir}">
56 <fileset dir=".">
57 <include name="README"/>
58 <include name="LICENSE"/>
59 </fileset>
60 </copy>
61 <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
62 <!--
63 ************************************************
64 ** configure these properties. Most of them will be copied to the plugins
65 ** manifest file. Property values will also show up in the list available
66 ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
67 **
68 ************************************************
69 -->
70 <manifest>
71 <attribute name="Author" value="Karl Guggisberg"/>
72 <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.turnrestrictions.TurnRestrictionsPlugin"/>
73 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
74 <attribute name="Plugin-Description" value="The turnrestrictions plugin allows to enter maintain information about turn restrictions in the OpenStreetMap database."/>
75 <attribute name="Plugin-Icon" value="images/preferences/turnrestrictions.png"/>
76 <attribute name="Plugin-Link" value="http://josm.openstreetmap.de/wiki/Help/Plugin/TurnRestrictions"/>
77 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
78 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
79 </manifest>
80 </jar>
81 </target>
82
83 <!-- ************************************************************************************ -->
84 <!-- * Targets for compiling and running tests -->
85 <!-- ************************************************************************************ -->
86 <path id="groovy.path">
87 <pathelement location="${eclipse.plugin.dir}/org.codehaus.groovy_1.7.5.xx-20100926-2000-e36-RC1\lib\groovy-all-1.7.5.jar"/>
88 </path>
89 <path id="junit.path">
90 <pathelement location="${eclipse.plugin.dir}/org.junit_4.8.1.v4_8_1_v20100427-1100\junit.jar"/>
91 </path>
92 <path id="fest.library.path">
93 <fileset dir="test/lib">
94 <include name="fest-*.jar"/>
95 <include name="jcp-*.jar"/>
96 </fileset>
97 </path>
98 <path id="test.class.path">
99 <pathelement location="${josm}"/>
100 <pathelement location="${plugin.build.dir}"/>
101 <path refid="groovy.path"/>
102 <path refid="junit.path"/>
103 <path refid="fest.library.path"/>
104 </path>
105 <path id="groovyc.path">
106 <path refid="junit.path"/>
107 <path refid="groovy.path"/>
108 <path refid="fest.library.path"/>
109 <pathelement location="${josm}"/>
110 <pathelement location="${test.build.dir}"/>
111 <pathelement location="${plugin.build.dir}"/>
112 <!-- if we didn't explicitly put hamcrest on the class path, groovyc would
113 abort and report it is missing a hamcrest class -->
114 <pathelement location="test/lib/hamcrest-all-1.2.jar"/>
115 </path>
116 <target name="test-clean">
117 <delete dir="${test.build.dir}"/>
118 <mkdir dir="${test.build.dir}"/>
119 </target>
120 <target name="test-compile" depends="compile,test-clean" description="Compiles the test files">
121 <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="groovy.path"/>
122 <echo message="compiling test infrastructor for ${plugin.jar} ... "/>
123 <javac srcdir="test/src" classpathref="test.class.path" debug="true" destdir="${test.build.dir}" includes="org/openstreetmap/josm/plugins/turnrestrictions/fixtures/**/*">
124 <compilerarg value="-Xlint:deprecation"/>
125 <compilerarg value="-Xlint:unchecked"/>
126 </javac>
127 <echo message="compiling groovy test cases for ${plugin.jar} ... "/>
128 <groovyc srcdir="test/src" destdir="${test.build.dir}" classpathref="groovyc.path">
129 </groovyc>
130 <echo message="compiling java test cases for ${plugin.jar} ... "/>
131 <javac srcdir="test/src" classpathref="test.class.path" debug="true" destdir="${test.build.dir}">
132 <compilerarg value="-Xlint:deprecation"/>
133 <compilerarg value="-Xlint:unchecked"/>
134 </javac>
135 </target>
136 <target name="test-run" depends="test-compile" description="Runs the junit tests">
137 <delete dir="test/output"/>
138 <mkdir dir="test/output"/>
139 <junit printsummary="true" failureproperty="junit.failure">
140 <classpath>
141 <path refid="groovyc.path"/>
142 <pathelement location="test/config"/>
143 <!-- required for test config file -->
144 <pathelement location="."/>
145 <!-- required to load images from subdir 'images/' -->
146 </classpath>
147 <test todir="test/output" name="org.openstreetmap.josm.plugins.turnrestrictions.AllUnitTests">
148 <formatter type="xml"/>
149 </test>
150 </junit>
151 </target>
152</project>
Note: See TracBrowser for help on using the repository browser.