forked from stoicflame/enunciate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-site.xml
executable file
·74 lines (59 loc) · 2.61 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
<?xml version="1.0" encoding="UTF-8"?>
<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>