Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 129 lines (96 sloc) 4.193 kb
a9a2f86 @rolfl Update build process to include jdom-contrib artifacts for maven.
rolfl authored
1 <project name="jdom.1.x" default="dist" basedir="." >
c3da430 @rolfl Add new global build.xml file
rolfl authored
2
3 <!-- define Maven coordinates -->
4 <property name="groupId" value="org.jdom" />
5 <property name="artifactId" value="jdom" />
a9a2f86 @rolfl Update build process to include jdom-contrib artifacts for maven.
rolfl authored
6 <property name="version" value="1.SNAPSHOT" />
c3da430 @rolfl Add new global build.xml file
rolfl authored
7
e0d0a7b @rolfl More fiddly settings to get the maven process right, and all the jars
rolfl authored
8 <property name="gpg" value="gpg"
9 description="Path to the GNU gpg program for maven target"/>
10
a9a2f86 @rolfl Update build process to include jdom-contrib artifacts for maven.
rolfl authored
11 <property name="dist" value="dist-${version}" />
c3da430 @rolfl Add new global build.xml file
rolfl authored
12
ed6d24f @rolfl Tidy up the build process for the new directory structures.
rolfl authored
13 <target name="build.core">
e0d0a7b @rolfl More fiddly settings to get the maven process right, and all the jars
rolfl authored
14 <ant dir="core" target="master" >
c3da430 @rolfl Add new global build.xml file
rolfl authored
15 <property name="version" value="${version}"/>
16 </ant>
ed6d24f @rolfl Tidy up the build process for the new directory structures.
rolfl authored
17 </target>
18
19 <target name="build.test">
20 <echo message="Java Version - ${java.version} : Ant Version = ${ant.version}" />
e0d0a7b @rolfl More fiddly settings to get the maven process right, and all the jars
rolfl authored
21 <ant dir="test" target="master" >
c3da430 @rolfl Add new global build.xml file
rolfl authored
22 <property name="version" value="${version}"/>
23 </ant>
ed6d24f @rolfl Tidy up the build process for the new directory structures.
rolfl authored
24 </target>
25
26 <target name="build.contrib">
e0d0a7b @rolfl More fiddly settings to get the maven process right, and all the jars
rolfl authored
27 <ant dir="contrib" target="master" >
c3da430 @rolfl Add new global build.xml file
rolfl authored
28 <property name="version" value="${version}"/>
29 </ant>
30 </target>
ed6d24f @rolfl Tidy up the build process for the new directory structures.
rolfl authored
31
32
33 <target name="build" depends="build.core,build.test,build.contrib" />
c3da430 @rolfl Add new global build.xml file
rolfl authored
34
e0d0a7b @rolfl More fiddly settings to get the maven process right, and all the jars
rolfl authored
35 <target name="clean" description="clean up">
36 <delete dir="${dist}" />
37 </target>
38
39 <target name="dist" depends="clean, build" description="generate the distribution">
c3da430 @rolfl Add new global build.xml file
rolfl authored
40
41 <mkdir dir="${dist}" />
42 <delete dir="${dist}" includes="*.jar"/>
43
44 <copy todir="${dist}">
45 <fileset dir="core/build" includes="*${version}*.jar"/>
46 <fileset dir="test/build" includes="*${version}*.jar"/>
47 <fileset dir="contrib/build" includes="*${version}*.jar"/>
48 </copy>
49
50488df @rolfl Make the build.xml a little friendlier for distribution
rolfl authored
50 <copy todir="${dist}/jdom">
51 <fileset dir="core" excludes="**/classes/** , **/build/src/**" />
52 </copy>
53
54 <copy todir="${dist}/jdom-contrib">
55 <fileset dir="contrib" excludes="**/classes/** , **/build/src/**" />
56 </copy>
57
58 <copy todir="${dist}/jdom-test">
59 <fileset dir="test" excludes="**/classes/** , **/build/src/**" />
60 </copy>
61
62
63 <zip destfile="${dist}/jdom-${version}.zip" >
64 <fileset dir="${dist}" includes="jdom/**" />
65 </zip>
66
67 <zip destfile="${dist}/jdom-contrib-${version}.zip">
68 <fileset dir="${dist}" includes="jdom-contrib/**" />
69 </zip>
70
71 <zip destfile="${dist}/jdom-test-${version}.zip">
72 <fileset dir="${dist}" includes="jdom-test/**" />
73 </zip>
74
75
7031432 @rolfl Make the build.xml compatible with an older Ant version
rolfl authored
76 <tar destfile="${dist}/jdom-${version}.tar.gz"
77 compression="gzip" basedir="${dist}" includes="jdom/**" />
50488df @rolfl Make the build.xml a little friendlier for distribution
rolfl authored
78
7031432 @rolfl Make the build.xml compatible with an older Ant version
rolfl authored
79 <tar destfile="${dist}/jdom-contrib-${version}.tar.gz"
80 compression="gzip" basedir="${dist}" includes="jdom-contrib/**" />
50488df @rolfl Make the build.xml a little friendlier for distribution
rolfl authored
81
7031432 @rolfl Make the build.xml compatible with an older Ant version
rolfl authored
82 <tar destfile="${dist}/jdom-test-${version}.tar.gz"
83 compression="gzip" basedir="${dist}" includes="jdom-test/**" />
50488df @rolfl Make the build.xml a little friendlier for distribution
rolfl authored
84
c3da430 @rolfl Add new global build.xml file
rolfl authored
85 </target>
86
e0d0a7b @rolfl More fiddly settings to get the maven process right, and all the jars
rolfl authored
87 <target name="maven" depends="dist" description="Build a maven bundle">
88 <property name="mavendir" value="${dist}" />
89 <property name="jarbase" value="jdom-${version}" />
90 <!-- copy/rename the pom template -->
91 <copy filtering="true" file="maven.pom" tofile="${dist}/${jarbase}.pom">
92 <filterset>
93 <filter token="artifactID" value="jdom"/>
94 <filter token="version" value="${version}" />
95 <filter token="jdk" value="1.2" />
96 </filterset>
97 </copy>
98
99 <exec dir="${mavendir}" command="${gpg} -abv ${jarbase}.pom"/>
100 <exec dir="${mavendir}" command="${gpg} -abv ${jarbase}.jar"/>
101 <exec dir="${mavendir}" command="${gpg} -abv ${jarbase}-sources.jar"/>
102 <exec dir="${mavendir}" command="${gpg} -abv ${jarbase}-javadoc.jar"/>
103
104 <jar destfile="${mavendir}/${jarbase}-maven-bundle.jar"
105 basedir="${mavendir}"
106 includes="${jarbase}*" excludes="*maven-bundle*" />
107
a9a2f86 @rolfl Update build process to include jdom-contrib artifacts for maven.
rolfl authored
108 <property name="contribbase" value="jdom-contrib-${version}" />
109
110 <copy filtering="true" file="maven-contrib.pom" tofile="${dist}/${contribbase}.pom">
111 <filterset>
112 <filter token="artifactID" value="jdom-contrib"/>
113 <filter token="version" value="${version}" />
114 <filter token="jdk" value="1.2" />
115 </filterset>
116 </copy>
117
118 <exec dir="${mavendir}" command="${gpg} -abv ${contribbase}.pom"/>
119 <exec dir="${mavendir}" command="${gpg} -abv ${contribbase}.jar"/>
120 <exec dir="${mavendir}" command="${gpg} -abv ${contribbase}-sources.jar"/>
121 <exec dir="${mavendir}" command="${gpg} -abv ${contribbase}-javadoc.jar"/>
122
123 <jar destfile="${mavendir}/${contribbase}-maven-bundle.jar"
124 basedir="${mavendir}"
125 includes="${contribbase}*" excludes="*maven-bundle*" />
c3da430 @rolfl Add new global build.xml file
rolfl authored
126 </target>
e0d0a7b @rolfl More fiddly settings to get the maven process right, and all the jars
rolfl authored
127
c3da430 @rolfl Add new global build.xml file
rolfl authored
128
129 </project>
Something went wrong with that request. Please try again.