| <?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 "./../../../../config/properties.xml"> |
| <!ENTITY commonBuild SYSTEM "./../../../../config/common.xml"> |
| <!ENTITY testproperties SYSTEM "./build.properties"> |
| <!ENTITY run SYSTEM "./../../../../config/run.xml"> |
| <!ENTITY eeSetup SYSTEM "./../../../../config/ee-common.xml"> |
| ]> |
| |
| <project name="mix" default="usage" basedir="."> |
| |
| &commonSetup; |
| &commonBuild; |
| &run; |
| &eeSetup; |
| <!-- |
| |
| &eeProperties; |
| --> |
| &testproperties; |
| |
| <target name="all" depends="build,deploy,run,undeploy"/> |
| <property name="test.javabean.value" value="custom-resource-javabean-test"/> |
| |
| <property name="test.primitive.int.type" value="Integer"/> |
| <property name="test.primitive.int.value" value="25"/> |
| |
| <property name="test.primitive.string.type" value="String"/> |
| <property name="test.primitive.string.value" value="Primitives-And-String"/> |
| |
| <target name="clean" depends="init-common"> |
| <antcall target="clean-common"/> |
| </target> |
| |
| <target name="compile" depends="clean"> |
| |
| <antcall target="compile-common"> |
| <param name="src" value="javabean"/> |
| </antcall> |
| |
| <antcall target="compile-common"> |
| <param name="src" value="ejb"/> |
| </antcall> |
| |
| <antcall target="compile-common"> |
| <param name="src" value="client"/> |
| </antcall> |
| |
| </target> |
| |
| <target name="build" depends="compile"> |
| <antcall target="build-custom-factory"/> |
| |
| <antcall target="build-ear-common"> |
| <param name="ejbjar.classes" |
| value="**/SimpleBMP.class, **/SimpleBMPHome.class, **/SimpleBMPBean.class"/> |
| <param name="appclientjar.classes" |
| value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class"/> |
| <param name="glassfish-resources.xml" value="descriptor/glassfish-resources.xml"/> |
| </antcall> |
| </target> |
| |
| <target name="build-custom-factory"> |
| <mkdir dir="${assemble.dir}"/> |
| <jar basedir="${build.classes.dir}" includes="**/CustomResourceJavaBean.class" |
| file="${assemble.dir}/custom-resource-classes.jar"/> |
| </target> |
| |
| <target name="deploy" depends="init-common"> |
| |
| <antcall target="deploy-custom-resource-classes"/> |
| |
| <antcall target="deploy-common"/> |
| |
| <copy todir="${env.S1AS_HOME}" file="properties/simple-properties.properties"/> |
| <copy todir="${env.S1AS_HOME}" file="properties/simple-properties.xml"/> |
| </target> |
| |
| <target name="deploy-custom-resource-classes"> |
| <copyfile src="${assemble.dir}/custom-resource-classes.jar" |
| dest="${env.S1AS_HOME}/lib/custom-resource-classes.jar"/> |
| <antcall target="restart-server"/> |
| </target> |
| |
| <target name="undeploy-custom-resource-classes"> |
| <delete file="${env.S1AS_HOME}/lib/custom-resource-classes.jar"/> |
| <antcall target="restart-server"/> |
| </target> |
| |
| <target name="run" depends="init-common"> |
| <antcall target="runclient-common"> |
| <param name="appclient.application.args" value="javabean ${test.javabean.value}"/> |
| </antcall> |
| |
| <antcall target="runclient-common"> |
| <param name="appclient.application.args" value="primitivesandstring ${test.primitive.int.type} ${test.primitive.int.value} java:module/custom/my-int"/> |
| </antcall> |
| |
| <antcall target="runclient-common"> |
| <param name="appclient.application.args" value="primitivesandstring ${test.primitive.string.type} ${test.primitive.string.value} java:module/custom/my-string"/> |
| </antcall> |
| |
| <antcall target="runclient-common"> |
| <param name="appclient.application.args" value="properties String Primitives-And-String Integer 25 java:module/custom/my-simple-properties"/> |
| </antcall> |
| |
| <antcall target="runclient-common"> |
| <param name="appclient.application.args" value="properties String Primitives-And-String-in-properties-file Integer 25 java:module/custom/my-properties-file"/> |
| </antcall> |
| |
| <antcall target="runclient-common"> |
| <param name="appclient.application.args" value="properties String Primitives-And-String-in-xml-file Integer 25 java:module/custom/my-properties-xml-file"/> |
| </antcall> |
| |
| <antcall target="runclient-common"> |
| <param name="appclient.application.args" value="properties String Primitives-And-String Integer 25 java:module/custom/my-properties-file-with-values"/> |
| </antcall> |
| |
| <antcall target="runclient-common"> |
| <param name="appclient.application.args" value="properties String Primitives-And-String Integer 25 java:module/custom/my-properties-xml-file-with-values"/> |
| </antcall> |
| |
| <antcall target="runclient-common"> |
| <param name="appclient.application.args" value="url http://java.sun.com:80/index.html java:module/custom/my-url"/> |
| </antcall> |
| |
| |
| </target> |
| |
| <target name="undeploy" depends="init-common"> |
| <antcall target="undeploy-custom-resource-classes"/> |
| |
| <antcall target="undeploy-common"/> |
| |
| <delete file="${env.S1AS_HOME}/simple-properties.properties"/> |
| <delete file="${env.S1AS_HOME}/simple-properties.xml"/> |
| |
| </target> |
| |
| <target name="usage"> |
| <antcall target="usage-common"/> |
| </target> |
| </project> |