Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

255 lines (217 sloc) 6.402 kb
<?xml version="1.0"?>
<project name="portal-test-plugins" basedir="." default="test" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-test.xml" />
<target name="deploy-extra-apps">
<fail message="Please set the property ${extra.apps.zip.file.name}" unless="extra.apps.zip.file.name" />
<get-auto-deploy-dir />
<unzip
dest="${auto.deploy.dir}"
src="${extra.apps.zip.file.name}"
/>
</target>
<target name="deploy-simple-server-plugins">
<get-auto-deploy-dir />
<if>
<equals arg1="${app.server.type}" arg2="jboss" />
<then>
<echo file="${lp.plugins.dir}/build.${user.name}.properties">app.server.parent.dir=${app.server.parent.dir}
app.server.type=${app.server.type}
app.server.jboss.dir=${app.server.dir}
auto.deploy.dir=${auto.deploy.dir}
plugins.includes=${plugins.includes}</echo>
</then>
<else>
<echo file="${lp.plugins.dir}/build.${user.name}.properties">app.server.parent.dir=${app.server.parent.dir}
app.server.type=${app.server.type}
auto.deploy.dir=${auto.deploy.dir}
plugins.includes=${plugins.includes}</echo>
</else>
</if>
<if>
<equals arg1="${java.security}" arg2="true" />
<then>
<if>
<not>
<resourcecontains
resource="${lp.plugins.dir}/${plugin.types}/${portlet.plugins.includes}/docroot/WEB-INF/liferay-plugin-package.properties"
substring="security-manager-enabled=true"
/>
</not>
<then>
<echo append="true" file="${lp.plugins.dir}/${plugin.types}/${portlet.plugins.includes}/docroot/WEB-INF/liferay-plugin-package.properties">
security-manager-enabled=true</echo>
</then>
</if>
</then>
</if>
<if>
<equals arg1="${liferay.portal.bundle}" arg2="6.1.20" />
<then>
<echo file="${lp.plugins.dir}/build.${user.name}.properties" append="true">
app.server.tomcat.dir=${app.server.parent.dir}/tomcat-7.0.27</echo>
</then>
</if>
<for list="${plugins.includes}" param="plugin">
<sequential>
<get-testcase-property property.name="portlet.properties.@{plugin}" />
<if>
<isset property="portlet.properties.@{plugin}" />
<then>
<propertycopy
from="portlet.properties.@{plugin}"
name="portlet.properties"
override="true"
/>
<echo file="${lp.plugins.dir}/${plugin.types}/@{plugin}/docroot/WEB-INF/src/portlet-ext.properties">${portlet.properties}</echo>
</then>
<else>
<delete file="${lp.plugins.dir}/${plugin.types}/@{plugin}/docroot/WEB-INF/src/portlet-ext.properties" />
</else>
</if>
<if>
<equals arg1="@{plugin}" arg2="so-portlet" />
<then>
<echo file="${lp.plugins.dir}/${plugin.types}/@{plugin}/overwrite/META-INF/custom_jsps/html/portlet/dockbar/license_warning.jsp" />
</then>
</if>
</sequential>
</for>
<if>
<matches pattern="http" string="${test.build.plugins.war.zip.url}" />
<then>
<for list="${plugins.includes}" param="plugin.includes">
<sequential>
<pathconvert pathsep="," property="plugin.war" setonempty="false">
<path>
<fileset
dir="plugins"
includes="@{plugin.includes}*.war"
/>
</path>
</pathconvert>
<propertyregex
input="${plugin.war}"
override="true"
property="plugin.war"
regexp=",.*"
replace=""
/>
<if>
<isset property="plugin.war" />
<then>
<get-auto-deploy-dir />
<copy file="${plugin.war}" todir="${auto.deploy.dir}" />
<var name="plugin.war" unset="true" />
</then>
<else>
<ant dir="${lp.plugins.dir}/${plugin.types}/@{plugin.includes}" inheritAll="false">
<target name="clean" />
<target name="deploy" />
</ant>
</else>
</if>
</sequential>
</for>
</then>
<else>
<if>
<isset property="plugin.types" />
<then>
<ant-execute
ant.dir="${lp.plugins.dir}/${plugin.types}"
ant.target="clean"
/>
<ant-execute
ant.dir="${lp.plugins.dir}/${plugin.types}"
ant.target="deploy"
/>
</then>
<else>
<ant-execute
ant.dir="${lp.plugins.dir}"
ant.target="clean"
/>
<ant-execute
ant.dir="${lp.plugins.dir}"
ant.target="deploy"
/>
</else>
</if>
</else>
</if>
<delete dir="${lp.plugins.dir}/dist" />
<mkdir dir="${lp.plugins.dir}/dist" />
</target>
<target name="test-plugin">
<if>
<or>
<contains string="${test.plugin}" substring="layouttpl" />
<contains string="${test.plugin}" substring="shared" />
</or>
<then>
<var name="select" value="\2" />
</then>
<else>
<var name="select" value="\2s" />
</else>
</if>
<if>
<equals arg1="${test.plugin}" arg2="portal-http-service" />
<then>
<var name="test.plugin.type" value="shared" />
</then>
<else>
<propertyregex
input="${test.plugin}"
override="true"
property="test.plugin.type"
regexp="(\w+-)+(\w+)"
select="${select}"
/>
</else>
</if>
<get-auto-deploy-dir />
<echo file="${lp.plugins.dir}/build.${user.name}.properties">app.server.parent.dir=${app.server.parent.dir}
app.server.type=${app.server.type}
auto.deploy.dir=${auto.deploy.dir}
plugins.includes=${test.plugin}</echo>
<ant-execute
ant.dir="${lp.plugins.dir}/${test.plugin.type}/${test.plugin}"
ant.target="clean"
/>
<if>
<contains string="${test.plugin}" substring="portlet" />
<then>
<ant-execute
ant.dir="${lp.plugins.dir}/${test.plugin.type}/${test.plugin}"
ant.target="compile-jsp"
/>
</then>
<else>
<ant-execute
ant.dir="${lp.plugins.dir}/${test.plugin.type}/${test.plugin}"
ant.target="compile"
/>
</else>
</if>
</target>
<target name="test-plugin-group">
<if>
<not>
<isset property="test.plugin.group.index" />
</not>
<then>
<fail>Use "ant test-plugin-group -Dtest.plugin.group.index=0".</fail>
</then>
</if>
<property file="${project.dir}/test.plugin.names.properties" />
<propertycopy from="TEST_PLUGIN_GROUP_${test.plugin.group.index}" name="test.plugins" />
<for list="${test.plugins}" param="test.plugin">
<sequential>
<antcall target="test-plugin">
<param name="test.plugin" value="@{test.plugin}" />
</antcall>
</sequential>
</for>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.