1 <?xml version="1.0"?>
\r
4 <project name="plugins" basedir="." default="all" xmlns:antelope="antlib:ise.antelope.tasks">
\r
5 <property name="project.dir" value="." />
\r
7 <import file="build-common.xml" />
\r
10 <antcall target="clean" />
\r
11 <antcall target="deploy" />
\r
14 <target name="build-service">
\r
15 <ant dir="portlets" target="build-service" inheritAll="false" />
\r
16 <ant dir="webs" target="build-service" inheritAll="false" />
\r
19 <target name="build-summary">
\r
21 classname="com.liferay.portal.tools.PluginsSummaryBuilder"
\r
22 classpathref="portal.classpath"
\r
24 newenvironment="true"
\r
26 <jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
\r
27 <jvmarg value="-Dplugins.dir=${project.dir}" />
\r
31 classname="com.liferay.portal.tools.XSLTBuilder"
\r
32 classpathref="portal.classpath"
\r
34 newenvironment="true"
\r
36 <jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
\r
37 <arg value="${project.dir}/summary.xml" />
\r
38 <arg value="${project.dir}/summary.xsl" />
\r
39 <arg value="${project.dir}/summary.html" />
\r
43 <target name="clean">
\r
44 <ant dir="hooks" target="clean" inheritAll="false" />
\r
45 <ant dir="layouttpl" target="clean" inheritAll="false" />
\r
46 <ant dir="portlets" target="clean" inheritAll="false" />
\r
47 <ant dir="themes" target="clean" inheritAll="false" />
\r
48 <ant dir="webs" target="clean" inheritAll="false" />
\r
51 <target name="compile">
\r
52 <ant dir="hooks" target="compile" inheritAll="false" />
\r
53 <ant dir="layouttpl" target="compile" inheritAll="false" />
\r
54 <ant dir="portlets" target="compile" inheritAll="false" />
\r
55 <ant dir="themes" target="compile" inheritAll="false" />
\r
56 <ant dir="webs" target="compile" inheritAll="false" />
\r
59 <target name="deploy">
\r
60 <ant dir="hooks" target="deploy" inheritAll="false" />
\r
61 <ant dir="layouttpl" target="deploy" inheritAll="false" />
\r
62 <ant dir="portlets" target="deploy" inheritAll="false" />
\r
63 <ant dir="themes" target="deploy" inheritAll="false" />
\r
64 <ant dir="webs" target="deploy" inheritAll="false" />
\r
67 <target name="direct-deploy">
\r
68 <ant dir="hooks" target="direct-deploy" inheritAll="false" />
\r
69 <ant dir="layouttpl" target="direct-deploy" inheritAll="false" />
\r
70 <ant dir="portlets" target="direct-deploy" inheritAll="false" />
\r
71 <ant dir="themes" target="direct-deploy" inheritAll="false" />
\r
72 <ant dir="webs" target="direct-deploy" inheritAll="false" />
\r
76 <delete dir="dist/liferay-portal.ear" />
\r
77 <delete dir="dist/modules" />
\r
79 <copy todir="dist" overwrite="yes">
\r
81 dir="${project.dir}/tools/ear_tmpl"
\r
85 <copy todir="dist/modules/APP-INF/lib">
\r
86 <fileset dir="${app.server.lib.global.dir}">
\r
87 <include name="*.jar" />
\r
91 <fileset dir="dist/modules" id="ear.dependency.libraries">
\r
92 <include name="APP-INF/lib/*.jar" />
\r
95 <pathconvert pathsep=" " property="ear.dependency.libraries.converted" refid="ear.dependency.libraries">
\r
99 <globmapper from="*.jar" to="APP-INF/lib/*.jar" />
\r
105 basedir="${app.server.portal.dir}"
\r
106 destfile="dist/modules/liferay-portal.war"
\r
109 <attribute name="Class-Path" value="${ear.dependency.libraries.converted}" />
\r
113 <for param="module.full.path">
\r
116 dir="${app.server.deploy.dir}"
\r
117 excludes="${plugins.ear.excludes}"
\r
118 includes="${plugins.ear.includes}"
\r
123 <antelope:stringutil string="@{module.full.path}" property="module.full.path.unix">
\r
124 <antelope:replace regex="\\" replacement="/" />
\r
125 </antelope:stringutil>
\r
127 <antelope:grep in="${module.full.path.unix}" regex="(.*/)(.*)" group="2" property="module.name" />
\r
130 basedir="@{module.full.path}"
\r
131 destfile="dist/modules/${module.name}.war"
\r
136 <fileset dir="dist/modules" id="ear.modules">
\r
137 <include name="*.war" />
\r
140 <pathconvert pathsep="," property="ear.modules.converted" refid="ear.modules">
\r
149 classname="com.liferay.portal.tools.EARBuilder"
\r
150 classpathref="portal.classpath"
\r
152 newenvironment="true"
\r
154 <jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
\r
155 <arg value="${basedir}/dist/modules/META-INF/application.xml" />
\r
156 <arg value="${ear.modules.converted}" />
\r
160 appxml="dist/modules/META-INF/application.xml"
\r
161 basedir="dist/modules"
\r
162 destfile="dist/liferay-portal.ear"
\r
163 excludes="META-INF/application.xml"
\r
164 includes="**/*.jar,*.war,META-INF/*.xml"
\r
167 <delete dir="dist/modules" />
\r
170 <target name="extract-plugins-sdk">
\r
171 <mkdir dir="dist" />
\r
173 <delete file="dist/liferay-plugins-sdk-${lp.version}.zip" />
\r
175 <zip destfile="dist/liferay-plugins-sdk-${lp.version}.zip">
\r
178 excludes=".git/**,build.*.properties,dist/**,clients/*-client/**,ext/*-ext/**,hooks/*-hook/**,layouttpl/*-layouttpl/**,portlets/*-portlet/**,private-plugins.txt,themes/*-theme/**,webs/*-web/**"
\r
179 prefix="liferay-plugins-sdk-${lp.version}"
\r
184 <target name="format-javadoc">
\r
185 <ant dir="hooks" target="format-javadoc" inheritAll="false" />
\r
186 <ant dir="layouttpl" target="format-javadoc" inheritAll="false" />
\r
187 <ant dir="portlets" target="format-javadoc" inheritAll="false" />
\r
188 <ant dir="themes" target="format-javadoc" inheritAll="false" />
\r
189 <ant dir="webs" target="format-javadoc" inheritAll="false" />
\r
192 <target name="setup-eclipse">
\r
193 <ant dir="hooks" target="clean" inheritAll="false" />
\r
194 <ant dir="portlets" target="clean" inheritAll="false" />
\r
195 <ant dir="webs" target="clean" inheritAll="false" />
\r
197 <ant dir="hooks" target="compile" inheritAll="false" />
\r
198 <ant dir="portlets" target="compile" inheritAll="false" />
\r
199 <ant dir="webs" target="compile" inheritAll="false" />
\r
201 <ant dir="hooks" target="setup-eclipse" inheritAll="false" />
\r
202 <ant dir="portlets" target="setup-eclipse" inheritAll="false" />
\r
203 <ant dir="webs" target="setup-eclipse" inheritAll="false" />
\r
206 <target name="war">
\r
207 <ant dir="hooks" target="war" inheritAll="false" />
\r
208 <ant dir="layouttpl" target="war" inheritAll="false" />
\r
209 <ant dir="portlets" target="war" inheritAll="false" />
\r
210 <ant dir="themes" target="war" inheritAll="false" />
\r
211 <ant dir="webs" target="war" inheritAll="false" />
\r
214 <target name="zip-portal">
\r
217 <equals arg1="${app.server.type}" arg2="tomcat" />
\r
223 This task only works when the property "app.server.type" is "tomcat". However,
\r
224 the outputted files will work in any supported application server.
\r
230 <format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
\r
233 <zip destfile="dist/liferay-portal-dependencies-${tstamp.value}.zip">
\r
235 dir="${app.server.lib.global.dir}"
\r
236 prefix="liferay-portal-dependencies-${tstamp.value}"
\r
240 <delete file="dist/liferay-portal-${lp.version}.war" failonerror="false" />
\r
243 basedir="${app.server.portal.dir}"
\r
244 destfile="dist/liferay-portal-${tstamp.value}.war"
\r
245 excludes="html/js/editor/_fckeditor/**,html/js/editor/fckeditor/_samples/**"
\r
248 <copy todir="${tstamp.value}/WEB-INF/lib">
\r
251 includes="ccpp.jar"
\r
256 basedir="${tstamp.value}"
\r
257 destfile="dist/liferay-portal-${tstamp.value}.war"
\r
261 <delete dir="${tstamp.value}" />
\r