--- /dev/null
+<?xml version="1.0"?>\r
+<!DOCTYPE project>\r
+\r
+<project name="build-common">\r
+ <property environment="env" />\r
+\r
+ <property file="${project.dir}/build.${user.name}.properties" />\r
+ <property file="${project.dir}/build.${env.COMPUTERNAME}.properties" />\r
+ <property file="${project.dir}/build.${env.HOST}.properties" />\r
+ <property file="${project.dir}/build.${env.HOSTNAME}.properties" />\r
+ <property file="${project.dir}/build.properties" />\r
+\r
+ <property name="app.server.classes.portal.dir" value="${app.server.portal.dir}/WEB-INF/classes" />\r
+ <property name="app.server.lib.portal.dir" location="${app.server.portal.dir}/WEB-INF/lib" />\r
+\r
+ <path id="lib.classpath">\r
+ <fileset dir="${project.dir}/lib" includes="*.jar" />\r
+ </path>\r
+ <path id="plugin.classpath">\r
+ <path refid="plugin-lib.classpath" />\r
+ <fileset dir="${app.server.lib.global.dir}" includes="*.jar" />\r
+ <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
+ <fileset dir="${project.dir}/lib" includes="activation.jar,jsp-api.jar,mail.jar,servlet-api.jar" />\r
+ </path>\r
+\r
+ <path id="portal.classpath">\r
+ <pathelement location="${app.server.classes.portal.dir}" />\r
+ <fileset dir="${app.server.lib.global.dir}" includes="*.jar" />\r
+ <fileset dir="${app.server.lib.portal.dir}" includes="*.jar" />\r
+ <fileset dir="${project.dir}/lib" includes="activation.jar,jargs.jar,jsp-api.jar,qdox.jar,servlet-api.jar" />\r
+ </path>\r
+\r
+ <path id="test.classpath">\r
+ <path refid="plugin.classpath" />\r
+ <fileset dir="${app.server.lib.portal.dir}" includes="commons-io.jar" />\r
+ <fileset dir="${project.dir}/lib" includes="junit.jar" />\r
+ <pathelement location="test-classes/integration" />\r
+ <pathelement location="test-classes/unit" />\r
+ </path>\r
+\r
+ <taskdef classpathref="lib.classpath" resource="net/sf/antcontrib/antlib.xml" />\r
+ <taskdef classpathref="lib.classpath" resource="ise/antelope/tasks/antlib.xml" uri="antlib:ise.antelope.tasks" />\r
+\r
+ <condition property="correct.ant.version">\r
+ <antversion atleast="1.7.0" />\r
+ </condition>\r
+\r
+ <if>\r
+ <not>\r
+ <equals arg1="${correct.ant.version}" arg2="true" />\r
+ </not>\r
+ <then>\r
+ <fail>Please use Ant 1.7.0 or above.</fail>\r
+ </then>\r
+ </if>\r
+\r
+ <whichresource resource="/org/eclipse/jdt/core/JDTCompilerAdapter.class" property="ecj.compiler" />\r
+\r
+ <if>\r
+ <and>\r
+ <equals arg1="${javac.compiler}" arg2="org.eclipse.jdt.core.JDTCompilerAdapter" />\r
+ <not>\r
+ <isset property="ecj.compiler" />\r
+ </not>\r
+ </and>\r
+ <then>\r
+ <copy file="${project.dir}/lib/ecj.jar" todir="${ant.home}/lib" />\r
+\r
+ <fail>\r
+.\r
+\r
+Task cannot continue because ECJ is not installed.\r
+\r
+ECJ was automatically installed. Please rerun your task.\r
+ </fail>\r
+ </then>\r
+ </if>\r
+\r
+ <target name="compile-java">\r
+ <copy todir="${javac.destdir}">\r
+ <fileset dir="${javac.srcdir}" excludes="**/*.java" />\r
+ </copy>\r
+\r
+ <javac\r
+ classpathref="${javac.classpathref}"\r
+ compiler="${javac.compiler}"\r
+ debug="${javac.debug}"\r
+ deprecation="${javac.deprecation}"\r
+ destdir="${javac.destdir}"\r
+ encoding="${javac.encoding}"\r
+ includeAntRuntime="false"\r
+ nowarn="${javac.nowarn}"\r
+ srcdir="${javac.srcdir}"\r
+ />\r
+ </target>\r
+\r
+ <target name="format-javadoc">\r
+ <java\r
+ classname="com.liferay.portal.tools.JavadocFormatter"\r
+ classpathref="portal.classpath"\r
+ fork="true"\r
+ newenvironment="true"\r
+ >\r
+ <jvmarg value="-Xmx512m" />\r
+ <arg value="javadoc.init=${init}" />\r
+ <arg value="javadoc.input.dir=${input.dir}" />\r
+ <arg value="javadoc.limit=${limit}" />\r
+ <arg value="javadoc.output.file.prefix=${output.file.prefix}" />\r
+ <arg value="javadoc.update=${update}" />\r
+ </java>\r
+ </target>\r
+\r
+ <target name="format-source">\r
+ <java\r
+ classname="com.liferay.portal.tools.SourceFormatter"\r
+ classpathref="portal.classpath"\r
+ fork="true"\r
+ newenvironment="true"\r
+ >\r
+ <jvmarg value="-Xmx512m" />\r
+ <jvmarg value="-Xss2048k" />\r
+ </java>\r
+\r
+ <delete file="ServiceBuilder.temp" />\r
+ </target>\r
+\r
+ <target name="print-current-time">\r
+ <tstamp>\r
+ <format property="current.time" pattern="MMMM d, yyyy 'at' hh:mm aa" />\r
+ </tstamp>\r
+\r
+ <echo message="${current.time}" />\r
+ </target>\r
+\r
+ <target name="setup-eclipse">\r
+ <java\r
+ classname="com.liferay.portal.tools.PluginsEnvironmentBuilder"\r
+ classpathref="portal.classpath"\r
+ fork="true"\r
+ newenvironment="true"\r
+ >\r
+ <jvmarg value="-Dplugins.env.dir=." />\r
+ </java>\r
+ </target>\r
+</project>\r