--- /dev/null
+<?xml version="1.0"?>\r
+<!DOCTYPE project>\r
+\r
+<project name="plugins" basedir="." default="all" xmlns:antelope="antlib:ise.antelope.tasks">\r
+ <property name="project.dir" value="." />\r
+\r
+ <import file="build-common.xml" />\r
+\r
+ <target name="all">\r
+ <antcall target="clean" />\r
+ <antcall target="deploy" />\r
+ </target>\r
+\r
+ <target name="build-service">\r
+ <ant dir="portlets" target="build-service" inheritAll="false" />\r
+ <ant dir="webs" target="build-service" inheritAll="false" />\r
+ </target>\r
+\r
+ <target name="build-summary">\r
+ <java\r
+ classname="com.liferay.portal.tools.PluginsSummaryBuilder"\r
+ classpathref="portal.classpath"\r
+ fork="true"\r
+ newenvironment="true"\r
+ >\r
+ <jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />\r
+ <jvmarg value="-Dplugins.dir=${project.dir}" />\r
+ </java>\r
+\r
+ <java\r
+ classname="com.liferay.portal.tools.XSLTBuilder"\r
+ classpathref="portal.classpath"\r
+ fork="true"\r
+ newenvironment="true"\r
+ >\r
+ <jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />\r
+ <arg value="${project.dir}/summary.xml" />\r
+ <arg value="${project.dir}/summary.xsl" />\r
+ <arg value="${project.dir}/summary.html" />\r
+ </java>\r
+ </target>\r
+\r
+ <target name="clean">\r
+ <ant dir="hooks" target="clean" inheritAll="false" />\r
+ <ant dir="layouttpl" target="clean" inheritAll="false" />\r
+ <ant dir="portlets" target="clean" inheritAll="false" />\r
+ <ant dir="themes" target="clean" inheritAll="false" />\r
+ <ant dir="webs" target="clean" inheritAll="false" />\r
+ </target>\r
+\r
+ <target name="compile">\r
+ <ant dir="hooks" target="compile" inheritAll="false" />\r
+ <ant dir="layouttpl" target="compile" inheritAll="false" />\r
+ <ant dir="portlets" target="compile" inheritAll="false" />\r
+ <ant dir="themes" target="compile" inheritAll="false" />\r
+ <ant dir="webs" target="compile" inheritAll="false" />\r
+ </target>\r
+\r
+ <target name="deploy">\r
+ <ant dir="hooks" target="deploy" inheritAll="false" />\r
+ <ant dir="layouttpl" target="deploy" inheritAll="false" />\r
+ <ant dir="portlets" target="deploy" inheritAll="false" />\r
+ <ant dir="themes" target="deploy" inheritAll="false" />\r
+ <ant dir="webs" target="deploy" inheritAll="false" />\r
+ </target>\r
+\r
+ <target name="direct-deploy">\r
+ <ant dir="hooks" target="direct-deploy" inheritAll="false" />\r
+ <ant dir="layouttpl" target="direct-deploy" inheritAll="false" />\r
+ <ant dir="portlets" target="direct-deploy" inheritAll="false" />\r
+ <ant dir="themes" target="direct-deploy" inheritAll="false" />\r
+ <ant dir="webs" target="direct-deploy" inheritAll="false" />\r
+ </target>\r
+\r
+ <target name="ear">\r
+ <delete dir="dist/liferay-portal.ear" />\r
+ <delete dir="dist/modules" />\r
+\r
+ <copy todir="dist" overwrite="yes">\r
+ <fileset\r
+ dir="${project.dir}/tools/ear_tmpl"\r
+ />\r
+ </copy>\r
+\r
+ <copy todir="dist/modules/APP-INF/lib">\r
+ <fileset dir="${app.server.lib.global.dir}">\r
+ <include name="*.jar" />\r
+ </fileset>\r
+ </copy>\r
+\r
+ <fileset dir="dist/modules" id="ear.dependency.libraries">\r
+ <include name="APP-INF/lib/*.jar" />\r
+ </fileset>\r
+\r
+ <pathconvert pathsep=" " property="ear.dependency.libraries.converted" refid="ear.dependency.libraries">\r
+ <mapper>\r
+ <chainedmapper>\r
+ <flattenmapper />\r
+ <globmapper from="*.jar" to="APP-INF/lib/*.jar" />\r
+ </chainedmapper>\r
+ </mapper>\r
+ </pathconvert>\r
+\r
+ <war\r
+ basedir="${app.server.portal.dir}"\r
+ destfile="dist/modules/liferay-portal.war"\r
+ >\r
+ <manifest>\r
+ <attribute name="Class-Path" value="${ear.dependency.libraries.converted}" />\r
+ </manifest>\r
+ </war>\r
+\r
+ <for param="module.full.path">\r
+ <path>\r
+ <dirset\r
+ dir="${app.server.deploy.dir}"\r
+ excludes="${plugins.ear.excludes}"\r
+ includes="${plugins.ear.includes}"\r
+ />\r
+ </path>\r
+\r
+ <sequential>\r
+ <antelope:stringutil string="@{module.full.path}" property="module.full.path.unix">\r
+ <antelope:replace regex="\\" replacement="/" />\r
+ </antelope:stringutil>\r
+\r
+ <antelope:grep in="${module.full.path.unix}" regex="(.*/)(.*)" group="2" property="module.name" />\r
+\r
+ <war\r
+ basedir="@{module.full.path}"\r
+ destfile="dist/modules/${module.name}.war"\r
+ />\r
+ </sequential>\r
+ </for>\r
+\r
+ <fileset dir="dist/modules" id="ear.modules">\r
+ <include name="*.war" />\r
+ </fileset>\r
+\r
+ <pathconvert pathsep="," property="ear.modules.converted" refid="ear.modules">\r
+ <mapper>\r
+ <chainedmapper>\r
+ <flattenmapper />\r
+ </chainedmapper>\r
+ </mapper>\r
+ </pathconvert>\r
+\r
+ <java\r
+ classname="com.liferay.portal.tools.EARBuilder"\r
+ classpathref="portal.classpath"\r
+ fork="true"\r
+ newenvironment="true"\r
+ >\r
+ <jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />\r
+ <arg value="${basedir}/dist/modules/META-INF/application.xml" />\r
+ <arg value="${ear.modules.converted}" />\r
+ </java>\r
+\r
+ <ear\r
+ appxml="dist/modules/META-INF/application.xml"\r
+ basedir="dist/modules"\r
+ destfile="dist/liferay-portal.ear"\r
+ excludes="META-INF/application.xml"\r
+ includes="**/*.jar,*.war,META-INF/*.xml"\r
+ />\r
+\r
+ <delete dir="dist/modules" />\r
+ </target>\r
+\r
+ <target name="extract-plugins-sdk">\r
+ <mkdir dir="dist" />\r
+\r
+ <delete file="dist/liferay-plugins-sdk-${lp.version}.zip" />\r
+\r
+ <zip destfile="dist/liferay-plugins-sdk-${lp.version}.zip">\r
+ <zipfileset\r
+ dir="."\r
+ excludes=".git/**,build.*.properties,dist/**,clients/*-client/**,ext/*-ext/**,hooks/*-hook/**,layouttpl/*-layouttpl/**,portlets/*-portlet/**,private-plugins.txt,themes/*-theme/**,webs/*-web/**"\r
+ prefix="liferay-plugins-sdk-${lp.version}"\r
+ />\r
+ </zip>\r
+ </target>\r
+\r
+ <target name="format-javadoc">\r
+ <ant dir="hooks" target="format-javadoc" inheritAll="false" />\r
+ <ant dir="layouttpl" target="format-javadoc" inheritAll="false" />\r
+ <ant dir="portlets" target="format-javadoc" inheritAll="false" />\r
+ <ant dir="themes" target="format-javadoc" inheritAll="false" />\r
+ <ant dir="webs" target="format-javadoc" inheritAll="false" />\r
+ </target>\r
+\r
+ <target name="setup-eclipse">\r
+ <ant dir="hooks" target="clean" inheritAll="false" />\r
+ <ant dir="portlets" target="clean" inheritAll="false" />\r
+ <ant dir="webs" target="clean" inheritAll="false" />\r
+\r
+ <ant dir="hooks" target="compile" inheritAll="false" />\r
+ <ant dir="portlets" target="compile" inheritAll="false" />\r
+ <ant dir="webs" target="compile" inheritAll="false" />\r
+\r
+ <ant dir="hooks" target="setup-eclipse" inheritAll="false" />\r
+ <ant dir="portlets" target="setup-eclipse" inheritAll="false" />\r
+ <ant dir="webs" target="setup-eclipse" inheritAll="false" />\r
+ </target>\r
+\r
+ <target name="war">\r
+ <ant dir="hooks" target="war" inheritAll="false" />\r
+ <ant dir="layouttpl" target="war" inheritAll="false" />\r
+ <ant dir="portlets" target="war" inheritAll="false" />\r
+ <ant dir="themes" target="war" inheritAll="false" />\r
+ <ant dir="webs" target="war" inheritAll="false" />\r
+ </target>\r
+\r
+ <target name="zip-portal">\r
+ <if>\r
+ <not>\r
+ <equals arg1="${app.server.type}" arg2="tomcat" />\r
+ </not>\r
+ <then>\r
+ <fail>\r
+.\r
+\r
+This task only works when the property "app.server.type" is "tomcat". However,\r
+the outputted files will work in any supported application server.\r
+ </fail>\r
+ </then>\r
+ </if>\r
+\r
+ <tstamp>\r
+ <format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />\r
+ </tstamp>\r
+\r
+ <zip destfile="dist/liferay-portal-dependencies-${tstamp.value}.zip">\r
+ <zipfileset\r
+ dir="${app.server.lib.global.dir}"\r
+ prefix="liferay-portal-dependencies-${tstamp.value}"\r
+ />\r
+ </zip>\r
+\r
+ <delete file="dist/liferay-portal-${lp.version}.war" failonerror="false" />\r
+\r
+ <zip\r
+ basedir="${app.server.portal.dir}"\r
+ destfile="dist/liferay-portal-${tstamp.value}.war"\r
+ excludes="html/js/editor/_fckeditor/**,html/js/editor/fckeditor/_samples/**"\r
+ />\r
+\r
+ <copy todir="${tstamp.value}/WEB-INF/lib">\r
+ <fileset\r
+ dir="lib"\r
+ includes="ccpp.jar"\r
+ />\r
+ </copy>\r
+\r
+ <zip\r
+ basedir="${tstamp.value}"\r
+ destfile="dist/liferay-portal-${tstamp.value}.war"\r
+ update="yes"\r
+ />\r
+\r
+ <delete dir="${tstamp.value}" />\r
+ </target>\r
+</project>
\ No newline at end of file