forked from liferay/liferay-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
105 lines (86 loc) · 2.27 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
<?xml version="1.0"?>
<project basedir="." default="compile" name="portal-client">
<import file="../build-common-java.xml" />
<property name="jar.file" value="${ant.project.name}" />
<property name="client.url" value="http://localhost:8080/api/axis" />
<target depends="clean" name="build-client">
<remake-dir dir="src" />
<java
classname="com.liferay.portal.tools.PortalClientBuilder"
classpathref="project.classpath"
fork="true"
newenvironment="true"
outputproperty="build-client.output"
resultproperty="build-client.result"
>
<jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
<arg value="${project.dir}/portal-web/docroot/WEB-INF/server-config.wsdd" />
<arg value="src" />
<arg value="namespace-mapping.properties" />
<arg value="${client.url}" />
</java>
<echo>${build-client.output}</echo>
<if>
<or>
<contains string="${build-client.output}" substring="IOException" />
<not>
<equals arg1="${build-client.result}" arg2="0" />
</not>
</or>
<then>
<fail>Portal Client Builder generated exceptions.</fail>
</then>
</if>
<antcall target="jar" />
</target>
<target depends="compile" name="jar">
<jar
jarfile="${jar.file}.jar"
>
<fileset
dir="classes"
includes="com/liferay/client/**,org/apache/**"
/>
<fileset
dir="src"
includes="com/liferay/client/**,org/apache/**"
/>
</jar>
<copy
file="portal-client.jar"
preservelastmodified="true"
todir="${project.dir}/lib/portal"
/>
</target>
<target name="jar-sources">
<tstamp>
<format pattern="yyyyMMddkkmmssSSS" property="tstamp.value" />
</tstamp>
<unzip
dest="${tstamp.value}"
src="${project.dir}/lib/portal/${jar.file}.jar"
/>
<jar
basedir="${tstamp.value}"
excludes="**/*.class"
jarfile="${jar.file}-sources.jar"
/>
<delete dir="${tstamp.value}" />
</target>
<target name="java2html">
<remake-dir dir="src" />
<unjar
dest="src"
src="${jar.file}.jar"
/>
<antcall target="build-common-java.java2html" />
</target>
<target name="javadoc">
<remake-dir dir="src" />
<unjar
dest="src"
src="${project.dir}/lib/portal/${jar.file}.jar"
/>
<antcall target="build-common-java.javadoc" />
</target>
</project>