forked from omnifaces/omnifaces
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
122 lines (89 loc) · 3.18 KB
/
build.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE project>
<!--
OmniFaces ANT Build file
-->
<project name="OmniFaces" default="all" basedir=".">
<!-- Properties -->
<property name="version" value="1.8-SNAPSHOT" />
<property name="artifactId" value="omnifaces" />
<tstamp>
<format property="DATE_SHORT" pattern="yyyyMMdd" />
</tstamp>
<tstamp>
<format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<condition property="VERSION" value="${version}-${DATE_SHORT}">
<isset property="maven" />
</condition>
<property name="VERSION" value="${version}" />
<path id="common.classpath">
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
<!-- Define artifacts' name, which follows the convention of Maven -->
<property name="implementation-jar" value="dist/${artifactId}-${VERSION}.jar" />
<property name="sources-jar" value="dist/${artifactId}-${VERSION}-src.jar" />
<property name="javadoc-jar" value="dist/${artifactId}-${VERSION}-javadoc.jar" />
<!-- Implementation targets -->
<target name="compile-impl">
<mkdir dir="build/classes" />
<javac srcdir="src" destdir="build/classes" includeantruntime="false" source="1.6" target="1.6" debug="true">
<classpath refid="common.classpath" />
</javac>
<copy todir="build/classes">
<fileset dir="src" excludes="**/*.java" />
</copy>
</target>
<target name="jar-impl" depends="compile-impl">
<mkdir dir="dist" />
<jar destfile="${implementation-jar}" basedir="build/classes" excludes="**/*.jsfdia">
<manifest>
<attribute name="Specification-Title" value="OmniFaces" />
<attribute name="Specification-Vendor" value="OmniFaces" />
<attribute name="Specification-Version" value="${VERSION}" />
<attribute name="Implementation-Vendor" value="OmniFaces" />
<attribute name="Implementation-Title" value="OmniFaces" />
<attribute name="Implementation-Version" value="${VERSION}" />
<attribute name="Implementation-URL" value="http://omnifaces.org" />
<attribute name="Built-Date" value="${TODAY}" />
</manifest>
</jar>
</target>
<!-- Source attachment targets -->
<target name="jar-src">
<mkdir dir="dist" />
<jar destfile="${sources-jar}" basedir="src" excludes="**/*.jsfdia"/>
</target>
<!-- Javadoc targets -->
<target name="javadoc-uptodate">
<uptodate property="javadoc.is.uptodate" targetfile="build/javadoc/index.html">
<srcfiles dir="src">
<include name="**/*.java" />
</srcfiles>
</uptodate>
</target>
<target name="compile-javadoc" depends="javadoc-uptodate" unless="javadoc.is.uptodate">
<mkdir dir="build/javadoc" />
<javadoc sourcepath="src" destdir="build/javadoc" >
<classpath refid="common.classpath" />
</javadoc>
<jar jarfile="${javadoc-jar}">
<fileset dir="build/javadoc" />
</jar>
</target>
<target name="jar-javadoc" depends="compile-javadoc">
<mkdir dir="dist" />
<jar jarfile="${javadoc-jar}">
<fileset dir="build/javadoc" />
</jar>
</target>
<!-- Other targets -->
<target name="clean">
<delete dir="build" />
<delete dir="dist" />
</target>
<target name="dist" depends="jar-impl,jar-src,jar-javadoc" />
<target name="all" depends="clean,dist" />
</project>