| <?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/common.xml"> |
| <!ENTITY commonBuild SYSTEM "file:./../../../../config/properties.xml"> |
| <!ENTITY commonSec SYSTEM "file:./../../sec-common.xml"> |
| <!ENTITY commonSecProp SYSTEM "file:./../../sec-common.properties"> |
| <!ENTITY testproperties SYSTEM "file:./build.properties"> |
| ]> |
| |
| |
| <project name="sec-wss-jaxws-servletws" default="usage" basedir="."> |
| |
| &commonSetup; |
| &commonBuild; |
| &commonSec; |
| &commonSecProp; |
| &testproperties; |
| |
| <target name="all" depends="display-header, clean, build, deploy, build-client,run,undeploy"/> |
| |
| <target name="build-deploy-run" depends="display-header, clean, build, deploy, build-client, run"/> |
| |
| <target name="display-header"> |
| <echo message="-->Running ${ant.project.name} tests from ${basedir} ..."/> |
| </target> |
| |
| <target name="run-test" depends="clean, build, deploy, build-client, run, undeploy"/> |
| |
| <target name="clean" depends="init-common"> |
| <antcall target="clean-common"/> |
| </target> |
| |
| <target name="compile" depends="init-common,clean-common,update-wsdl-location"> |
| <antcall target="compile-common"> |
| <param name="src" value="web"/> |
| </antcall> |
| </target> |
| |
| <target name="update-wsdl-location" depends="init-common"> |
| <copy file="client/TaxCalClient.java.template" tofile="client/TaxCalClient.java" overwrite="true"/> |
| <replace file="client/TaxCalClient.java" token="localhost:8080" value="${http.host}:${http.port}"/> |
| </target> |
| |
| <target name="compile-client" depends="init-common,clean-common"> |
| <mkdir dir="${build.classes.dir}"/> |
| <antcall target="generate-client-artifacts"/> |
| <antcall target="compile-common"> |
| <param name="src" value="client"/> |
| </antcall> |
| </target> |
| |
| |
| <!-- Generation of service wsdl file. |
| Run this target in case you need to update the wsdl file |
| after making changes to the endpoint. |
| --> |
| <target name="generate-wsdl" depends="init-common"> |
| <exec executable="${WSGEN}"> |
| <arg line="-classpath ${build.classes.dir}"/> |
| <arg line="-keep "/> |
| <arg line="-nd wsdl"/> |
| <arg line="-d ${build.classes.dir}"/> |
| <arg line="-s ${build.classes.dir}"/> |
| <arg line="-wsdl "/> |
| <arg line="com.sun.appserv.sqe.security.wss.annotations.Tax"/> |
| </exec> |
| </target> |
| |
| <target name="generate-server-artifacts" depends="init-common"> |
| <exec executable="${WSIMPORT}"> |
| <arg line="-keep "/> |
| <arg line="-d ${build.classes.dir}"/> |
| <arg line="wsdl/TaxService.wsdl"/> |
| </exec> |
| </target> |
| |
| <target name="generate-client-artifacts" depends="init-common"> |
| <exec executable="${WSIMPORT}"> |
| <arg line="-keep "/> |
| <arg line="-d ${build.classes.dir}"/> |
| <arg line="http://${http.host}:${http.port}/${appname}-web/wss/TaxService?wsdl"/> |
| </exec> |
| </target> |
| |
| <target name="build-war" depends="init-common"> |
| <antcall target="webclient-war-common"> |
| <param name="hasWebclient" value="true"/> |
| <param name="webclient.war.classes" |
| value="**/wss/annotations/*.class" /> |
| <param name="war.classes" |
| value="**/wss/annotations/*.class" /> |
| </antcall> |
| </target> |
| |
| <target name="build-client" depends="init-common, compile-client"> |
| <antcall target="ws-package-appclientjar-common"> |
| <param name="appclientjar.classes" |
| value="**/taxws/*.class **/wss/annotations/client/*.class" /> |
| <param name="appclientjar.files" |
| value="${build.classes.dir}"/> |
| <param name="appclient.jar" |
| value="${assemble.dir}/${appname}-client.jar"/> |
| </antcall> |
| </target> |
| |
| <target name="ws-package-appclientjar-common" depends="init-common"> |
| <mkdir dir="${assemble.dir}"/> |
| <delete file="${appclient.jar}" failonerror="false"/> |
| <mkdir dir="${build.classes.dir}/META-INF"/> |
| <mkdir dir="${build.classes.dir}/META-INF/wsdl"/> |
| <copy file="${application-client.xml}" |
| tofile="${build.classes.dir}/META-INF/application-client.xml"/> |
| <copy file="${sun-application-client.xml}" |
| tofile="${build.classes.dir}/META-INF/sun-application-client.xml"/> |
| <copy failonerror="false" file="${wsdlfile.location}/${wsdlfile.name}" |
| tofile="${build.classes.dir}/META-INF/wsdl/${wsdlfile.name}"/> |
| <copy failonerror="false" file="${wsdlfile.location}/${wsdlschemafile.name}" |
| tofile="${build.classes.dir}/META-INF/wsdl/${wsdlschemafile.name}"/> |
| <jar jarfile="${appclient.jar}" basedir="${appclientjar.files}" |
| update="true" includes="${appclientjar.classes}" |
| manifest="./client/MANIFEST.MF"> |
| |
| <fileset dir="${build.classes.dir}" includes="${client-mapping.xml}"/> |
| <metainf dir="${build.classes.dir}/META-INF"> |
| <include name="application-client.xml"/> |
| <include name="sun-application-client.xml"/> |
| </metainf> |
| </jar> |
| <delete dir="${build.classes.dir}/META-INF" failonerror="false"/> |
| </target> |
| |
| <target name="build" depends="init-common,compile"> |
| <antcall target="build-war"/> |
| </target> |
| |
| <target name="deploy-war" depends="init-common"> |
| <antcall target="deploy-war-common"> |
| <param name="contextroot" value="${appname}-web"/> |
| <param name="deployed.module" value="${assemble.dir}/${appname}-web.war"/> |
| </antcall> |
| </target> |
| |
| <target name="undeploy-war" depends="init-common"> |
| <antcall target="undeploy-war-common"> |
| <param name="contextroot" value="${appname}-web"/> |
| </antcall> |
| </target> |
| |
| <target name="deploy" depends="init-common"> |
| <antcall target="deploy-war"/> |
| </target> |
| |
| <target name="run"> |
| <antcall target="runclient-ssl"/> |
| </target> |
| |
| <target name="runclient-nossl" depends="init-common"> |
| <property name="endpoint-url" |
| value="http://${http.host}:${http.port}/${appname}-web/wss/TaxService"/> |
| <exec executable="${APPCLIENT}" dir="${build.classes.dir}"> |
| <env key="APPCPATH" value="${env.APS_HOME}/lib/reporter.jar"/> |
| <arg line="-client"/> |
| <arg line="${assemble.dir}/${appname}-client.jar"/> |
| <arg line="${endpoint-url}"/> |
| </exec> |
| </target> |
| |
| <target name="runclient-ssl" depends="set-appserver-version"> |
| <antcall target="runclient-ssl-pe"/> |
| <antcall target="runclient-ssl-ee"/> |
| </target> |
| |
| <target name="runclient-local" depends="init-common"> |
| <echo message="Executing appclient at ${basedir}"/> |
| <property name="endpoint-url" |
| value="http://${http.host}:${http.port}/${appname}-web/wss/TaxService"/> |
| <exec executable="${APPCLIENT}" |
| failonerror="false" timeout="1500000" |
| outputproperty="runclientCommonOutput"> |
| <arg line="-client" /> |
| <arg line="${assemble.dir}/${appname}-client.jar"/> |
| <arg line="-textauth"/> |
| <arg line="-user j2ee"/> |
| <arg line="-password j2ee"/> |
| <arg line="-xml ${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/> |
| <env key="APPCPATH" value="${env.APS_HOME}/lib/reporter.jar"/> |
| </exec> |
| <echo message="${runclientCommonOutput}"/> |
| <antcall target="check-runclient-output" inheritAll="true" inheritRefs="true"/> |
| <!-- confirming report generation... --> |
| <antcall target="checkReporting-common"> |
| <param name="test.name" value="${appname}"/> |
| <param name="test.description" value="${test.description}"/> |
| <param name="test.count" value="1"/> |
| </antcall> |
| </target> |
| |
| <target name="runclient-ssl-pe" depends="init-common" unless="isEE"> |
| <echo message="Test is running on Platform Edition!"/> |
| <property name="endpoint-url" |
| value="http://${http.host}:${http.port}/${appname}-web/wss/TaxService"/> |
| |
| <exec executable="${APPCLIENT}"> |
| <env key="VMARGS" value="-Djavax.net.ssl.keyStore=${admin.domain.dir}/${admin.domain}/config/keystore.jks -Djavax.net.ssl.keyStorePassword=${master.password} -Djavax.net.ssl.trustStore=${admin.domain.dir}/${admin.domain}/config/cacerts.jks -Djavax.net.ssl.trustStorePassword=${master.password}" /> |
| <env key="APPCPATH" value="${env.APS_HOME}/lib/reporter.jar"/> |
| <arg value="-client" /> |
| <arg value="${assemble.dir}/${appname}-client.jar"/> |
| <arg value="-textauth"/> |
| <arg value="-user"/> |
| <arg value="j2ee"/> |
| <arg value="-password"/> |
| <arg value="j2ee"/> |
| <arg line="-xml ${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/> |
| <arg line="${endpoint-url}"/> |
| </exec> |
| <!-- confirming report generation... --> |
| <antcall target="checkReporting-common"> |
| <param name="test.name" value="${appname}"/> |
| <param name="test.description" value="${test.description}"/> |
| <param name="test.count" value="1"/> |
| </antcall> |
| </target> |
| |
| <target name="runclient-ssl-ee" depends="init-common" if="isEE"> |
| <echo message="Test is running on Standard/Enterprise Edition!"/> |
| <property name="endpoint-url" |
| value="http://${http.host}:${http.port}/${appname}-web/wss/TaxService"/> |
| |
| <exec executable="${APPCLIENT}"> |
| <env key="VMARGS" value=" -Djavax.net.ssl.keyStore=${env.APS_HOME}/sqetests/security/wss/s1as.jks -Djavax.net.ssl.trustStore=${admin.domain.dir}/${admin.domain}/config/certdb_cacerts.jks -Djavax.net.ssl.trustStorePassword=changeit" /> |
| <env key="APPCPATH" value="${env.APS_HOME}/lib/reporter.jar"/> |
| <arg value="-client" /> |
| <arg value="${assemble.dir}/${appname}-client.jar"/> |
| <!-- dummy user added as appclient throwing login window --> |
| <arg value="-textauth"/> |
| <arg value="-user"/> |
| <arg value="temp"/> |
| <arg value="-password"/> |
| <arg value="temp"/> |
| <arg line="-xml ${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/> |
| <arg line="${endpoint-url}"/> |
| </exec> |
| <!-- confirming report generation... --> |
| <antcall target="checkReporting-common"> |
| <param name="test.name" value="${appname}"/> |
| <param name="test.description" value="${test.description}"/> |
| <param name="test.count" value="1"/> |
| </antcall> |
| |
| </target> |
| |
| |
| |
| <target name="undeploy" depends="init-common"> |
| <antcall target="undeploy-war"/> |
| </target> |
| |
| <target name="usage"> |
| <antcall target="usage-common"/> |
| </target> |
| |
| <!-- |
| ======================================================= |
| User Defined specific targets |
| ======================================================= |
| --> |
| </project> |