| <?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 commonSec SYSTEM "file:./../../sec-common.xml"> |
| <!ENTITY commonSecProp SYSTEM "file:./../../sec-common.properties"> |
| <!ENTITY testproperties SYSTEM "file:./build.properties"> |
| ]> |
| |
| <project name="sec-wss-ejbws" default="usage" basedir="."> |
| |
| &commonSetup; |
| &commonBuild; |
| &commonSecProp; |
| &commonSec; |
| &testproperties; |
| |
| <target name="all" depends="display-header, clean, build, deploy, run, undeploy"/> |
| |
| <target name="build-deploy-run" depends="display-header, clean, build, deploy, run"/> |
| |
| <target name="display-header"> |
| <echo message="-->Running ${ant.project.name} bat tests from ${basedir} ..."/> |
| </target> |
| |
| <target name="run-test" depends="clean, build, deploy, run, undeploy"/> |
| |
| <target name="clean" depends="init-common"> |
| <antcall target="clean-common"/> |
| </target> |
| |
| |
| <target name="compile" depends="init-common,clean-common, generate-artifacts"> |
| <antcall target="compile-common"> |
| <param name="src" value="ejb"/> |
| </antcall> |
| <antcall target="compile-common"> |
| <param name="src" value="client"/> |
| </antcall> |
| </target> |
| |
| <target name="generate-artifacts"> |
| <antcall target="import-wsdl"> |
| <param name="mapping.file" |
| value="${ejb-mapping.xml}"/> |
| <param name="config-wsdl.file" |
| value="config/config-ejb.xml"/> |
| </antcall> |
| <antcall target="import-wsdl"> |
| <param name="mapping.file" |
| value="${client-mapping.xml}"/> |
| <param name="config-wsdl.file" |
| value="config/config-client.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-ejb-jar-common" depends="init-common"> |
| <mkdir dir="${assemble.dir}"/> |
| <delete file="${ejb.jar}" failonerror="false"/> |
| <mkdir dir="${build.classes.dir}/META-INF"/> |
| <copy file="${ejb-jar.xml}" |
| tofile="${build.classes.dir}/META-INF/ejb-jar.xml"/> |
| <copy file="${sun-ejb-jar.xml}" |
| tofile="${build.classes.dir}/META-INF/sun-ejb-jar.xml"/> |
| <copy file="${webservices.xml}" |
| tofile="${build.classes.dir}/META-INF/webservices.xml"/> |
| <copy file="${sun-cmp-mappings.xml}" |
| tofile="${build.classes.dir}/META-INF/sun-cmp-mappings.xml" |
| failonerror="false"/> |
| <copy file="${wsdl-file}" |
| tofile="${build.classes.dir}/META-INF/${wsdl-file}" |
| failonerror="false"/> |
| <copy file="${dbschema}" todir="${build.classes.dir}" failonerror="false"/> |
| <jar jarfile="${ejb.jar}" basedir="${ejbjar.files}" update="true" |
| includes ="${ejbjar.classes}"> |
| |
| <fileset dir="${build.classes.dir}" includes="${ejb-mapping.xml}"/> |
| <metainf dir="${build.classes.dir}/META-INF"> |
| <include name="ejb-jar.xml"/> |
| <include name="sun-ejb-jar.xml"/> |
| <include name="sun-cmp-mappings.xml"/> |
| <include name="webservices.xml"/> |
| <include name="${wsdl-file}"/> |
| <!--<include name="${dbschema}"/>--> |
| </metainf> |
| </jar> |
| <delete dir="${build.classes.dir}/META-INF" |
| failonerror="false"/> |
| </target> |
| |
| <target name="build" depends="init-common,compile"> |
| <antcall target="ws-package-ejb-jar-common"> |
| <param name="ejbjar.classes" |
| value="**/wss/ejbws/taxcal/*.class" /> |
| <param name="ejbjar.files" value="${build.classes.dir}"/> |
| <param name="ejb.jar" value="${assemble.dir}/${appname}-ejb.jar"/> |
| </antcall> |
| <antcall target="ws-package-appclientjar-common"> |
| <param name="appclientjar.classes" |
| value="**/wss/ejbws/taxcal/client/*.class" /> |
| <param name="appclientjar.files" |
| value="${build.classes.dir}"/> |
| <param name="appclient.jar" |
| value="${assemble.dir}/${appname}-client.jar"/> |
| </antcall> |
| |
| <antcall target="ear-common"/> |
| </target> |
| |
| <target name="deploy" |
| depends="init-common, reconfig-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-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-win" depends="init-common" unless="isEE"> |
| <echo message="Test is running on Platform Edition!"/> |
| <property name="statetax-ejb-endpoint-url" |
| value="http://${http.host}:${http.port}/statetaxejb"/> |
| <property name="fedtax-ejb-endpoint-url" |
| value="http://${http.host}:${http.port}/fedtaxejb"/> |
| <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"/> |
| <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-ejb-endpoint-url} ${fedtax-ejb-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-ejb-endpoint-url" |
| value="http://${http.host}:${http.port}/statetaxejb"/> |
| <property name="fedtax-ejb-endpoint-url" |
| value="http://${http.host}:${http.port}/fedtaxejb"/> |
| <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-ejb-endpoint-url} ${fedtax-ejb-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-pe-unix" depends="init-common" unless="isEE"> |
| <echo message="Test is running on Platform Edition!"/> |
| <property name="statetax-ejb-endpoint-url" |
| value="http://${http.host}:${http.port}/statetaxejb"/> |
| <property name="fedtax-ejb-endpoint-url" |
| value="http://${http.host}:${http.port}/fedtaxejb"/> |
| <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"/> |
| <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-ejb-endpoint-url} ${fedtax-ejb-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-ejb-endpoint-url" |
| value="http://${http.host}:${http.port}/statetaxejb"/> |
| <property name="fedtax-ejb-endpoint-url" |
| value="http://${http.host}:${http.port}/fedtaxejb"/> |
| <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-ejb-endpoint-url} ${fedtax-ejb-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> |