blob: a52c8517e3437dce196bd84e95dbc89df74a42e9 [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE project [
<!--
Copyright (c) 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 commonSetup SYSTEM "file:./../../../config/properties.xml">
<!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml">
<!ENTITY commonRun SYSTEM "file:./../../../config/run.xml">
<!ENTITY testproperties SYSTEM "file:./build.properties">
]>
<project name="simple-authApp" default="usage" basedir=".">
&commonSetup;
&commonBuild;
&commonRun;
&testproperties;
<target name="all"
depends="clean,build,setup,deploy,run,undeploy,unsetup"/>
<!-- run-test target added to have setup/unsetup commonly -->
<target name="run-test"
depends="clean,build,deploy,run,undeploy">
</target>
<target name="all-no-delete"
depends="clean,build,setup,deploy,run"/>
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
<target name="build">
<property name="hasWebclient" value="yes"/>
<antcall target="webclient-war-common">
<param name="hasWebclient" value="yes"/>
<param name="webclient.war.classes" value="**/*.class"/>
</antcall>
<antcall target="local-ear-common"/>
<javac
srcdir="."
classpath="${env.APS_HOME}/lib/reporter.jar"
includes="WebTest.java"/>
</target>
<target name="setup">
<antcall target="create-user-common">
<param name="user" value="testuser3"/>
<param name="password" value="secret"/>
<param name="groups" value="testgroup1"/>
</antcall>
<antcall target="create-user-common">
<param name="user" value="testuser42"/>
<param name="password" value="secret"/>
<param name="groups" value="testgroup5"/>
</antcall>
<antcall target="create-user-common">
<param name="user" value="j2ee"/>
<param name="password" value="j2ee"/>
<param name="groups" value="testgroup10"/>
</antcall>
</target>
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
</target>
<!-- run local WebTest so it can check output -->
<target name="run" depends="init-common">
<java classname="WebTest">
<arg value="${http.host}"/>
<arg value="${http.port}"/>
<classpath>
<pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
<pathelement location="."/>
</classpath>
</java>
</target>
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
</target>
<target name="unsetup">
<!-- remove test users, just cleanup. -->
<antcall target="delete-user-common">
<param name="user" value="testuser3"/>
</antcall>
<antcall target="delete-user-common">
<param name="user" value="testuser42"/>
</antcall>
<antcall target="delete-user-common">
<param name="user" value="j2ee"/>
</antcall>
<delete file="WebTest.class"/>
</target>
<target name="usage">
<antcall target="usage-common"/>
</target>
<!-- ================================================================ -->
<!-- Target to assemble the ejb application to ear file -->
<!-- (also copy sun-app.xml not done by ear-common target) -->
<!-- ================================================================ -->
<target name="local-ear-common" depends="fixFiles,init-common">
<delete file="${assemble.dir}/${appname}.ear"/>
<mkdir dir="${assemble.dir}"/>
<mkdir dir="${build.classes.dir}/META-INF"/>
<copy file="${sun-application.xml}"
tofile="${build.classes.dir}/META-INF/sun-application.xml"
failonerror="true"/>
<ear earfile="${assemble.dir}/${appname}App.ear"
appxml="${application.xml}">
<fileset dir="${assemble.dir}">
<include name="*.war"/>
</fileset>
<fileset dir="${build.classes.dir}">
<include name="META-INF/sun-application.xml"/>
</fileset>
</ear>
</target>
</project>