blob: 04a70cbf043c983ce9fbc3370884ff64c2f5c15f [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 commonSetup SYSTEM "file:./../../../../config/properties.xml">
<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
<!ENTITY commonSecurity SYSTEM "file:../../common.xml">
<!ENTITY testproperties SYSTEM "file:./build.properties">
]>
<project name="security-wss-roles2" default="usage" basedir=".">
&commonSetup;
&commonBuild;
&testproperties;
&commonSecurity;
<target name="all" depends="clean, setup, build-deploy, run, undeploy, unsetup"/>
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
<target name="setup" depends="init-common">
<antcall target="create-user-common">
<param name="user" value="javaee"/>
<param name="password" value="javaee"/>
<param name="groups" value="javaee"/>
</antcall>
<!-- exports certdb stuff and imports into keystore -->
<antcall target="prepare-store-nickname-common">
<param name="cert.nickname" value="s1as"/>
</antcall>
</target>
<target name="unsetup" depends="init-common">
<antcall target="delete-user-common">
<param name="user" value="javaee"/>
</antcall>
</target>
<target name="compile-server" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejbws"/>
<param name="build.classes.dir" value="${build.classes.dir}/ejbws"/>
</antcall>
</target>
<target name="compile-client">
<mkdir dir="${build.classes.dir}/client"/>
<antcall target="wsimport">
<param name="wsimport.args"
value="-keep -d ${build.classes.dir}/client http://${http.host}:${http.port}/WssRoles2EjbService/HelloEjb?WSDL"/>
</antcall>
<delete file="client/Client.java" failonerror="false"/>
<copy file="client/Client.java.template" tofile="client/Client.java"/>
<replace file="client/Client.java">
<replacefilter token="@HOST@" value="${http.host}"/>
<replacefilter token="@PORT@" value="${http.port}"/>
</replace>
<javac srcdir="client" destdir="${build.classes.dir}/client"
classpath="${env.APS_HOME}/lib/reporter.jar:${env.S1AS_HOME}/lib/j2ee.jar:${env.S1AS_HOME}/lib/webservices-rt.jar:${env.S1AS_HOME}/lib/webservices-tools.jar:${build.classes.dir}/client" debug="on" failonerror="true"/>
</target>
<target name="build-server" depends="compile-server">
<mkdir dir="${assemble.dir}"/>
<mkdir dir="${build.classes.dir}/META-INF"/>
<antcall target="package-ejbjar-common">
<param name="ejbjar.files" value="${build.classes.dir}/ejbws"/>
<param name="ejb.jar" value="${assemble.dir}/${appname}-ejb.jar"/>
<param name="ejbjar.classes" value="com/sun/**/*.class"/>
</antcall>
</target>
<target name="build-client" depends="compile-client">
<mkdir dir="${assemble.dir}"/>
<unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
<antcall target="package-appclientjar-common">
<param name="appclientjar.files"
value="${build.classes.dir}/client"/>
<param name="appclient.jar"
value="${assemble.dir}/${appname}-client.jar"/>
<param name="appclientjar.classes"
value="com/sun/**/*.class"/>
</antcall>
</target>
<target name="build-deploy" depends="init-common">
<antcall target="build-server"/>
<antcall target="deploy-jar-common"/>
<antcall target="build-client"/>
<antcall target="deploy-client-common"/>
</target>
<target name="run" depends="init-common">
<exec executable="${APPCLIENT}">
<env key="VMARGS" value="-Djavax.net.ssl.keyStore=${mykeystore.db.file} -Djavax.net.ssl.trustStore=${mytruststore.db.file} -Djavax.net.ssl.keyStorePassword=${ssl.password} -Djavax.net.ssl.trustStorePassword=${ssl.password}"/>
<arg line="-xml ${env.S1AS_HOME}/domains/domain1/config/glassfish-acc.xml" />
<arg line="-client" />
<arg line="${assemble.dir}/${appname}-clientClient.jar"/>
<arg line="-texauth"/>
<arg line="-user" />
<arg line="javaee" />
<arg line="-password" />
<arg line="javaee" />
</exec>
</target>
<target name="undeploy" depends="init-common">
<antcall target="undeploy-jar-common"/>
<antcall target="undeploy-client-common"/>
</target>
<target name="usage">
<antcall target="usage-common"/>
</target>
</project>