| <?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-servletws" default="usage" basedir="."> |
| |
| &commonSetup; |
| &commonBuild; |
| &commonSecProp; |
| &commonSec; |
| &testproperties; |
| |
| <target name="all" depends="display-header, clean, build, deploy, run, undeploy"/> |
| |
| <target name="run-test" |
| depends="clean, build, deploy, run, undeploy"/> |
| |
| <target name="clean" depends="init-common"> |
| <antcall target="clean-common"/> |
| </target> |
| |
| <target name="display-header"> |
| <echo message="-->Running ${ant.project.name} tests from ${basedir} ..."/> |
| </target> |
| |
| <target name="compile" depends="init-common,clean-common, generate-artifacts"> |
| <antcall target="compile-common"> |
| <param name="src" value="client"/> |
| </antcall> |
| <antcall target="compile-common"> |
| <param name="src" value="web"/> |
| </antcall> |
| </target> |
| |
| <target name="generate-artifacts"> |
| <antcall target="import-wsdl"> |
| <param name="mapping.file" |
| value="${client-mapping.xml}"/> |
| <param name="config-wsdl.file" |
| value="config/config-client.xml"/> |
| </antcall> |
| <antcall target="import-wsdl"> |
| <param name="mapping.file" |
| value="${web-mapping.xml}"/> |
| <param name="config-wsdl.file" |
| value="config/config-web.xml"/> |
| </antcall> |
| </target> |
| <target name="ws-package-appclientjar-common"> |
| <mkdir dir="${assemble.dir}"/> |
| <delete file="${appclient.jar}" failonerror="false"/> |
| <mkdir dir="${build.classes.dir}/META-INF"/> |
| <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 file="${wsdl-file}" |
| tofile="${build.classes.dir}/META-INF/${wsdl-file}"/> |
| <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"/> |
| <include name="${wsdl-file}"/> |
| </metainf> |
| </jar> |
| <delete dir="${build.classes.dir}/META-INF" failonerror="false"/> |
| </target> |
| <target name="ws-package-war-common"> |
| <echo message="my build classes dir is:${build.classes.dir}"/> |
| <delete file="${war.file}"/> |
| <mkdir dir="${build.classes.dir}/tmp"/> |
| <mkdir dir="${build.classes.dir}/tmp/WEB-INF"/> |
| <mkdir dir="${build.classes.dir}/tmp/WEB-INF/classes"/> |
| <copy file="${sun-web.xml}" |
| tofile="${build.classes.dir}/tmp/WEB-INF/sun-web.xml" failonerror="false"/> |
| <copy file="${webservices.xml}" |
| tofile="${build.classes.dir}/tmp/WEB-INF/webservices.xml" |
| failonerror="false"/> |
| <copy file="${mappingfile.location}/${mappingfile.name}" |
| tofile="${build.classes.dir}/tmp/${mappingfile.name}" |
| failonerror="false"/> |
| <copy file="${wsdlfile.location}/${wsdlfile.name}" |
| tofile="${build.classes.dir}/tmp/WEB-INF/wsdl/${wsdlfile.name}" |
| failonerror="false"/> |
| <copy file="${web.xml}" |
| tofile="${build.classes.dir}/tmp/WEB-INF/web.xml"/> |
| <copy todir="${build.classes.dir}/tmp/WEB-INF/classes"> |
| <fileset dir="${build.classes.dir}"> |
| <include name="${war.classes}"/> |
| </fileset> |
| </copy> |
| <echo message="Creating war file ${war.file}"/> |
| <jar jarfile="${war.file}" update="true"> |
| <fileset dir="${build.classes.dir}/tmp" casesensitive="yes"> |
| <include name="**/*class*"/> |
| </fileset> |
| <fileset dir="${basedir}/web" casesensitive="yes"> |
| <include name="**/*.html"/> |
| <include name="**/*.jsp"/> |
| <include name="**/*.gif"/> |
| <include name="**/*.do"/> |
| <exclude name="**/*.java,**/*.xml,**/*.properties"/> |
| </fileset> |
| <fileset dir="${build.classes.dir}/tmp/" casesensitive="true"> |
| <include name="WEB-INF/web.xml"/> |
| <include name="WEB-INF/sun-web.xml"/> |
| <include name="WEB-INF/webservices.xml"/> |
| <include name="WEB-INF/wsdl/${wsdlfile.name}"/> |
| <include name="${mappingfile.name}"/> |
| </fileset> |
| </jar> |
| <echo message="created war file ${war.file}"/> |
| <delete dir="${build.classes.dir}/tmp/WEB-INF" failonerror="false"/> |
| <echo message="my webclient war classes are:${webclient.war.classes}"/> |
| </target> |
| |
| <target name="build" depends="init-common,compile"> |
| <antcall target="ws-package-appclientjar-common"> |
| <param name="appclientjar.classes" |
| value="com/sun/appserv/sqe/security/wss/servletws/taxcal/client/*.class" /> |
| <param name="appclientjar.files" |
| value="${build.classes.dir}"/> |
| <param name="appclient.jar" |
| value="${assemble.dir}/${appname}-client.jar"/> |
| </antcall> |
| <!--antcall target="ws-war-common"--> |
| <antcall target="ws-package-war-common"> |
| <param name="war.file" value="${assemble.dir}/${appname}-web.war"/> |
| <param name="war.classes" |
| value="com/sun/appserv/sqe/security/wss/servletws/taxcal/*.class" /> |
| <param name="mappingfile.name" |
| value="${web-mapping.xml}" /> |
| <param name="mappingfile.location" |
| value="${build.classes.dir}"/> |
| <param name="webservices.xml" |
| value="${web-webservices.xml}" /> |
| </antcall> |
| <antcall target="ear-common"/> |
| </target> |
| |
| <target name="deploy" |
| depends="init-common"> |
| <antcall target="deploy-common"/> |
| </target> |
| |
| <target name="run"> |
| <antcall target="runclient-ssl-win"/> |
| <antcall target="runclient-ssl-unix"/> |
| </target> |
| |
| <target name="runclient-ssl-win" depends="set-appserver-version" if="isWindows"> |
| <antcall target="runclient-ssl-pe-win"/> |
| <antcall target="runclient-ssl-ee-win"/> |
| </target> |
| |
| <target name="runclient-ssl-pe-win" depends="init-common" unless="isEE"> |
| <echo message="Test is running on Platform Edition!"/> |
| <property name="statetax-endpoint-url" |
| value="http://${http.host}:${http.port}/TaxCalWSServlet/statetaxservlet"/> |
| <property name="fedtax-endpoint-url" |
| value="http://${http.host}:${http.port}/TaxCalWSServlet/fedtaxservlet"/> |
| <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}"/> |
| <arg value="-client" /> |
| <arg value="${assemble.dir}/${appname}AppClient.jar"/> |
| <!-- dummy user added as appclient throwing login window --> |
| <arg value="-textauth"/> |
| <arg value="-user"/> |
| <arg value="munta"/> |
| <arg value="-password"/> |
| <arg value="munta"/> |
| <arg line="-xml "${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml""/> |
| <arg line="${statetax-endpoint-url} ${fedtax-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="2"/> |
| </antcall> |
| </target> |
| |
| <target name="runclient-ssl-ee-win" depends="init-common" if="isEE"> |
| <echo message="Test is running on Standard/Enterprise Edition!"/> |
| <property name="statetax-endpoint-url" |
| value="http://${http.host}:${http.port}/TaxCalWSServlet/statetaxservlet"/> |
| <property name="fedtax-endpoint-url" |
| value="http://${http.host}:${http.port}/TaxCalWSServlet/fedtaxservlet"/> |
| <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"" /> |
| <arg value="-client" /> |
| <arg value="${assemble.dir}/${appname}AppClient.jar"/> |
| <!-- dummy user added as appclient throwing login window --> |
| <arg value="-textauth"/> |
| <arg value="-user"/> |
| <arg value="munta"/> |
| <arg value="-password"/> |
| <arg value="munta"/> |
| <arg line="-xml "${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml""/> |
| <arg line="${statetax-endpoint-url} ${fedtax-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="2"/> |
| </antcall> |
| </target> |
| |
| <target name="runclient-ssl-unix" depends="set-appserver-version" if="isUnix"> |
| <antcall target="runclient-ssl-pe-unix"/> |
| <antcall target="runclient-ssl-ee-unix"/> |
| </target> |
| <target name="runclient-ssl-pe-unix" depends="init-common" unless="isEE"> |
| <echo message="Test is running on Platform Edition!"/> |
| <property name="statetax-endpoint-url" |
| value="http://${http.host}:${http.port}/TaxCalWSServlet/statetaxservlet"/> |
| <property name="fedtax-endpoint-url" |
| value="http://${http.host}:${http.port}/TaxCalWSServlet/fedtaxservlet"/> |
| <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}"/> |
| <arg value="-client" /> |
| <arg value="${assemble.dir}/${appname}AppClient.jar"/> |
| <!-- dummy user added as appclient throwing login window --> |
| <arg value="-textauth"/> |
| <arg value="-user"/> |
| <arg value="munta"/> |
| <arg value="-password"/> |
| <arg value="munta"/> |
| <arg line="-xml ${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/> |
| <arg line="${statetax-endpoint-url} ${fedtax-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="2"/> |
| </antcall> |
| </target> |
| |
| <target name="runclient-ssl-ee-unix" depends="init-common" if="isEE"> |
| <echo message="Test is running on Standard/Enterprise Edition!"/> |
| <property name="statetax-endpoint-url" |
| value="http://${http.host}:${http.port}/TaxCalWSServlet/statetaxservlet"/> |
| <property name="fedtax-endpoint-url" |
| value="http://${http.host}:${http.port}/TaxCalWSServlet/fedtaxservlet"/> |
| <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" /> |
| <arg value="-client" /> |
| <arg value="${assemble.dir}/${appname}AppClient.jar"/> |
| <!-- dummy user added as appclient throwing login window --> |
| <arg value="-textauth"/> |
| <arg value="-user"/> |
| <arg value="munta"/> |
| <arg value="-password"/> |
| <arg value="munta"/> |
| <arg line="-xml ${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/> |
| <arg line="${statetax-endpoint-url} ${fedtax-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="2"/> |
| </antcall> |
| </target> |
| |
| |
| <target name="undeploy" depends="init-common"> |
| <antcall target="undeploy-common"/> |
| </target> |
| |
| <target name="usage"> |
| <antcall target="usage-common"/> |
| </target> |
| |
| <!-- |
| ======================================================= |
| User Defined specific targets |
| ======================================================= |
| --> |
| </project> |