activemq/systest/itests/client/maven.xml

91 lines
3.6 KiB
XML
Executable File

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Revision: 1.1 $ $Date$ -->
<project default="default"
xmlns:j="jelly:core"
xmlns:ant="jelly:ant"
xmlns:maven="jelly:maven"
xmlns:u="jelly:util"
xmlns:deploy="geronimo:deploy"
xmlns:velocity="jelly:velocity"
>
<goal name="default" prereqs="jar:install"/>
<postGoal name="jar:install">
<attainGoal name="itest"/>
</postGoal>
<preGoal name="itest:setup">
<j:if test="${context.getVariable('enable.debug') == 'true'}">
<j:set var="geronimo.server.debug.options" value="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"/>
</j:if>
<ant:mkdir dir="${basedir}/target/plan"/>
<velocity:merge
basedir="${basedir}/src/plan"
template="activemq-itests-ear.ear.xml"
name="${basedir}/target/plan/activemq-itests-ear.ear.xml"/>
<delete dir="${maven.build.dir}/geronimo"/>
<deploy:unpackServer
geronimoVersion="1.0-SNAPSHOT"
/>
<deploy:startRemoteServer
geronimoTarget="${maven.build.dir}/geronimo"
vmArgs="-ea ${geronimo.server.debug.options} -Xms512m -Xmx768m -Djava.rmi.server.RMIClassLoaderSpi=org.apache.geronimo.system.rmi.RMIClassLoaderSpiImpl ${geronimo.server.options}"
configs="org/apache/geronimo/ActiveMQServer org/apache/geronimo/RuntimeDeployer"/>
<ant:echo message="Waiting for server"/>
<deploy:waitForStarted
uri="deployer:geronimo:jmx:rmi://localhost/jndi/rmi:/JMXConnector"
username="system"
password="manager"
id="org/apache/geronimo/RuntimeDeployer"/>
<echo message="server has started"/>
<deploy:distribute
uri="deployer:geronimo:jmx:rmi://localhost/jndi/rmi:/JMXConnector"
username="system"
password="manager"
module="${maven.repo.local}/${pom.groupId}/ears/activemq-itest-ear-${pom.currentVersion}.ear"
plan="${basedir}/target/plan/activemq-itests-ear.ear.xml"
/>
<deploy:start
uri="deployer:geronimo:jmx:rmi://localhost/jndi/rmi:/JMXConnector"
username="system"
password="manager"
id="org/activemq/itest/ServerEar"/>
<j:if test="${context.getVariable('enable.debug') == 'true'}">
<input message="Connect your debugger and then press any key to start the tests."/>
</j:if>
</preGoal>
<postGoal name="itest:teardown">
<deploy:stopRemoteServer
uri="deployer:geronimo:jmx:rmi://localhost/jndi/rmi:/JMXConnector"
username="system"
password="manager"/>
<sleep seconds="2"/>
<echo message="server has stopped"/>
</postGoal>
</project>