-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.xml
138 lines (111 loc) · 3.43 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?xml version="1.0" encoding="UTF-8"?>
<project
basedir="."
default="add"
name="Liferay-Source-Netbeans-Project"
xmlns:if="ant:if"
xmlns:ivy="antlib:org.apache.ivy.ant"
xmlns:unless="ant:unless"
>
<path id="ivy.lib.path">
<fileset dir="lib" includes="ivy-2.4.0.jar" />
</path>
<path id="lib.classpath">
<fileset dir="lib" includes="*.jar"/>
</path>
<property file="build-ext.properties" />
<property file="build.properties" />
<property name="test.list" value="" />
<property environment="env" />
<taskdef classpath="lib/ant-contrib.jar" resource="net/sf/antcontrib/antlib.xml" />
<taskdef classpathref="ivy.lib.path" resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" />
<macrodef name="conditional-property">
<attribute name="name" />
<attribute name="true.value" />
<attribute name="false.value" />
<attribute name="test.property.name" />
<attribute default="" name="test.value" />
<sequential>
<property name="@{name}" value="@{true.value}" if:true="@{test.value}" />
<property name="@{name}" value="@{false.value}" if:blank="${@{test.property.name}}" />
<property name="@{name}" value="@{true.value}" unless:blank="${@{test.property.name}}" />
</sequential>
</macrodef>
<conditional-property
name="java.fork"
true.value="true"
false.value="false"
test.property.name="jdk8.home"
test.value="${jvm.debug}"
/>
<conditional-property
name="javac.fork"
true.value="true"
false.value="false"
test.property.name="jdk8.home"
/>
<conditional-property
name="java.executable"
true.value="${jdk8.home}/bin/java"
false.value="java"
test.property.name="jdk8.home"
/>
<conditional-property
name="javac.executable"
true.value="${jdk8.home}/bin/javac"
false.value="javac"
test.property.name="jdk8.home"
/>
<macrodef name="clean">
<attribute name="project.dir" />
<sequential>
<delete dir="classes" />
<delete dir="@{project.dir}" />
</sequential>
</macrodef>
<macrodef name="compile">
<sequential>
<delete dir="classes" />
<mkdir dir="classes" />
<javac
classpathref="lib.classpath"
debug="true"
destdir="classes"
executable="${javac.executable}"
fork="${javac.fork}"
includeantruntime="false" >
<src path="src" />
</javac>
<copy todir="classes">
<fileset dir="src" includes="**/*.ftl" />
</copy>
</sequential>
</macrodef>
<target name="add">
<compile />
<java classname="com.liferay.netbeansproject.ProjectBuilder" classpath="classes" classpathref="lib.classpath" fork="${java.fork}" jvm="${java.executable}">
<jvmarg if:true="${jvm.debug}" line="${jpda.settings}" />
<arg value="rebuild=false" />
</java>
</target>
<target name="build">
<compile />
<java classname="com.liferay.netbeansproject.ProjectBuilder" classpath="classes" classpathref="lib.classpath" fork="${java.fork}" jvm="${java.executable}">
<jvmarg if:true="${jvm.debug}" line="${jpda.settings}" />
<arg value="rebuild=true" />
</java>
</target>
<target name="clean">
<clean project.dir="${project.dir}" />
</target>
<!-- Use portal's source formatter to format source. -->
<target name="format-source">
<ivy:cachepath
file="dependencies/com.liferay.source.formatter/ivy.xml"
pathid="source.formatter.classpath"
log="download-only"
/>
<taskdef classpathref="source.formatter.classpath" resource="com/liferay/source/formatter/ant/taskdefs.properties" />
<format-source baseDir="src" />
</target>
</project>