Skip to content

Instantly share code, notes, and snippets.

@sbilo
Last active August 29, 2015 14:03
Show Gist options
  • Save sbilo/476074b86b2faf347a18 to your computer and use it in GitHub Desktop.
Save sbilo/476074b86b2faf347a18 to your computer and use it in GitHub Desktop.
portal-impl/build.xml
<?xml version="1.0"?>
<project name="portal-impl" basedir="." default="compile"
xmlns:antelope="antlib:ise.antelope.tasks"
xmlns:artifact="antlib:org.apache.maven.artifact.ant"
>
<property name="test.properties" value="portal-test.properties" />
<import file="../build-common-java.xml" />
<property name="deploy.dir" value="${app.server.lib.portal.dir}" />
<property name="jar.file" value="${ant.project.name}" />
<property name="manifest.bundle.name" value="Liferay Portal Impl" />
<property name="manifest.bundle.symbolic.name" value="portal-impl;singleton:=true" />
<property name="service.file" value="service.xml" />
<target name="build-alloy-taglib-jar">
<if>
<not>
<isset property="alloy.taglibs.dir" />
</not>
<then>
<fail>
.
Please set the property "alloy.taglibs.dir" to point to a checked out version of
svn://svn.liferay.com/repos/public/alloy/trunk/sandbox/taglibs.
</fail>
</then>
</if>
<ant dir="${alloy.taglibs.dir}" target="clean" inheritAll="false" />
<ant dir="${alloy.taglibs.dir}" target="start" inheritAll="false" />
<copy todir="${project.dir}/lib/portal" preservelastmodified="true">
<fileset file="${alloy.taglibs.dir}/alloy-taglib/alloy-taglib.jar" />
</copy>
</target>
<target name="build-axis-jar">
<get
dest="axis-1.4-sources.zip"
src="http://search.maven.org/remotecontent?filepath=axis/axis/1.4/axis-1.4-sources.jar"
/>
<tstamp>
<format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
</tstamp>
<unzip
dest="${tstamp.value}"
src="axis-1.4-sources.zip"
>
<patternset>
<include name="**/AxisEngine.java" />
<include name="**/EngineConfiguration.java" />
<include name="**/JavaServiceDesc.java" />
<include name="**/MapDeserializer.java" />
<include name="**/Session.java" />
<include name="**/Types.java" />
</patternset>
</unzip>
<delete file="axis-1.4-sources.zip" />
<patch
dir="${tstamp.value}"
patchfile="${project.dir}/lib/portal/axis/AXIS-2585.patch"
strip="1"
/>
<patch
dir="${tstamp.value}"
patchfile="${project.dir}/lib/portal/axis/LPS-28561.patch"
strip="1"
/>
<patch
dir="${tstamp.value}"
patchfile="${project.dir}/lib/portal/axis/LPS-34308.patch"
strip="1"
/>
<patch
dir="${tstamp.value}"
patchfile="${project.dir}/lib/portal/axis/LPS-35125.patch"
strip="1"
/>
<patch
dir="${tstamp.value}"
patchfile="${project.dir}/lib/portal/axis/LPS-36160.patch"
strip="1"
/>
<antcall target="compile-java">
<param name="javac.classpathref" value="project.classpath" />
<param name="javac.destdir" value="${tstamp.value}" />
<param name="javac.srcdir" value="${tstamp.value}" />
</antcall>
<get
dest="${project.dir}/lib/portal/axis.jar.new"
src="http://search.maven.org/remotecontent?filepath=axis/axis/1.4/axis-1.4.jar"
/>
<jar destfile="${project.dir}/lib/portal/axis.jar.new" update="true">
<zipfileset dir="${tstamp.value}" includes="**/*.class" />
</jar>
<delete dir="${tstamp.value}" />
</target>
<!--<target name="build-copy-interface">
<java
classname="com.liferay.portal.tools.CopyInterfaceBuilder"
classpathref="project.classpath"
fork="true"
newenvironment="true"
>
<jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
<arg value="E:/Temp/SRC/jdk-1.4.2" />
<arg value="javax/naming/Context.java" />
</java>
<java
classname="com.liferay.portal.tools.CopyInterfaceBuilder"
classpathref="project.classpath"
fork="true"
newenvironment="true"
>
<jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
<arg value="E:/Temp/SRC/jdk-1.4.2" />
<arg value="javax/naming/directory/DirContext.java" />
</java>
</target>-->
<target name="build-bobo-browse-jar">
<get dest="release-3.2.0.zip" src="https://codeload.github.com/senseidb/bobo/zip/release-3.2.0" />
<tstamp>
<format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
</tstamp>
<unzip
dest="${tstamp.value}"
src="release-3.2.0.zip"
/>
<delete file="release-3.2.0.zip" />
<patch patchfile="${project.dir}/lib/portal/bobo-browse/LPS-28980.patch"
dir="${tstamp.value}/bobo-release-3.2.0"
strip="1"
/>
<patch patchfile="${project.dir}/lib/portal/bobo-browse/LPS-38192.patch"
dir="${tstamp.value}/bobo-release-3.2.0"
strip="1"
/>
<artifact:mvn pom="${tstamp.value}/bobo-release-3.2.0/bobo-browse/pom.xml">
<arg value="package" />
</artifact:mvn>
<move
file="${tstamp.value}/bobo-release-3.2.0/bobo-browse/target/bobo-browse-3.2.0.jar"
tofile="${project.dir}/lib/portal/bobo-browse.jar.new"
/>
<delete dir="${tstamp.value}" />
</target>
<target name="build-creole-parser">
<delete>
<fileset
dir="src/com/liferay/portal/parsers/creole/parser"
includes="*.*"
/>
</delete>
<path id="antlr.classpath">
<pathelement path="${classpath}" />
<fileset dir="${project.dir}/lib/portal" includes="antlr2.jar,antlr3.jar,antlr3-runtime.jar,stringtemplate.jar" />
</path>
<java
classname="org.antlr.Tool"
classpathref="antlr.classpath"
dir="src/com/liferay/portal/parsers/creole/grammar"
fork="true"
maxmemory="1024m"
newenvironment="true"
>
<arg value="-o" />
<arg value="../parser" />
<arg value="Creole10.g" />
</java>
<replace file="src/com/liferay/portal/parsers/creole/parser/Creole10Lexer.java">
<replacetoken>public class Creole10Lexer</replacetoken>
<replacevalue><![CDATA[@SuppressWarnings("all")
public class Creole10Lexer]]></replacevalue>
</replace>
<replace file="src/com/liferay/portal/parsers/creole/parser/Creole10Parser.java">
<replacetoken>public class Creole10Parser</replacetoken>
<replacevalue><![CDATA[@SuppressWarnings("all")
public class Creole10Parser]]></replacevalue>
</replace>
<fixcrlf
includes="*.java"
javafiles="yes"
srcdir="src/com/liferay/portal/parsers/creole/parser"
tab="add"
/>
</target>
<target name="build-css">
<ant dir="../portal-web" target="build-css" />
</target>
<target name="build-db">
<ant dir="../sql" target="build-db" />
</target>
<target name="build-freemarker-jar">
<get
dest="freemarker-2.3.17-sources.zip"
src="http://search.maven.org/remotecontent?filepath=org/freemarker/freemarker/2.3.17/freemarker-2.3.17-sources.jar"
/>
<tstamp>
<format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
</tstamp>
<unzip
dest="${tstamp.value}"
src="freemarker-2.3.17-sources.zip"
>
<patternset>
<include name="**/DebugBreak.java" />
<include name="**/EnvironmentSuspendedEvent.java" />
<include name="**/DebuggerServer.java" />
<include name="**/DebuggerService.java" />
<include name="**/RmiDebuggedEnvironmentImpl.java" />
<include name="**/RmiDebuggerImpl.java" />
<include name="**/RmiDebuggerService.java" />
</patternset>
</unzip>
<delete file="freemarker-2.3.17-sources.zip" />
<patch
dir="${tstamp.value}"
patchfile="${project.dir}/lib/portal/freemarker/LPS-35775.patch"
strip="1"
/>
<antcall target="compile-java">
<param name="javac.classpathref" value="project.classpath" />
<param name="javac.destdir" value="${tstamp.value}" />
<param name="javac.srcdir" value="${tstamp.value}" />
</antcall>
<get
dest="${project.dir}/lib/portal/freemarker.jar.new"
src="http://search.maven.org/remotecontent?filepath=org/freemarker/freemarker/2.3.17/freemarker-2.3.17.jar"
/>
<jar destfile="${project.dir}/lib/portal/freemarker.jar.new" update="true">
<zipfileset dir="${tstamp.value}" includes="**/*.class" />
</jar>
<delete dir="${tstamp.value}" />
</target>
<target name="build-icu4j-jar">
<tstamp>
<format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
</tstamp>
<unzip dest="${tstamp.value}" src="${project.dir}/tools/icu4j/icu4j-4_0_1-src.jar" />
<patch
dir="${tstamp.value}"
patchfile="${project.dir}/tools/icu4j/LPS-36663.patch"
strip="1"
/>
<move file="${tstamp.value}/src/com/ibm" todir="${tstamp.value}/src/com/liferay" />
<replace dir="${tstamp.value}" includes="build.xml,**/*.java,**/*.properties">
<replacefilter token="com.ibm" value="com.liferay.ibm" />
<replacefilter token="com/ibm" value="com/liferay/ibm" />
</replace>
<replace file="${tstamp.value}/build.xml">
<replacetoken><![CDATA[<unjar src="${icudatajar.file}" dest="${build.dir}" />]]></replacetoken>
<replacevalue><![CDATA[<unjar src="${icudatajar.file}" dest="${build.dir}" />
<move file="classes/com/ibm" todir="classes/com/liferay" />]]></replacevalue>
</replace>
<!--
Use exec because of a bug with com.liferay.ibm.icu.dev.tool.index.IndexGenerator
not picking up the correct base directory.
<ant dir="${tstamp.value}" target="core" inheritAll="false" />
<ant dir="${tstamp.value}" target="jar" inheritAll="false" />-->
<exec dir="${tstamp.value}" executable="/bin/sh" os="${os.unix}">
<arg line="-c 'ant core jar'" />
</exec>
<exec dir="${tstamp.value}" executable="cmd.exe" os="${os.windows}">
<arg line="/c ant core jar" />
</exec>
<move file="${tstamp.value}/icu4j.jar" tofile="${project.dir}/lib/portal/liferay-icu4j.jar.new" />
<delete dir="${tstamp.value}" />
</target>
<target name="build-iw">
<java
classname="com.liferay.portal.tools.InstanceWrapperBuilder"
classpathref="project.classpath"
fork="true"
newenvironment="true"
>
<jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
<arg value="src/com/liferay/portal/tools/instance_wrappers.xml" />
</java>
</target>
<target name="build-json-java-jar">
<get
dest="json-java.zip"
src="https://github.com/douglascrockford/JSON-java/zipball/master"
/>
<tstamp>
<format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
</tstamp>
<unzip
dest="${tstamp.value}/org/json"
src="json-java.zip"
>
<patternset
includes="**/*.java"
/>
<flattenmapper />
</unzip>
<delete file="json-java.zip" />
<antcall target="compile-java">
<param name="javac.classpathref" value="project.classpath" />
<param name="javac.destdir" value="${tstamp.value}" />
<param name="javac.srcdir" value="${tstamp.value}" />
</antcall>
<zip
basedir="${tstamp.value}"
destfile="${project.dir}/lib/portal/json-java.jar.new"
/>
<delete dir="${tstamp.value}" />
</target>
<target name="build-lang">
<antcall target="build-lang-cmd">
<param name="lang.dir" value="src/content" />
<param name="lang.file" value="Language" />
</antcall>
</target>
<target name="build-lang-cmd">
<java
classname="com.liferay.portal.tools.LangBuilder"
classpathref="project.classpath"
fork="true"
newenvironment="true"
>
<jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
<jvmarg value="-Dfile.encoding=UTF-8" />
<jvmarg value="-Duser.country=US" />
<jvmarg value="-Duser.language=en" />
<arg value="lang.dir=${lang.dir}" />
<arg value="lang.file=${lang.file}" />
<arg value="lang.plugin=false" />
<arg value="lang.translate=true" />
</java>
<copy file="${lang.dir}/${lang.file}.properties" tofile="${lang.dir}/${lang.file}_en.properties" />
</target>
<target name="build-lib-versions">
<java
classname="com.liferay.portal.tools.XSLTBuilder"
classpathref="project.classpath"
fork="true"
newenvironment="true"
>
<jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
<arg value="${project.dir}/lib/versions.xml" />
<arg value="${project.dir}/lib/versions.xsl" />
<arg value="${project.dir}/lib/versions.html" />
</java>
</target>
<target name="build-liferay-doclet">
<property name="liferay.doclet.dir" value="${project.dir}/tools/liferay-doclet" />
<property name="jdk.src.dir" value="${liferay.doclet.dir}/jdk-src" />
<mkdir dir="${jdk.src.dir}/src" />
<if>
<not>
<available file="${jdk.src.dir}/jdk-src.jar" />
</not>
<then>
<get
dest="${jdk.src.dir}/jdk-src.jar"
src="http://www.java.net/download/jdk6/6u21/promoted/b05/jdk-6u21-ea-src-b05-jrl-29_may_2010.jar"
verbose="true"
/>
</then>
</if>
<if>
<not>
<available file="${jdk.src.dir}/src/j2se/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/SourceToHTMLConverter.java" />
</not>
<then>
<echo>You will now be prompted to accept the JDK license agreement. Accept it, and then extract the source code into ${jdk.src.dir}/src.</echo>
<java jar="${jdk.src.dir}/jdk-src.jar" fork="true" failonerror="true" />
</then>
</if>
<if>
<not>
<available file="${jdk.src.dir}/src/j2se/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/SourceToHTMLConverter.java" />
</not>
<then>
<fail>The JDK source code is either incompatible or extracted incorrectly.</fail>
</then>
</if>
<delete dir="${liferay.doclet.dir}/src" />
<mkdir dir="${liferay.doclet.dir}/src/com/liferay/tools" />
<copy todir="${liferay.doclet.dir}/src/com/liferay/tools/doclets">
<fileset dir="${jdk.src.dir}/src/j2se/src/share/classes/com/sun/tools/doclets" />
</copy>
<replace dir="${liferay.doclet.dir}/src">
<replacefilter token="com.sun.tools" value="com.liferay.tools" />
</replace>
<patch
failonerror="true"
originalfile="${liferay.doclet.dir}/src/com/liferay/tools/doclets/internal/toolkit/util/SourceToHTMLConverter.java"
patchfile="${project.dir}/tools/liferay-doclet.patch"
/>
<mkdir dir="${liferay.doclet.dir}/classes" />
<copy todir="${liferay.doclet.dir}/classes">
<fileset dir="${liferay.doclet.dir}/src" excludes="**/*.java" />
<fileset file="${jdk.src.dir}/src/JavaResearchLicense.txt" />
</copy>
<javac
classpathref="project.classpath"
compiler="${javac.compiler}"
debug="${javac.debug}"
deprecation="${javac.deprecation}"
destdir="${liferay.doclet.dir}/classes"
encoding="${javac.encoding}"
includeAntRuntime="false"
nowarn="${javac.nowarn}"
srcdir="${liferay.doclet.dir}/src"
/>
<jar
basedir="${liferay.doclet.dir}/classes"
destfile="${liferay.doclet.dir}/liferay-doclet.jar"
/>
<copy file="${liferay.doclet.dir}/liferay-doclet.jar" todir="${project.dir}/lib/development" />
</target>
<target name="build-releaseinfo" if="release.info">
<java
classname="com.liferay.portal.tools.ReleaseInfoBuilder"
classpathref="project.classpath"
fork="true"
newenvironment="true"
>
<jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
</java>
</target>
<target name="build-buildinfo">
<java
classname="com.liferay.portal.tools.BuildInfoBuilder"
classpathref="project.classpath"
fork="true"
newenvironment="true"
>
<jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
</java>
</target>
<target name="build-ruby-gems-jar">
<tstamp>
<format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
</tstamp>
<mkdir dir="${tstamp.value}/compass" />
<get
dest="${tstamp.value}/compass/compass-0.12.2.gem"
src="http://rubygems.org/downloads/compass-0.12.2.gem"
/>
<java
fork="true"
jar="${project.dir}/lib/portal/jruby.jar"
>
<arg line="-S gem install -i ./${tstamp.value}/output ${tstamp.value}/compass/compass-0.12.2.gem --no-rdoc --no-ri" />
</java>
<if>
<os family="windows" />
<then>
<replace dir="${tstamp.value}/output/bin/">
<replacetoken><![CDATA[#! jruby]]></replacetoken>
<replacevalue><![CDATA[#!/usr/bin/env jruby]]></replacevalue>
</replace>
</then>
</if>
<jar
basedir="${tstamp.value}/output"
jarfile="${project.dir}/lib/portal/ruby-gems.jar"
/>
<delete dir="${tstamp.value}" />
</target>
<target name="build-selenium-java-jar">
<get
dest="selenium-firefox-driver-2.33.0-sources.jar"
src="http://search.maven.org/remotecontent?filepath=org/seleniumhq/selenium/selenium-firefox-driver/2.33.0/selenium-firefox-driver-2.33.0-sources.jar"
/>
<tstamp>
<format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
</tstamp>
<unzip
dest="${tstamp.value}"
src="selenium-firefox-driver-2.33.0-sources.jar"
>
<patternset>
<include name="**/FirefoxDriver.java" />
</patternset>
</unzip>
<delete file="selenium-firefox-driver-2.33.0-sources.jar" />
<replace file="${tstamp.value}/org/openqa/selenium/firefox/FirefoxDriver.java">
<replacefilter token="localhost" value="127.0.0.1" />
</replace>
<antcall target="compile-java">
<param name="javac.classpathref" value="project.classpath" />
<param name="javac.destdir" value="${tstamp.value}" />
<param name="javac.srcdir" value="${tstamp.value}" />
</antcall>
<copy
file="${project.dir}/lib/development/selenium-java.jar"
tofile="${project.dir}/lib/development/selenium-java.jar.new"
/>
<jar destfile="${project.dir}/lib/development/selenium-java.jar.new" update="true">
<zipfileset dir="${tstamp.value}" includes="**/*.class" />
</jar>
<delete dir="${tstamp.value}" />
</target>
<target name="build-selenium-old">
<ant dir="../portal-web" target="build-selenium-old" />
</target>
<target name="build-selenium-new">
<ant dir="../portal-web" target="build-selenium-new" />
</target>
<target name="build-selenium-new-action">
<ant dir="../portal-web" target="build-selenium-new-action" />
</target>
<target name="build-selenium-new-function">
<ant dir="../portal-web" target="build-selenium-new-function" />
</target>
<target name="build-selenium-new-macro">
<ant dir="../portal-web" target="build-selenium-new-macro" />
</target>
<target name="build-selenium-new-path">
<ant dir="../portal-web" target="build-selenium-new-path" />
</target>
<target name="build-selenium-new-test-case">
<ant dir="../portal-web" target="build-selenium-new-test-case" />
</target>
<target name="build-selenium-new-test-suite">
<ant dir="../portal-web" target="build-selenium-new-test-suite" />
</target>
<target name="build-selenium-server-jar">
<tstamp>
<format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
</tstamp>
<unzip
dest="${tstamp.value}"
src="${project.dir}/lib/development/selenium-server.jar"
/>
<delete includeemptydirs="true">
<!-- bcprov.jar -->
<fileset
dir="${tstamp.value}"
includes="org/bouncycastle/**"
/>
<!-- bsh.jar -->
<fileset
dir="${tstamp.value}"
includes="bsh/**"
/>
<!-- commons-codec.jar -->
<fileset
dir="${tstamp.value}"
includes="org/apache/commons/codec/**"
/>
<!-- commons-collections.jar -->
<fileset
dir="${tstamp.value}"
includes="org/apache/commons/collections/**"
/>
<!-- commons-io.jar -->
<fileset
dir="${tstamp.value}"
includes="org/apache/commons/io/**"
/>
<!-- commons-lang.jar -->
<fileset
dir="${tstamp.value}"
includes="org/apache/commons/lang/**"
/>
<!-- commons-logging.jar -->
<fileset
dir="${tstamp.value}"
includes="org/apache/commons/logging/**"
/>
<!-- ecj.jar -->
<fileset
dir="${tstamp.value}"
includes="org/eclipse/jdt/**"
/>
<!-- hamcrest*.jar -->
<fileset
dir="${tstamp.value}"
includes="org/hamcrest/**"
/>
<!-- junit.jar -->
<fileset
dir="${tstamp.value}"
includes="junit/**,org/junit/**"
/>
<!-- jasper.jar -->
<fileset
dir="${tstamp.value}"
includes="org/apache/jasper/**"
/>
<!-- json-java.jar -->
<fileset
dir="${tstamp.value}"
includes="org/json/**"
/>
<!-- nekohtml.jar -->
<fileset
dir="${tstamp.value}"
includes="org/cyberneko/**"
/>
<!-- serializer.jar -->
<fileset
dir="${tstamp.value}"
includes="org/apache/xml/serializer/**"
/>
<!-- servlet-api.jar -->
<fileset
dir="${tstamp.value}"
includes="javax/servlet/**"
/>
<!-- slf4j-*.jar -->
<fileset
dir="${tstamp.value}"
includes="org/slf4j/**"
/>
<!-- xalan.jar -->
<fileset
dir="${tstamp.value}"
includes="java_cup/**,org/apache/bcel/**,org/apache/regexp/**,org/apache/xalan/**,org/apache/xml/**,org/apache/xpath/**,trax/**"
/>
<!-- xerces.jar -->
<fileset
dir="${tstamp.value}"
includes="org/apache/html/**,org/apache/wml/**,org/apache/xerces/**,org/apache/xml/serialize/**"
/>
<!-- xml-apis.jar -->
<fileset
dir="${tstamp.value}"
includes="javax/xml/**,org/apache/xmlcommons/**,org/xml/sax/**,org/w3c/dom/**"
/>
</delete>
<copy file="${project.dir}/tools/selenium/extensions/server.js" tofile="${tstamp.value}/core/scripts/user-extensions.js" overwrite="true" />
<zip basedir="${tstamp.value}" destfile="${project.dir}/lib/development/selenium-server.jar.new" />
<delete dir="${tstamp.value}" />
</target>
<target name="build-service">
<java
classname="com.liferay.portal.tools.servicebuilder.ServiceBuilder"
classpathref="project.classpath"
fork="true"
newenvironment="true"
outputproperty="build-service.output"
>
<jvmarg value="-Xms512m" />
<jvmarg value="-Xmx1024m" />
<jvmarg value="-Xss2048k" />
<jvmarg value="-XX:MaxPermSize=512m" />
<arg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
<arg value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger" />
<arg value="service.input.file=${service.file}" />
<arg value="service.hbm.file=${basedir}/src/META-INF/portal-hbm.xml" />
<arg value="service.orm.file=${basedir}/src/META-INF/portal-orm.xml" />
<arg value="service.model.hints.file=${basedir}/src/META-INF/portal-model-hints.xml" />
<arg value="service.spring.file=${basedir}/src/META-INF/portal-spring.xml" />
<arg value="service.api.dir=${basedir}/../portal-service/src" />
<arg value="service.impl.dir=${basedir}/src" />
<arg value="service.remoting.file=${basedir}/../portal-web/docroot/WEB-INF/remoting-servlet.xml" />
<arg value="service.sql.dir=${basedir}/../sql" />
<arg value="service.sql.file=portal-tables.sql" />
<arg value="service.sql.indexes.file=indexes.sql" />
<arg value="service.sql.indexes.properties.file=indexes.properties" />
<arg value="service.sql.sequences.file=sequences.sql" />
<arg value="service.bean.locator.util=com.liferay.portal.kernel.bean.PortalBeanLocatorUtil" />
<arg value="service.props.util=com.liferay.portal.util.PropsUtil" />
<arg value="service.target.entity.name=${service.target.entity.name}" />
<arg value="service.test.dir=${basedir}/test/integration" />
</java>
<delete file="ServiceBuilder.temp" />
<echo>${build-service.output}</echo>
<if>
<contains string="${build-service.output}" substring="Error" />
<then>
<fail>Service Builder generated exceptions.</fail>
</then>
</if>
<ant dir="../portal-service" target="compile" inheritAll="false" />
</target>
<target name="build-service-counter">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/counter/service.xml" />
</antcall>
</target>
<target name="build-service-portal">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portal/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-announcements">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/announcements/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-asset">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/asset/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-blogs">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/blogs/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-bookmarks">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/bookmarks/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-calendar">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/calendar/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-documentlibrary">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/documentlibrary/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-dynamicdatalists">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/dynamicdatalists/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-dynamicdatamapping">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/dynamicdatamapping/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-expando">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/expando/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-flags">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/flags/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-journal">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/journal/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-messageboards">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/messageboards/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-mobiledevicerules">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/mobiledevicerules/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-polls">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/polls/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-ratings">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/ratings/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-shopping">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/shopping/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-social">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/social/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-softwarecatalog">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/softwarecatalog/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-trash">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/trash/service.xml" />
</antcall>
</target>
<target name="build-service-portlet-wiki">
<antcall target="build-service">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/wiki/service.xml" />
</antcall>
</target>
<target name="build-service-portlets">
<antcall target="build-service-portlet-announcements" />
<antcall target="build-service-portlet-asset" />
<antcall target="build-service-portlet-blogs" />
<antcall target="build-service-portlet-bookmarks" />
<antcall target="build-service-portlet-calendar" />
<antcall target="build-service-portlet-documentlibrary" />
<antcall target="build-service-portlet-dynamicdatalists" />
<antcall target="build-service-portlet-dynamicdatamapping" />
<antcall target="build-service-portlet-expando" />
<antcall target="build-service-portlet-flags" />
<antcall target="build-service-portlet-journal" />
<antcall target="build-service-portlet-messageboards" />
<antcall target="build-service-portlet-mobiledevicerules" />
<antcall target="build-service-portlet-polls" />
<antcall target="build-service-portlet-ratings" />
<antcall target="build-service-portlet-shopping" />
<antcall target="build-service-portlet-social" />
<antcall target="build-service-portlet-softwarecatalog" />
<antcall target="build-service-portlet-trash" />
<antcall target="build-service-portlet-wiki" />
</target>
<target name="build-services">
<antcall target="build-service-counter" />
<antcall target="build-service-portal" />
<antcall target="build-service-portlets" />
</target>
<target name="build-struts-jar">
<get
dest="struts-1.2.9-sources.zip"
src="http://search.maven.org/remotecontent?filepath=struts/struts/1.2.9/struts-1.2.9-sources.jar"
/>
<tstamp>
<format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
</tstamp>
<unzip
dest="${tstamp.value}"
src="struts-1.2.9-sources.zip"
>
<patternset>
<include name="**/I18nFactorySet.java" />
</patternset>
</unzip>
<delete file="struts-1.2.9-sources.zip" />
<replace file="${tstamp.value}/org/apache/struts/tiles/xmlDefinition/I18nFactorySet.java">
<replacefilter token="private XmlDefinitionsSet " value="protected XmlDefinitionsSet " />
</replace>
<antcall target="compile-java">
<param name="javac.classpathref" value="project.classpath" />
<param name="javac.destdir" value="${tstamp.value}" />
<param name="javac.srcdir" value="${tstamp.value}" />
</antcall>
<get
dest="${project.dir}/lib/portal/struts.jar.new"
src="http://search.maven.org/remotecontent?filepath=struts/struts/1.2.9/struts-1.2.9.jar"
/>
<jar destfile="${project.dir}/lib/portal/struts.jar.new" update="true">
<zipfileset dir="${tstamp.value}" includes="**/*.class" />
</jar>
<delete dir="${tstamp.value}" />
</target>
<target name="build-themes">
<ant dir="../portal-web" target="build-themes" />
</target>
<target name="build-upgrade-table">
<if>
<isset property="upgrade.table.dir" />
<then>
<for param="zip.file">
<path>
<fileset
dir="${upgrade.table.dir}"
includes="*.zip"
/>
</path>
<sequential>
<antelope:stringutil string="@{zip.file}" property="zip.version.beginindex">
<indexof string="src-" fromindex="0" />
</antelope:stringutil>
<math
datatype="int"
operand1="${zip.version.beginindex}"
operand2="4"
operation="+"
result="zip.version.beginindex"
/>
<antelope:stringutil string="@{zip.file}" property="zip.version.endindex">
<indexof string=".zip" fromindex="0" />
</antelope:stringutil>
<antelope:stringutil string="@{zip.file}" property="zip.version">
<substring beginindex="${zip.version.beginindex}" endindex="${zip.version.endindex}" />
</antelope:stringutil>
<if>
<or>
<not>
<uptodate
srcfile="@{zip.file}"
targetfile="${upgrade.table.dir}/${zip.version}"
/>
</not>
<not>
<available file="${upgrade.table.dir}/${zip.version}/indexes.sql" />
</not>
</or>
<then>
<mkdir dir="${upgrade.table.dir}/${zip.version}" />
<unzip
dest="${upgrade.table.dir}/${zip.version}"
src="@{zip.file}"
>
<patternset>
<include name="**/*ModelImpl.java" />
<include name="**/sql/indexes.sql" />
</patternset>
<mapper type="flatten" />
</unzip>
</then>
</if>
</sequential>
</for>
<java
classname="com.liferay.portal.tools.UpgradeTableBuilder"
classpathref="project.classpath"
fork="true"
newenvironment="true"
>
<arg value="${upgrade.table.dir}" />
</java>
</then>
</if>
</target>
<target name="build-wsdd" depends="compile">
<java
classname="com.liferay.portal.tools.WSDDBuilder"
classpathref="project.classpath"
fork="true"
maxmemory="512m"
newenvironment="true"
outputproperty="build-wsdd.output"
>
<jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
<jvmarg value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger" />
<arg value="wsdd.output.path=src/" />
<arg value="wsdd.server.config.file=${basedir}/../portal-web/docroot/WEB-INF/server-config.wsdd" />
<arg value="wsdd.service.namespace=Portlet" />
<arg value="wsdd.input.file=${service.file}" />
</java>
<echo>${build-wsdd.output}</echo>
<if>
<contains string="${build-wsdd.output}" substring="IOException" />
<then>
<fail>WSDD Builder generated exceptions.</fail>
</then>
</if>
</target>
<target name="build-wsdd-portal">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portal/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-announcements">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/announcements/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-asset">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/asset/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-blogs">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/blogs/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-bookmarks">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/bookmarks/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-calendar">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/calendar/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-documentlibrary">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/documentlibrary/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-dynamicdatalists">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/dynamicdatalists/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-dynamicdatamapping">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/dynamicdatamapping/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-expando">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/expando/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-flags">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/flags/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-journal">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/journal/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-messageboards">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/messageboards/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-mobiledevicerules">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/mobiledevicerules/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-polls">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/polls/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-ratings">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/ratings/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-shopping">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/shopping/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-social">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/social/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-softwarecatalog">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/softwarecatalog/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-trash">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/trash/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlet-wiki">
<antcall target="build-wsdd">
<param name="service.file" value="${basedir}/src/com/liferay/portlet/wiki/service.xml" />
</antcall>
</target>
<target name="build-wsdd-portlets">
<antcall target="build-wsdd-portlet-announcements" />
<antcall target="build-wsdd-portlet-asset" />
<antcall target="build-wsdd-portlet-blogs" />
<antcall target="build-wsdd-portlet-bookmarks" />
<antcall target="build-wsdd-portlet-documentlibrary" />
<antcall target="build-wsdd-portlet-dynamicdatalists" />
<antcall target="build-wsdd-portlet-dynamicdatamapping" />
<antcall target="build-wsdd-portlet-expando" />
<antcall target="build-wsdd-portlet-flags" />
<antcall target="build-wsdd-portlet-journal" />
<antcall target="build-wsdd-portlet-messageboards" />
<antcall target="build-wsdd-portlet-mobiledevicerules" />
<antcall target="build-wsdd-portlet-polls" />
<antcall target="build-wsdd-portlet-ratings" />
<antcall target="build-wsdd-portlet-shopping" />
<antcall target="build-wsdd-portlet-social" />
<antcall target="build-wsdd-portlet-softwarecatalog" />
<antcall target="build-wsdd-portlet-trash" />
<antcall target="build-wsdd-portlet-wiki" />
</target>
<target name="build-wsdds">
<antcall target="build-wsdd-portal" />
<antcall target="build-wsdd-portlets" />
</target>
<target name="build-yui-compressor-jar">
<jarjar jarfile="${project.dir}/lib/portal/liferay-yui-compressor.jar.new">
<rule pattern="org.mozilla.**" result="com.yahoo.platform.yui.mozilla.@1" />
<zipfileset src="${project.dir}/tools/yuicompressor-2.4.7.jar" />
</jarjar>
</target>
<target name="clean">
<delete dir="classes" />
<antcall target="build-common-java.clean" />
</target>
<target name="compile">
<if>
<and>
<equals arg1="${app.server.type}" arg2="tomcat" />
<antelope:endswith string="${app.server.portal.dir}" with="/portal-web/docroot" />
</and>
<then>
<delete file="${app.server.lib.portal.dir}/portal-impl.jar" />
<antcall target="compile-dependencies" />
<antcall target="compile-fast" />
</then>
<else>
<antcall target="compile-dependencies" />
<antcall target="build-common-java.compile" />
</else>
</if>
<antcall target="build-buildinfo" inheritAll="false" />
<antcall target="print-current-time" />
</target>
<target name="compile-dependencies">
<copy todir="${portal-impl.classes.dir}/com/liferay/portal/definitions" preservelastmodified="true">
<fileset dir="${project.dir}/definitions" />
</copy>
<copy todir="${portal-impl.classes.dir}/com/liferay/portal/deploy/dependencies" preservelastmodified="true">
<fileset
dir="${project.dir}/classes"
includes="*.properties"
/>
<fileset
dir="${project.dir}/portal-web/docroot/WEB-INF/tld"
includes="*.tld"
/>
</copy>
<copy todir="${portal-impl.classes.dir}/com/liferay/portal/tools/sql/dependencies" preservelastmodified="true">
<fileset
dir="${project.dir}/sql"
includes="portal-data-common.sql,portal-data-counter.sql,portal-data-release.sql,portal-tables.sql,indexes.properties,indexes.sql,quartz-tables.sql,sequences.sql,update-*.sql"
/>
</copy>
<copy file="${project.dir}/classes/log4j.properties" todir="${portal-impl.classes.dir}" preservelastmodified="true" />
<copy file="${project.dir}/classes/logging.properties" todir="${portal-impl.classes.dir}" preservelastmodified="true" />
<if>
<not>
<available file="${portal-impl.classes.dir}/jamwiki.properties" />
</not>
<then>
<unzip
dest="${portal-impl.classes.dir}"
src="${project.dir}/tools/jamwiki-0.9.3-src.zip"
>
<patternset
includes="**/main/resources/ApplicationResources.properties,**/main/resources/jamwiki-configuration.xml,**/main/resources/logging.properties,**/main/resources/interwiki.properties"
/>
</unzip>
<move todir="${portal-impl.classes.dir}">
<fileset
dir="${portal-impl.classes.dir}/jamwiki-0.9.3/main/resources"
excludes="logging.properties"
/>
</move>
<concat destfile="${portal-impl.classes.dir}/logging.properties.new">
<fileset file="${portal-impl.classes.dir}/logging.properties" />
<fileset file="${portal-impl.classes.dir}/jamwiki-0.9.3/main/resources/logging.properties" />
</concat>
<move file="${portal-impl.classes.dir}/logging.properties.new" tofile="${portal-impl.classes.dir}/logging.properties" />
<delete dir="${portal-impl.classes.dir}/jamwiki-0.9.3" />
<echo file="${portal-impl.classes.dir}/jamwiki.properties">
database-type=com.liferay.portlet.wiki.engines.mediawiki.LiferayDataHandler
props-initialized=true
search-engine=com.liferay.portlet.wiki.engines.mediawiki.LiferaySearchEngine
</echo>
</then>
</if>
<copy todir="${portal-impl.classes.dir}" preservelastmodified="true">
<fileset dir="src" excludes="**/*.java,**/META-INF/javadocs-all*.xml" />
</copy>
</target>
<target name="compile-fast">
<if>
<and>
<equals arg1="${app.server.type}" arg2="tomcat" />
<antelope:endswith string="${app.server.portal.dir}" with="/portal-web/docroot" />
</and>
<then>
<javac
classpathref="project.classpath"
compiler="${javac.compiler}"
debug="${javac.debug}"
deprecation="${javac.deprecation}"
destdir="${app.server.classes.portal.dir}"
encoding="${javac.encoding}"
includeAntRuntime="false"
nowarn="${javac.nowarn}"
srcdir="src"
/>
</then>
</if>
</target>
<target name="compile-test">
<ant dir="${project.dir}/portal-service" target="compile-test" inheritAll="false" />
<antcall target="build-common.compile-test" />
</target>
<target name="compile-tools">
<antcall target="compile-dependencies" />
<javac
classpathref="project.classpath"
compiler="${javac.compiler}"
debug="${javac.debug}"
deprecation="${javac.deprecation}"
destdir="${portal-impl.classes.dir}"
includeAntRuntime="false"
includes="**/portal/tools/**"
nowarn="${javac.nowarn}"
srcdir="src"
/>
</target>
<target name="deploy">
<ant dir="../portal-service" target="deploy" inheritAll="false" />
<antcall target="deploy-properties" />
<if>
<and>
<equals arg1="${app.server.type}" arg2="tomcat" />
<antelope:endswith string="${app.server.portal.dir}" with="/portal-web/docroot" />
</and>
<then>
<delete file="${app.server.lib.portal.dir}/portal-impl.jar" />
<copy todir="${app.server.classes.portal.dir}/com/liferay/portal/definitions" preservelastmodified="true">
<fileset dir="${project.dir}/definitions" />
</copy>
<copy todir="${app.server.classes.portal.dir}" preservelastmodified="true">
<fileset dir="src" includes="**/dependencies/**,**/service.xml" />
</copy>
<antcall target="compile" />
</then>
<else>
<antcall target="build-common-java.deploy" />
<copy file="classes/log4j.properties" todir="${app.server.classes.portal.dir}" preservelastmodified="true" />
<copy file="classes/logging.properties" todir="${app.server.classes.portal.dir}" preservelastmodified="true" />
</else>
</if>
</target>
<target name="deploy-properties">
<ant dir=".." target="deploy-properties" inheritAll="false" />
</target>
<target name="format-source">
<copy todir="classes" overwrite="true" preservelastmodified="true">
<fileset dir="src" includes="com/liferay/portal/tools/dependencies/*.properties" />
</copy>
<java
classname="com.liferay.portal.tools.sourceformatter.SourceFormatter"
classpathref="project.classpath"
dir="${project.dir}"
fork="true"
newenvironment="true"
>
<jvmarg value="-Xmx512m" />
<jvmarg value="-Xss2048k" />
<jvmarg value="-Dsource.formatter.check.unprocessed.exceptions=${source.formatter.check.unprocessed.exceptions}" />
<jvmarg value="-Dsource.formatter.excludes=${source.formatter.excludes}" />
</java>
<delete file="ServiceBuilder.temp" />
</target>
<target name="format-tld">
<java
classname="com.liferay.portal.tools.TLDFormatter"
classpathref="project.classpath"
dir="${project.dir}"
fork="true"
newenvironment="true"
>
<jvmarg value="-Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties" />
</java>
<delete file="ServiceBuilder.temp" />
</target>
<target name="jar" depends="compile">
<ant dir="../util-bridges" target="jar" inheritAll="false" />
<ant dir="../util-java" target="jar" inheritAll="false" />
<ant dir="../util-taglib" target="jar" inheritAll="false" />
<copy todir="${portal-impl.classes.dir}/com/liferay/portal/deploy/dependencies/osgi/core" preservelastmodified="true">
<fileset dir="${project.dir}/osgi/lib/${module.framework.implementation}/core" includes="*.jar" />
</copy>
<fileset dir="${portal-impl.classes.dir}/com/liferay/portal/deploy/dependencies/osgi/core" id="osgi.core.jars">
<include name="*.jar" />
</fileset>
<pathconvert property="osgi.core.jars.list" pathsep="," refid="osgi.core.jars">
<flattenmapper />
</pathconvert>
<echo file="${portal-impl.classes.dir}/com/liferay/portal/deploy/dependencies/osgi/core/jars.txt">${osgi.core.jars.list}</echo>
<copy todir="${portal-impl.classes.dir}/com/liferay/portal/deploy/dependencies/osgi/portal" preservelastmodified="true">
<fileset dir="${project.dir}/osgi/lib/common/portal" includes="*.jar" />
<fileset dir="${project.dir}/osgi/lib/${module.framework.implementation}/portal" includes="*.jar" />
</copy>
<fileset dir="${portal-impl.classes.dir}/com/liferay/portal/deploy/dependencies/osgi/portal" id="osgi.portal.jars">
<include name="*.jar" />
</fileset>
<pathconvert property="osgi.portal.jars.list" pathsep="," refid="osgi.portal.jars">
<flattenmapper />
</pathconvert>
<echo file="${portal-impl.classes.dir}/com/liferay/portal/deploy/dependencies/osgi/portal/jars.txt">${osgi.portal.jars.list}</echo>
<for list="1,2,3,4,5,6,7,8,9" param="index">
<sequential>
<if>
<available file="${portal-impl.classes.dir}/com/liferay/portal/deploy/dependencies/plugins@{index}" />
<then>
<fileset dir="${portal-impl.classes.dir}/com/liferay/portal/deploy/dependencies/plugins@{index}" id="plugins@{index}.wars">
<include name="*.war" />
</fileset>
<pathconvert property="plugins@{index}.wars.list" pathsep="," refid="plugins@{index}.wars">
<flattenmapper />
</pathconvert>
<echo file="${portal-impl.classes.dir}/com/liferay/portal/deploy/dependencies/plugins@{index}/wars.txt">${plugins@{index}.wars.list}</echo>
</then>
</if>
</sequential>
</for>
<if>
<not>
<and>
<equals arg1="${app.server.type}" arg2="tomcat" />
<antelope:endswith string="${app.server.portal.dir}" with="/portal-web/docroot" />
</and>
</not>
<then>
<antcall target="build-common-java.jar" />
</then>
</if>
</target>
<target name="rebuild-hypersonic">
<ant dir="../sql" target="rebuild-hypersonic" />
</target>
<target name="sync-plugins-git-to-svn">
<java
classname="com.liferay.portal.tools.PluginsGitSvnSyncer"
classpathref="project.classpath"
fork="true"
newenvironment="true"
>
<jvmarg value="-Dgit.plugins.dir=L:/projects/github/liferay-plugins" />
<jvmarg value="-Dsvn.plugins.dir=L:/projects/liferay.public/plugins/trunk" />
<jvmarg value="-Dsync.to=svn" />
</java>
</target>
<target name="sync-plugins-svn-to-git">
<java
classname="com.liferay.portal.tools.PluginsGitSvnSyncer"
classpathref="project.classpath"
newenvironment="true"
fork="true"
>
<jvmarg value="-Dgit.plugins.dir=L:/projects/github/liferay-plugins" />
<jvmarg value="-Dsvn.plugins.dir=L:/projects/liferay.public/plugins/trunk" />
<jvmarg value="-Dsync.to=git" />
</java>
</target>
<target name="tcpmon">
<java
classname="org.apache.axis.utils.tcpmon"
classpathref="project.classpath"
fork="true"
newenvironment="true"
>
<jvmarg value="-Xmx128m" />
</java>
</target>
<target name="update-from-plugins-test-pacl-portlet">
<!-- Copy Java files -->
<copy overwrite="true" todir="test/integration/com/liferay/portal/security/pacl/test">
<fileset
dir="${lp.plugins.dir}/portlets/test-pacl-portlet/docroot/WEB-INF/src/com/liferay/testpacl"
includes="hook/**,messaging/**"
/>
<filterchain>
<tokenfilter>
<replacestring from="com.liferay.testpacl" to="com.liferay.portal.security.pacl.test" />
</tokenfilter>
</filterchain>
</copy>
<!-- Update TestPACLMessageListener.java -->
<replace file="test/integration/com/liferay/portal/security/pacl/test/messaging/TestPACLMessageListener.java">
<replacetoken><![CDATA[import com.liferay.portal.security.pacl.test.util.TestPACLUtil;]]></replacetoken>
<replacevalue><![CDATA[import com.liferay.portal.model.User;
import com.liferay.portal.service.PortalServiceUtil;
import com.liferay.portal.service.UserLocalServiceUtil;
import com.liferay.portal.util.TestPropsValues;
import java.util.HashMap;]]></replacevalue>
</replace>
<replace file="test/integration/com/liferay/portal/security/pacl/test/messaging/TestPACLMessageListener.java">
<replacetoken><![CDATA[protected Map<String, Boolean> getResults(Message message) {]]></replacetoken>
<replacevalue><![CDATA[protected Map<String, Object> getResults(Message message) throws Exception {
Map<String, Object> results = new HashMap<String, Object>();
try {
int buildNumber = PortalServiceUtil.getBuildNumber();
results.put("PortalServiceUtil#getBuildNumber", buildNumber);
}
catch (SecurityException se) {
}
try {
User user = UserLocalServiceUtil.getUser(
TestPropsValues.getUserId());
results.put("UserLocalServiceUtil#getUser", user);
}
catch (SecurityException se) {
}
return results;
}]]></replacevalue>
</replace>
<replaceregexp
flags="s"
file="test/integration/com/liferay/portal/security/pacl/test/messaging/TestPACLMessageListener.java"
match="long userId = (.*)"
replace="${line.separator}}"
/>
<!-- Copy WEB-INF files -->
<copy overwrite="true" todir="test/integration/com/liferay/portal/security/pacl/test/dependencies">
<fileset
dir="${lp.plugins.dir}/portlets/test-pacl-portlet/docroot"
includes="WEB-INF/liferay-hook.xml,WEB-INF/liferay-plugin-package.properties"
/>
<filterchain>
<tokenfilter>
<replacestring from="com.liferay.testpacl" to="com.liferay.portal.security.pacl.test" />
</tokenfilter>
</filterchain>
</copy>
<!-- Update liferay-plugin-package.properties -->
<replace file="test/integration/com/liferay/portal/security/pacl/test/dependencies/WEB-INF/liferay-plugin-package.properties">
<replacetoken>Test Portal Access Control List</replacetoken>
<replacevalue>A Test</replacevalue>
</replace>
<replaceregexp
flags="g"
file="test/integration/com/liferay/portal/security/pacl/test/dependencies/WEB-INF/liferay-plugin-package.properties"
match="(portal-dependency-jars|portal-dependency-tlds|required-deployment-contexts)=(\\\n[^\\\n]+)*\n\n"
replace=""
/>
<replace file="test/integration/com/liferay/portal/security/pacl/test/dependencies/WEB-INF/liferay-plugin-package.properties">
<replacetoken>security-manager-enabled=true</replacetoken>
<replacevalue>security-manager-enabled=true
security-manager-awt-operations=\
accessEventQueue</replacevalue>
</replace>
<replaceregexp
flags="g"
file="test/integration/com/liferay/portal/security/pacl/test/dependencies/WEB-INF/liferay-plugin-package.properties"
match="security-manager-files-(delete|execute|write)=(\\\n[^\\\n]+)*(?=\n\n)"
replace="security-manager-files-\1="
/>
<replace file="test/integration/com/liferay/portal/security/pacl/test/dependencies/WEB-INF/liferay-plugin-package.properties">
<replacetoken>security-manager-files-delete=</replacetoken>
<replacevalue>security-manager-files-delete=\
${liferay.home}${/}pacl-test${/}-</replacevalue>
</replace>
<replaceregexp
flags="g"
file="test/integration/com/liferay/portal/security/pacl/test/dependencies/WEB-INF/liferay-plugin-package.properties"
match="security-manager-files-read=(\\\n[^\\\n]+)*(\\\n\s*\\)(?=\n[ ]{4}/bin/bash)"
replace="security-manager-files-read=\2"
/>
<replace file="test/integration/com/liferay/portal/security/pacl/test/dependencies/WEB-INF/liferay-plugin-package.properties">
<replacetoken>security-manager-files-read=</replacetoken>
<replacevalue>security-manager-files-read=\
${env:JAVA_HOME}${/},\
${java.home}${/}bin${/}java,\
${java.home}${/}bin${/}java.exe,\
${liferay.home}${/}pacl-test${/},\
${liferay.home}${/}pacl-test${/}-,</replacevalue>
</replace>
<replace file="test/integration/com/liferay/portal/security/pacl/test/dependencies/WEB-INF/liferay-plugin-package.properties">
<replacetoken>security-manager-files-write=</replacetoken>
<replacevalue>security-manager-files-write=\
${liferay.home}${/}pacl-test${/},\
${liferay.home}${/}pacl-test${/}-</replacevalue>
</replace>
<replace file="test/integration/com/liferay/portal/security/pacl/test/dependencies/WEB-INF/liferay-plugin-package.properties">
<replacetoken>security-manager-get-bean-property[portal]=</replacetoken>
<replacevalue>security-manager-get-bean-property=</replacevalue>
</replace>
<replaceregexp
flags="g"
file="test/integration/com/liferay/portal/security/pacl/test/dependencies/WEB-INF/liferay-plugin-package.properties"
match="(security-manager-get-bean-property=)([\s\S]*?)(,\\\n[ ]{4})(?=com.liferay.portal.util.PortalUtil)"
replace="\1\2\3com.liferay.portal.kernel.util.InfrastructureUtil\3"
/>
<replace file="test/integration/com/liferay/portal/security/pacl/test/dependencies/WEB-INF/liferay-plugin-package.properties">
<replacetoken>security-manager-hook-custom-jsp-dir-enabled=false</replacetoken>
<replacevalue>security-manager-get-bean-property[portal]=\
com.liferay.portal.kernel.xml.SAXReader
security-manager-get-bean-property[flash-portlet]=\
com.liferay.portal.kernel.bean.PortletBeanLocatorUtil#liferayDataSource
security-manager-hook-custom-jsp-dir-enabled=false</replacevalue>
</replace>
<replaceregexp
flags="g"
file="test/integration/com/liferay/portal/security/pacl/test/dependencies/WEB-INF/liferay-plugin-package.properties"
match="(security-manager-services\[portal\]=)([\s\S]*?)(,\\\n[ ]{4})(?=com.liferay.portal.service.ResourceLocalService)"
replace="\1\2\3com.liferay.portal.service.PortletPreferencesLocalService#getStrictPreferences\3com.liferay.portal.service.UserLocalService#getDefaultUser\3"
/>
<replace file="test/integration/com/liferay/portal/security/pacl/test/dependencies/WEB-INF/liferay-plugin-package.properties">
<replacetoken>security-manager-sockets-accept=\</replacetoken>
<replacevalue>security-manager-set-bean-property[flash-portlet]=\
com.liferay.portal.kernel.bean.PortletBeanLocatorUtil
security-manager-sockets-accept=\</replacevalue>
</replace>
<!-- Copy WEB-INF/classes files -->
<copy overwrite="true" todir="test/integration/com/liferay/portal/security/pacl/test/dependencies/WEB-INF/classes">
<fileset
dir="${lp.plugins.dir}/portlets/test-pacl-portlet/docroot/WEB-INF/src"
includes="portal.properties,content/**,META-INF/base-spring.xml,META-INF/hibernate-spring.xml,META-INF/infrastructure-spring.xml,META-INF/messaging-spring.xml"
/>
<filterchain>
<tokenfilter>
<replacestring from="com.liferay.testpacl" to="com.liferay.portal.security.pacl.test" />
</tokenfilter>
</filterchain>
</copy>
<!-- Update hibernate-spring.xml -->
<replace file="test/integration/com/liferay/portal/security/pacl/test/dependencies/WEB-INF/classes/META-INF/hibernate-spring.xml">
<replacetoken><![CDATA[<bean id="liferayHibernateSessionFactory" class="com.liferay.portal.kernel.spring.util.SpringFactoryUtil" factory-method="newBean">]]></replacetoken>
<replacevalue><![CDATA[<bean id="liferayHibernateSessionFactory" class="com.liferay.portal.spring.hibernate.PortletHibernateConfiguration">
<property name="dataSource" ref="liferayDataSource" />
</bean>]]></replacevalue>
</replace>
<replaceregexp
flags="s"
file="test/integration/com/liferay/portal/security/pacl/test/dependencies/WEB-INF/classes/META-INF/hibernate-spring.xml"
match="&lt;/bean(.*)&lt;bean id=&quot;liferaySessionFactory"
replace="&lt;/bean>${line.separator}&#x9;&lt;bean id=&quot;liferaySessionFactory"
/>
</target>
<target name="upgrade-db">
<java
classname="com.liferay.portal.tools.DBUpgrader"
classpathref="project.classpath"
fork="true"
maxmemory="1024m"
newenvironment="true"
>
<jvmarg value="-Dfile.encoding=UTF-8" />
<jvmarg value="-Duser.country=US" />
<jvmarg value="-Duser.language=en" />
<jvmarg value="-Duser.timezone=GMT" />
</java>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment