1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
2 | <project name="orthofoto-bern" default="default">
|
---|
3 | <description>
|
---|
4 |
|
---|
5 | </description>
|
---|
6 |
|
---|
7 | <property name="source.dir" value="${basedir}/src"/>
|
---|
8 | <property name="library.dir" value="${basedir}/lib"/>
|
---|
9 | <property name="build.dir" value="${basedir}/build"/>
|
---|
10 | <property name="build.dir.classes" value="${build.dir}/classes"/>
|
---|
11 | <property name="build.dir.lib" value="${build.dir}/lib"/>
|
---|
12 |
|
---|
13 | <property name="build.number" value="26"/>
|
---|
14 |
|
---|
15 | <path id="javax.servlet.classpath">
|
---|
16 | <fileset dir="${library.dir}" includes="*.jar" />
|
---|
17 | </path>
|
---|
18 |
|
---|
19 | <path id="project.classpath">
|
---|
20 | <path refid="javax.servlet.classpath" />
|
---|
21 | </path>
|
---|
22 |
|
---|
23 | <!-- *********************************************************************************** -->
|
---|
24 | <target name="default" depends="clean,compile,servlet.war" description="description">
|
---|
25 | </target>
|
---|
26 | <!-- *********************************************************************************** -->
|
---|
27 | <target name="init">
|
---|
28 | </target>
|
---|
29 | <!-- *********************************************************************************** -->
|
---|
30 | <target name="clean">
|
---|
31 | <delete dir="${build.dir}"/>
|
---|
32 | <mkdir dir="${build.dir}"/>
|
---|
33 | <mkdir dir="${build.dir.classes}"/>
|
---|
34 | <mkdir dir="${build.dir.lib}"/>
|
---|
35 | </target>
|
---|
36 | <!-- *********************************************************************************** -->
|
---|
37 | <target name="compile">
|
---|
38 | <javac srcdir="${source.dir}"
|
---|
39 | destdir="${build.dir.classes}"
|
---|
40 | classpathref="project.classpath">
|
---|
41 | </javac>
|
---|
42 | </target>
|
---|
43 |
|
---|
44 | <!-- *********************************************************************************** -->
|
---|
45 | <target name="servlet.war" >
|
---|
46 |
|
---|
47 | <tstamp>
|
---|
48 | <format property="timestamp" pattern="yyyy-MM-dd HH:mm:ss"/>
|
---|
49 | </tstamp>
|
---|
50 |
|
---|
51 | <war destfile="${build.dir.lib}/orthofoto-bern-wms-adapter.war"
|
---|
52 | webxml="${basedir}/resources/web.xml">
|
---|
53 | <classes dir="${build.dir.classes}">
|
---|
54 | <include name="ch/guggis/josm/bern/servlet/**/*.class" />
|
---|
55 | </classes>
|
---|
56 | <manifest>
|
---|
57 | <attribute name="Built-By" value="${user.name}"/>
|
---|
58 | <attribute name="Built-On" value="${timestamp}"/>
|
---|
59 | <attribute name="Build-Id" value="${build.number}"/>
|
---|
60 | </manifest>
|
---|
61 | </war>
|
---|
62 | </target>
|
---|
63 |
|
---|
64 | <!-- *********************************************************************************** -->
|
---|
65 | <target name="deploy" depends="init,default">
|
---|
66 | <copy file="${build.dir.lib}/orthofoto-bern-wms-adapter.war" todir="C:\data\projekte\osm\bern-proxy" />
|
---|
67 | </target>
|
---|
68 |
|
---|
69 |
|
---|
70 | <!-- *********************************************************************************** -->
|
---|
71 | <target name="make-distrib" depends="init,default">
|
---|
72 | <mkdir dir="${build.dir}/distrib"/>
|
---|
73 | <mkdir dir="${build.dir}/distrib/orthofoto-bern-wms-adapter-${build.number}"/>
|
---|
74 |
|
---|
75 | <tstamp>
|
---|
76 | <format property="timestamp" pattern="yyyy-MM-dd HH:mm:ss"/>
|
---|
77 | </tstamp>
|
---|
78 |
|
---|
79 | <echo file="VERSION.txt" append="false">
|
---|
80 | Built-On: ${timestamp}
|
---|
81 | Build-ID: ${build.number}
|
---|
82 | </echo>
|
---|
83 |
|
---|
84 | <copy file="${build.dir.lib}/orthofoto-bern-wms-adapter.war" todir="${build.dir}/distrib/orthofoto-bern-wms-adapter-${build.number}" />
|
---|
85 | <copy file="${library.dir}/winstone-0.9.10.jar" todir="${build.dir}/distrib/orthofoto-bern-wms-adapter-${build.number}" />
|
---|
86 | <copy file="${basedir}/README.txt" todir="${build.dir}/distrib/orthofoto-bern-wms-adapter-${build.number}" />
|
---|
87 | <copy file="${basedir}/RELEASE-NOTES.txt" todir="${build.dir}/distrib/orthofoto-bern-wms-adapter-${build.number}" />
|
---|
88 | <copy file="${basedir}/VERSION.txt" todir="${build.dir}/distrib/orthofoto-bern-wms-adapter-${build.number}" />
|
---|
89 |
|
---|
90 | <zip destfile="${basedir}/distrib/orthofoto-bern-wms-adapter-${build.number}.zip">
|
---|
91 | <zipfileset dir="${build.dir}/distrib/orthofoto-bern-wms-adapter-${build.number}" includes="**/*" prefix="orthofoto-bern-wms-adapter-${build.number}"/>
|
---|
92 | </zip>
|
---|
93 |
|
---|
94 | </target>
|
---|
95 | </project>
|
---|