1 <?xml version="1.0"?>
\r
4 <project name="build-common">
\r
5 <property environment="env" />
\r
7 <property file="${project.dir}/build.${user.name}.properties" />
\r
8 <property file="${project.dir}/build.${env.COMPUTERNAME}.properties" />
\r
9 <property file="${project.dir}/build.${env.HOST}.properties" />
\r
10 <property file="${project.dir}/build.${env.HOSTNAME}.properties" />
\r
11 <property file="${project.dir}/build.properties" />
\r
13 <property name="app.server.classes.portal.dir" value="${app.server.portal.dir}/WEB-INF/classes" />
\r
14 <property name="app.server.lib.portal.dir" location="${app.server.portal.dir}/WEB-INF/lib" />
\r
16 <path id="lib.classpath">
\r
17 <fileset dir="${project.dir}/lib" includes="*.jar" />
\r
19 <path id="plugin.classpath">
\r
20 <path refid="plugin-lib.classpath" />
\r
21 <fileset dir="${app.server.lib.global.dir}" includes="*.jar" />
\r
22 <fileset dir="${app.server.lib.portal.dir}" includes="annotations.jar,commons-logging.jar,log4j.jar,util-bridges.jar,util-java.jar,util-taglib.jar" />
\r
23 <fileset dir="${project.dir}/lib" includes="activation.jar,jsp-api.jar,mail.jar,servlet-api.jar" />
\r
26 <path id="portal.classpath">
\r
27 <pathelement location="${app.server.classes.portal.dir}" />
\r
28 <fileset dir="${app.server.lib.global.dir}" includes="*.jar" />
\r
29 <fileset dir="${app.server.lib.portal.dir}" includes="*.jar" />
\r
30 <fileset dir="${project.dir}/lib" includes="activation.jar,jargs.jar,jsp-api.jar,qdox.jar,servlet-api.jar" />
\r
33 <path id="test.classpath">
\r
34 <path refid="plugin.classpath" />
\r
35 <fileset dir="${app.server.lib.portal.dir}" includes="commons-io.jar" />
\r
36 <fileset dir="${project.dir}/lib" includes="junit.jar" />
\r
37 <pathelement location="test-classes/integration" />
\r
38 <pathelement location="test-classes/unit" />
\r
41 <taskdef classpathref="lib.classpath" resource="net/sf/antcontrib/antlib.xml" />
\r
42 <taskdef classpathref="lib.classpath" resource="ise/antelope/tasks/antlib.xml" uri="antlib:ise.antelope.tasks" />
\r
44 <condition property="correct.ant.version">
\r
45 <antversion atleast="1.7.0" />
\r
50 <equals arg1="${correct.ant.version}" arg2="true" />
\r
53 <fail>Please use Ant 1.7.0 or above.</fail>
\r
57 <whichresource resource="/org/eclipse/jdt/core/JDTCompilerAdapter.class" property="ecj.compiler" />
\r
61 <equals arg1="${javac.compiler}" arg2="org.eclipse.jdt.core.JDTCompilerAdapter" />
\r
63 <isset property="ecj.compiler" />
\r
67 <copy file="${project.dir}/lib/ecj.jar" todir="${ant.home}/lib" />
\r
72 Task cannot continue because ECJ is not installed.
\r
74 ECJ was automatically installed. Please rerun your task.
\r
79 <target name="compile-java">
\r
80 <copy todir="${javac.destdir}">
\r
81 <fileset dir="${javac.srcdir}" excludes="**/*.java" />
\r
85 classpathref="${javac.classpathref}"
\r
86 compiler="${javac.compiler}"
\r
87 debug="${javac.debug}"
\r
88 deprecation="${javac.deprecation}"
\r
89 destdir="${javac.destdir}"
\r
90 encoding="${javac.encoding}"
\r
91 includeAntRuntime="false"
\r
92 nowarn="${javac.nowarn}"
\r
93 srcdir="${javac.srcdir}"
\r
97 <target name="format-javadoc">
\r
99 classname="com.liferay.portal.tools.JavadocFormatter"
\r
100 classpathref="portal.classpath"
\r
102 newenvironment="true"
\r
104 <jvmarg value="-Xmx512m" />
\r
105 <arg value="javadoc.init=${init}" />
\r
106 <arg value="javadoc.input.dir=${input.dir}" />
\r
107 <arg value="javadoc.limit=${limit}" />
\r
108 <arg value="javadoc.output.file.prefix=${output.file.prefix}" />
\r
109 <arg value="javadoc.update=${update}" />
\r
113 <target name="format-source">
\r
115 classname="com.liferay.portal.tools.SourceFormatter"
\r
116 classpathref="portal.classpath"
\r
118 newenvironment="true"
\r
120 <jvmarg value="-Xmx512m" />
\r
121 <jvmarg value="-Xss2048k" />
\r
124 <delete file="ServiceBuilder.temp" />
\r
127 <target name="print-current-time">
\r
129 <format property="current.time" pattern="MMMM d, yyyy 'at' hh:mm aa" />
\r
132 <echo message="${current.time}" />
\r
135 <target name="setup-eclipse">
\r
137 classname="com.liferay.portal.tools.PluginsEnvironmentBuilder"
\r
138 classpathref="portal.classpath"
\r
140 newenvironment="true"
\r
142 <jvmarg value="-Dplugins.env.dir=." />
\r