-
Notifications
You must be signed in to change notification settings - Fork 200
/
build-site.xml
executable file
·91 lines (71 loc) · 3.23 KB
/
build-site.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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright © 2006-2016 Web Cohesion (info@webcohesion.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="site" basedir="." xmlns:mvn="urn:maven-artifact-ant">
<!--global references to other modules-->
<property name="lib.dir" value="${basedir}/lib"/>
<property name="docs.dir" value="${basedir}/target/docs"/>
<property name="docs.resources.dir" value="${docs.dir}/resources"/>
<property name="javadoc.dir" value="${docs.dir}/api"/>
<property name="module.docs.dir" value="${docs.dir}"/>
<target name="clean">
<delete dir="target"/>
</target>
<target name="init">
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" loaderref="antlib.loader">
<classpath>
<fileset dir="${lib.dir}/build">
<include name="maven-ant-tasks-*.jar"/>
</fileset>
</classpath>
</typedef>
<mvn:pom id="parent.pom" file="${basedir}/pom.xml"/>
<echo message="Current version is: ${parent.pom.version}"/>
<property name="dist.name" value="enunciate-${parent.pom.version}"/>
<property name="full.sources.jar.name" value="enunciate-full-${parent.pom.version}-sources.jar"/>
<mvn:pom id="top.pom" file="${basedir}/top/pom.xml"/>
<fail message="Top pom version (${top.pom.version}) is not the same as the project pom version (${parent.pom.version}).">
<condition>
<not>
<equals arg1="${top.pom.version}" arg2="${parent.pom.version}"/>
</not>
</condition>
</fail>
<mvn:dependencies sourcesFilesetId="core.sources.fileset" pathId="core.libs.path" filesetId="core.libs.fileset" pomRefId="top.pom"/>
</target>
<target name="full-sources-jar" depends="init" description="Creates the full jar.">
<mkdir dir="target/full-sources"/>
<unzip dest="target/full-sources">
<fileset refid="core.sources.fileset"/>
<patternset>
<include name="**/com/webcohesion/enunciate/**"/>
</patternset>
</unzip>
<jar destfile="target/${full.sources.jar.name}" basedir="target/full-sources"/>
</target>
<target name="copy-dist-libs" depends="init">
<mkdir dir="target/lib"/>
<!--load the maven tasks for handling dependencies-->
<copy todir="target/lib">
<fileset refid="core.libs.fileset"/>
<mapper type="flatten"/>
</copy>
</target>
<target name="dist" depends="copy-dist-libs, full-sources-jar" description="Creates the distribution bundle.">
<!--create the zip dist.-->
<zip destfile="target/${dist.name}.zip">
<zipfileset dir="target/lib" prefix="${dist.name}/lib"/>
<zipfileset dir="target" prefix="${dist.name}" includes="enunciate-full*.jar"/>
</zip>
</target>
</project>