blob: 5286479bf2105152343cca1dc6d3413d57ed0965 [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE project [
<!--
Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
http://www.eclipse.org/legal/epl-2.0.
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the
Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
version 2 with the GNU Classpath Exception, which is available at
https://www.gnu.org/software/classpath/license.html.
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
<!ENTITY commonBuild SYSTEM "./../../config/common.xml">
]>
<project name="i18n-simple" default="all" basedir=".">
&commonBuild;
<property name="testName" value="i18n-simple"/>
<property name="contextRoot" value="/"/>
<property name="archivedir" value="${build}/archives"/>
<target name="prepare" depends="init">
<mkdir dir="${build}"/>
<mkdir dir="${build}/war"/>
<mkdir dir="${archivedir}"/>
<mkdir dir="${archivedir}/a/b"/>
<property name="all.ear" value="${archivedir}/${testName}App.ear"/>
<property name="misc.jar" value="${archivedir}/a/b/${testName}-misc.jar"/>
</target>
<target name="compile" depends="prepare">
<javac srcdir="misc" destdir="${build}" debug="on" failonerror="true">
<classpath refid="gfv3.classpath"/>
</javac>
<javac srcdir="war" destdir="${build}" debug="on" failonerror="true">
<classpath refid="gfv3.classpath"/>
</javac>
<javac srcdir="client" destdir="${build}" debug="on" failonerror="true">
<classpath refid="gfv3.classpath"/>
</javac>
</target>
<target name="assemble" depends="compile">
<jar destfile="${misc.jar}">
<fileset dir="${build}" includes="**/*.class"
excludes="**/TestClient.class"/>
</jar>
<ant dir="war" target="private-all">
<property name="build" value="${build}/war"/>
<property name="archivedir" value="${archivedir}"/>
</ant>
<ear destfile="${all.ear}" basedir="${archivedir}"
appxml="descriptor/application.xml" includes="**/*.jar, *.war">
<metainf file="descriptor/glassfish-application.xml"/>
</ear>
</target>
<target name="deploy.asadmin" depends="prepare">
<antcall target="common.deploy.asadmin">
<param name="arg.list" value="--retrieve ${archivedir} --name ${testName} ${all.ear}"/>
<param name="testName" value="${testName}"/>
</antcall>
</target>
<target name="undeploy.asadmin" depends="prepare">
<antcall target="common.undeploy.asadmin">
<param name="arg.list" value="${testName}"/>
<param name="testName" value="${testName}"/>
</antcall>
</target>
<target name="runclient" depends="init">
<echo message="TestClient ${arg.list}"/>
<javaWithResult
fork="true"
failonerror="false"
jvm="${JAVA}"
classname="i18n.simple.TestClient"
output="${build}/${log.id}.output.log"
resultproperty="result">
<jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${http.host}"/>
<jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
<classpath>
<path location="${inst}/lib/javaee.jar"/>
<path location="${build}"/>
</classpath>
<arg line="${arg.list}"/>
</javaWithResult>
<antcall target="processResult">
<param name="result" value="${result}"/>
<param name="log" value="${build}/${log.id}.output.log"/>
</antcall>
</target>
<target name="run" depends="run.positive"/>
<target name="run.positive" depends="setHttpPort">
<antcall target="common.run.positive">
<param name="link" value="${contextRoot}/${testName}"/>
<param name="log.id" value="${log.id}"/>
</antcall>
</target>
<target name="private-all">
<antcall target="assemble"/>
<antcall target="deploy.asadmin"/>
<antcall target="run.positive">
<param name="log.id" value="1"/>
<param name="desc" value="libClasspath Test asadmin deploy"/>
</antcall>
<antcall target="undeploy.asadmin"/>
</target>
</project>