Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
| 2 | <!DOCTYPE project [ |
| 3 | <!-- |
| 4 | |
| 5 | Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. |
| 6 | |
| 7 | This program and the accompanying materials are made available under the |
| 8 | terms of the Eclipse Public License v. 2.0, which is available at |
| 9 | http://www.eclipse.org/legal/epl-2.0. |
| 10 | |
| 11 | This Source Code may also be made available under the following Secondary |
| 12 | Licenses when the conditions for such availability set forth in the |
| 13 | Eclipse Public License v. 2.0 are satisfied: GNU General Public License, |
| 14 | version 2 with the GNU Classpath Exception, which is available at |
| 15 | https://www.gnu.org/software/classpath/license.html. |
| 16 | |
| 17 | SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
| 18 | |
| 19 | --> |
| 20 | |
| 21 | <!ENTITY commonSetup SYSTEM "file:./../../../../../config/properties.xml"> |
| 22 | <!ENTITY commonBuild SYSTEM "file:./../../../../../config/common.xml"> |
| 23 | <!ENTITY testproperties SYSTEM "file:./buildJava2DB.properties"> |
| 24 | ]> |
| 25 | |
| 26 | <project name="standalone-persistence" default="usage" basedir="."> |
| 27 | |
| 28 | &commonSetup; |
| 29 | &commonBuild; |
| 30 | &testproperties; |
| 31 | |
| 32 | <target name="all" depends="build,setup,deploy,run,undeploy,unsetup"/> |
| 33 | <target name="run-test" depends="build,setup,deploy,run,undeploy,unsetup"/> |
| 34 | |
| 35 | <target name="clean" depends="init-common"> |
| 36 | <delete dir="${build.classes.dir}"/> |
| 37 | <delete dir="${assemble.dir}"/> |
| 38 | </target> |
| 39 | |
| 40 | <target name="setup" depends="init-common"> |
| 41 | <antcall target="create-jdbc-connpool-common"/> |
| 42 | <antcall target="create-jdbc-resource-common"/> |
| 43 | <antcall target="create-resource-ref"/> |
| 44 | </target> |
| 45 | |
| 46 | <target name="deploy" depends="init-common"> |
| 47 | <antcall target="deploy-common"/> |
| 48 | </target> |
| 49 | |
| 50 | <target name="undeploy" depends="init-common"> |
| 51 | <antcall target="undeploy-common"/> |
| 52 | </target> |
| 53 | |
| 54 | |
| 55 | <target name="build-entity" depends="init-common"> |
| 56 | <property name="ejbjar.classes" value="**/*Entity*.class"/> |
| 57 | <property name="ejbjar.files" value="${build.classes.dir}"/> |
| 58 | <property name="ejb.jar" value="${assemble.dir}/${appname}-persistence.par"/> |
| 59 | <antcall target="compile-common"> |
| 60 | <param name="src" value="ejb"/> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 61 | </antcall> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 62 | |
| 63 | <mkdir dir="${assemble.dir}"/> |
| 64 | <delete file="${ejb.jar}" failonerror="false"/> |
| 65 | <echo message="sqe-common.xml: Generating ejb-jar inside build directory"/> |
| 66 | <mkdir dir="${build.classes.dir}/META-INF"/> |
| 67 | |
| 68 | <!-- optional files --> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 69 | <copy file="${persistence.xml}" |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 70 | tofile="${build.classes.dir}/META-INF/persistence.xml" |
| 71 | failonerror="false"/> |
| 72 | |
| 73 | <!-- make a jar --> |
| 74 | <jar jarfile="${ejb.jar}" basedir="${ejbjar.files}" update="true" |
| 75 | includes ="${ejbjar.classes}"> |
| 76 | <metainf dir="${build.classes.dir}/META-INF"> |
| 77 | <include name="**/*.xml"/> |
| 78 | <include name="**/*.wsdl"/> |
| 79 | </metainf> |
| 80 | </jar> |
| 81 | |
| 82 | <delete dir="${build.classes.dir}/META-INF" failonerror="false"/> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 83 | </target> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 84 | |
| 85 | |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 86 | <target name="build" depends="init-common,clean"> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 87 | <antcall target="compile-common"> |
| 88 | <param name="src" value="ejb"/> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 89 | </antcall> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 90 | <antcall target="compile-common"> |
| 91 | <param name="src" value="client"/> |
| 92 | </antcall> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 93 | |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 94 | <!--<antcall target="build-entity"/>--> |
| 95 | <antcall target="build-ear-common"/> |
| 96 | </target> |
| 97 | |
| 98 | <target name="run" depends="init-common"> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 99 | <antcall target="runclient-common"> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 100 | <param name="appclient.application.args" value="${testsuite.id} "/> |
| 101 | </antcall> |
| 102 | </target> |
| 103 | |
| 104 | <target name="unsetup" depends="init-common"> |
| 105 | <antcall target="delete-jdbc-resource-common"/> |
| 106 | <antcall target="delete-jdbc-connpool-common"/> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 107 | </target> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 108 | |
| 109 | |
| 110 | <target name="create-resource-ref" depends="init-common"> |
| 111 | <echo message="Creating resource reference ${jdbc.resource.name} "/> |
| 112 | <exec executable="${ASADMIN}" failonerror="false"> |
| 113 | <arg line="create-resource-ref"/> |
| 114 | <arg line="${as.props}"/> |
| 115 | <arg line="${jdbc.resource.name}"/> |
| 116 | </exec> |
| 117 | </target> |
| 118 | |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 119 | |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 120 | </project> |