Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 699e0fa976
Fetching contributors…

Cannot retrieve contributors at this time

233 lines (185 sloc) 8.111 kb
<?xml version="1.0"?>
<project name="portal-test-weblogic-10.3" basedir="." default="test" xmlns:antelope="antlib:ise.antelope.tasks">
<import file="build-test.xml" />
<target name="run-selenium-weblogic-10.3">
<antcall target="prepare-vm-server">
<param name="vm.vmdk.suffix" value="weblogic-10.3.2" />
</antcall>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c C:\oracle\middleware\user_projects\domains\base_domain\bin\stopWebLogic.cmd" />
</exec>
<tstamp>
<format property="tstamp.value" pattern="yyyyMMddkkmmssSSS" />
</tstamp>
<unzip src="dist/liferay-portal-dependencies-${lp.version}.zip" dest="${tstamp.value}">
<mapper type="flatten" />
</unzip>
<copy todir="${tstamp.value}">
<fileset
dir="lib/development"
includes="hsql.jar,jtds.jar,mysql.jar,postgresql.jar"
/>
<fileset
dir="lib/portal"
includes="serializer.jar,xalan.jar"
/>
</copy>
<if>
<isset property="jdbc.drivers.optional.dir" />
<then>
<copy todir="${tstamp.value}">
<fileset
dir="${jdbc.drivers.optional.dir}"
includes="*.jar"
/>
</copy>
</then>
</if>
<antcall target="install-vm-java" />
<exec executable="${pscp.executable}">
<arg line="-pw ${vm.password} ${tstamp.value}\*.jar ${vm.username}@${vm.host}:/oracle/middleware/user_projects/domains/base_domain/lib" />
</exec>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c mkdir C:\Java\jdk-1.6.0_23\jre\lib\endorsed" />
</exec>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c move C:\oracle\middleware\user_projects\domains\base_domain\lib\serializer.jar C:\Java\jdk-1.6.0_23\jre\lib\endorsed" />
</exec>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c move C:\oracle\middleware\user_projects\domains\base_domain\lib\xalan.jar C:\Java\jdk-1.6.0_23\jre\lib\endorsed" />
</exec>
<delete dir="${tstamp.value}" />
<exec executable="${pscp.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host}:/oracle/middleware/user_projects/domains/base_domain/bin/setDomainEnv.cmd setDomainEnv.cmd" />
</exec>
<replace file="setDomainEnv.cmd">
<replacefilter token="set JAVA_PROPERTIES=%JAVA_PROPERTIES% %EXTRA_JAVA_PROPERTIES%" value="set JAVA_PROPERTIES=-Dfile.encoding=UTF8 %JAVA_PROPERTIES% %EXTRA_JAVA_PROPERTIES%" />
<replacefilter token="set MEM_MAX_PERM_SIZE_32BIT=-XX:MaxPermSize=128m" value="set MEM_MAX_PERM_SIZE_32BIT=-XX:MaxPermSize=256m" />
<replacefilter token="set WLS_MEM_ARGS_32BIT=-Xms256m -Xmx512m" value="set WLS_MEM_ARGS_32BIT=-Xms256m -Xmx1024m" />
<replacefilter token="set SUN_JAVA_HOME=C:\Oracle\Middleware\jdk160_14_R27.6.5-32" value="set SUN_JAVA_HOME=C:\Java\jdk-1.6.0_23" />
<replacefilter token="set JAVA_HOME=C:\Oracle\Middleware\jdk160_14_R27.6.5-32" value="set JAVA_HOME=C:\Java\jdk-1.6.0_23" />
</replace>
<exec executable="${pscp.executable}">
<arg line="-pw ${vm.password} setDomainEnv.cmd ${vm.username}@${vm.host}:/oracle/middleware/user_projects/domains/base_domain/bin/setDomainEnv.cmd" />
</exec>
<delete file="setDomainEnv.cmd" />
<parallel>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c C:\oracle\middleware\user_projects\domains\base_domain\bin\startWebLogic.cmd" />
</exec>
<sequential>
<waitfor>
<http url="http://${vm.host}:7001/console" />
</waitfor>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} C:\Java\jdk-1.6.0_23\bin\java.exe -cp C:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic.jar -Xmx1024m weblogic.Deployer -adminurl t3://localhost:7001 -user system -password password1 -deploy -upload C:\liferay-portal-${lp.version}.war" />
</exec>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c C:\oracle\middleware\user_projects\domains\base_domain\bin\stopWebLogic.cmd" />
</exec>
</sequential>
</parallel>
<if>
<isset property="hook.plugins.includes" />
<then>
<ant antfile="build-test-plugins.xml" target="deploy-weblogic-10.3-plugins">
<property name="plugin.types" value="hooks" />
<property name="plugins.deployed" value="${plugins.deployed}" />
<property name="plugins.includes" value="${hook.plugins.includes}" />
</ant>
<property name="plugins.deployed" value="true" />
</then>
</if>
<if>
<isset property="plugins.version.includes" />
<then>
<ant antfile="build-test-plugins.xml" target="deploy-versioned-weblogic-10.3-plugins">
<property name="plugins.includes" value="${plugins.version.includes}" />
</ant>
</then>
</if>
<if>
<isset property="portlet.plugins.includes" />
<then>
<ant antfile="build-test-plugins.xml" target="deploy-weblogic-10.3-plugins">
<property name="plugin.types" value="portlets" />
<property name="plugins.deployed" value="${plugins.deployed}" />
<property name="plugins.includes" value="${portlet.plugins.includes}" />
</ant>
<property name="plugins.deployed" value="true" />
</then>
</if>
<if>
<isset property="portlet.plugins.upgrade.includes" />
<then>
<ant antfile="build-test-plugins.xml" target="deploy-upgrade-weblogic-10.3-plugins">
<property name="plugin.types" value="portlets" />
<property name="plugins.includes" value="${portlet.plugins.upgrade.includes}" />
</ant>
</then>
</if>
<if>
<isset property="theme.plugins.includes" />
<then>
<ant antfile="build-test-plugins.xml" target="deploy-weblogic-10.3-plugins">
<property name="plugin.types" value="themes" />
<property name="plugins.deployed" value="${plugins.deployed}" />
<property name="plugins.includes" value="${theme.plugins.includes}" />
</ant>
<property name="plugins.deployed" value="true" />
</then>
</if>
<if>
<isset property="web.plugins.includes" />
<then>
<ant antfile="build-test-plugins.xml" target="deploy-weblogic-10.3-plugins">
<property name="plugin.types" value="webs" />
<property name="plugins.deployed" value="${plugins.deployed}" />
<property name="plugins.includes" value="${web.plugins.includes}" />
</ant>
<property name="plugins.deployed" value="true" />
</then>
</if>
<antcall target="revert-test-properties" />
<replace
file="portal-impl/test/test-portal-impl.properties"
token="localhost:8080"
value="${vm.host}:7001"
/>
<replace
file="portal-web/test/test-portal-web.properties"
token="localhost:8080"
value="${vm.host}:7001"
/>
<antcall target="prepare-selenium" />
<antcall target="start-selenium" />
<antcall target="clean-up-logs" />
<record action="start" name="log" />
<antcall target="run-weblogic-10.3">
<param name="test.class" value="${test.name}" />
</antcall>
<record action="stop" name="log" />
<antcall target="evaluate-logs" />
<antcall target="stop-selenium" />
<exec dir="${vm.drive}/${vm.host}" executable="${vmware-cmd.executable}">
<arg line="${vm.drive}\${vm.host}\${vm.host}.vmx stop hard" />
</exec>
</target>
<target name="run-weblogic-10.3">
<antcall target="rebuild-database" inheritAll="false" />
<parallel>
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c C:\oracle\middleware\user_projects\domains\base_domain\bin\startWebLogic.cmd" />
</exec>
<sequential>
<waitfor>
<http url="http://${vm.host}:7001/console" />
</waitfor>
<antcall target="run-selenium-test" />
<exec executable="${plink.executable}">
<arg line="-pw ${vm.password} ${vm.username}@${vm.host} cmd.exe /c C:\oracle\middleware\user_projects\domains\base_domain\bin\stopWebLogic.cmd" />
</exec>
</sequential>
</parallel>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.