| <?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 commonRun SYSTEM "file:./../../config/run.xml"> |
| <!ENTITY testproperties SYSTEM "file:./build.properties"> |
| ]> |
| |
| <project name="logging" default="usage" basedir="."> |
| |
| &commonSetup; |
| &commonBuild; |
| &commonRun; |
| &testproperties; |
| |
| <target name="all" depends="build,setup,restart,unsetup"/> |
| |
| <target name="run-test" depends="build,setup,restart"/> |
| <target name="clean" depends="init-common"> |
| <antcall target="clean-common"/> |
| </target> |
| |
| <target name="setup"> |
| <antcall target="create-lifecycle"/> |
| <antcall target="set-lifecycle-classpath"/> |
| <antcall target="set-lifecycle-load"/> |
| <antcall target="set-lifecycle-description"/> |
| </target> |
| |
| <target name="create-lifecycle" depends="init-common"> |
| <echo message="Creating Life Cycle Module ${modulename}"/> |
| <exec executable="${ASADMIN}" failonerror="false"> |
| <arg line="create-lifecycle-module"/> |
| <arg line="${as.props}"/> |
| <!-- arg line="description='To Run All the events'"/> |
| <arg line="loadorder=2"/> |
| <arg line="classpath=${build.classes.dir}"/ --> |
| <arg line="--classname ${classname} ${modulename}"/> |
| </exec> |
| </target> |
| |
| <target name="set-lifecycle-classpath" depends="init-common"> |
| <echo message="Setting Life Cycle Module ${modulename} Classpath to ${build.classes.dir}"/> |
| <exec executable="${ASADMIN}" failonerror="false"> |
| <arg line="set"/> |
| <arg line="${as.props}"/> |
| <arg line="${servername}.applications.lifecycle-module.${modulename}.classpath=${build.classes.dir}"/> |
| </exec> |
| </target> |
| |
| <target name="set-lifecycle-load" depends="init-common"> |
| <echo message="Setting Life Cycle Module ${modulename} LoadOrder"/> |
| <exec executable="${ASADMIN}" failonerror="false"> |
| <arg line="set"/> |
| <arg line="${as.props}"/> |
| <arg line="${servername}.applications.lifecycle-module.${modulename}.load-order=2"/> |
| </exec> |
| </target> |
| |
| <target name="set-lifecycle-description" depends="init-common"> |
| <echo message="Setting Life Cycle Module ${modulename} Description"/> |
| <exec executable="${ASADMIN}" failonerror="false"> |
| <arg line="set"/> |
| <arg line="${as.props}"/> |
| <arg line="${servername}.applications.lifecycle-module.${modulename}.description='To Run All the events'"/> |
| </exec> |
| </target> |
| |
| <target name="restart"> |
| <antcall target="restart-server-instance-common"/> |
| </target> |
| |
| <target name="unsetup"> |
| <antcall target="delete-lifecycle"/> |
| </target> |
| |
| <target name="delete-lifecycle" depends="init-common"> |
| <echo message="Deleting Life Cycle Module ${modulename}"/> |
| <exec executable="${ASADMIN}" failonerror="false"> |
| <arg line="delete-lifecycle-module"/> |
| <arg line="${as.props}"/> |
| <arg line="${modulename}"/> |
| </exec> |
| </target> |
| |
| <target name="compile" depends="clean"> |
| <antcall target="compile-common"> |
| <param name="src" value="."/> |
| </antcall> |
| </target> |
| |
| <target name="build" depends="compile"> |
| </target> |
| |
| <target name="usage"> |
| <antcall target="usage-common"/> |
| </target> |
| </project> |