blob: d7df978241ee1063bb04a6556d3cf5272f1a6760 [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-ssl" 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">
</target>
<target name="unsetup" depends="init-common">
</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>
<antcall target="compile-common">
<param name="src" value="servletws"/>
<param name="build.classes.dir" value="${build.classes.dir}/servletws"/>
</antcall>
</target>
<target name="compile-client" depends="prepare-truststore-common, init-security-util">
<mkdir dir="${build.classes.dir}/client"/>
<antcall target="wsimport">
<!--value="-keep -d ${build.classes.dir}/client https://${s1asCN}:${https.port}/WssSslEjbService/HelloEjb?WSDL"/>-->
<param name="wsimport.VMARGS" value=" -Djavax.net.ssl.trustStore=${build.base.dir}/cacerts.jks -Djavax.net.ssl.trustStorePassword=${ssl.password}"/>
<param name="wsimport.args"
value="-keep -d ${build.classes.dir}/client https://${s1asCN}:${https.port}/WssSslEjbService/HelloEjb?WSDL"/>
</antcall>
<antcall target="wsimport">
<param name="wsimport.VMARGS" value=" -Djavax.net.ssl.trustStore=${build.base.dir}/cacerts.jks -Djavax.net.ssl.trustStorePassword=${ssl.password}"/>
<param name="wsimport.args"
value="-keep -d ${build.classes.dir}/client https://${s1asCN}:${https.port}/security-wss-ssl/webservice/WssSslServletService/HelloServlet?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="${s1asCN}"/>
<replacefilter token="@PORT@" value="${https.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>
<antcall target="package-war-common">
<param name="war.classes" value="${build.classes.dir}/servletws"/>
<param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
</antcall>
<copy file="${application.xml}" tofile="${build.classes.dir}/META-INF/application.xml" failonerror="false"/>
<jar jarfile="${assemble.dir}/${appname}App.ear">
<fileset dir="${assemble.dir}">
<include name="*.jar"/>
<include name="*.war"/>
</fileset>
<fileset dir="${build.classes.dir}">
<include name="META-INF/application.xml"/>
</fileset>
</jar>
</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-common"/>
<antcall target="build-client"/>
<antcall target="deploy-client-common"/>
</target>
<target name="run" depends="prepare-truststore-common">
<exec executable="${APPCLIENT}">
<env key="VMARGS" value=" -Djavax.net.ssl.trustStore=${build.base.dir}/cacerts.jks -Djavax.net.ssl.trustStorePassword=${ssl.password}"/>
<arg line="-client" />
<arg line="${assemble.dir}/${appname}-clientClient.jar"/>
<arg line="-texauth"/>
<arg line="-user" />
<arg line="dummy" />
<arg line="-password" />
<arg line="dummy" />
</exec>
</target>
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
<antcall target="undeploy-client-common"/>
</target>
<target name="usage">
<antcall target="usage-common"/>
</target>
</project>