Fixed deploy/undeploy URLs for JBoss 3.2. Applied patch from Archimedes. Not tested. We really ought to create some tests for this plugin...

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114419 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
vmassol 2003-11-27 17:05:21 +00:00
parent 1415002fdd
commit b51cf2bdc4
5 changed files with 55 additions and 29 deletions

View File

@ -38,17 +38,12 @@
<ant:available file="${maven.jboss.home}" type="dir"/>
</ant:and>
</ant:condition>
<j:set var="jbosshomepresentX" value="${jbosshomepresent}X"/>
<j:choose>
<j:when test="${jbosshomepresentX == 'X'}">
<fail>You need to set the maven.jboss.home property and make it point to a valid location. It currently points to [${maven.jboss.home}].</fail>
</j:when>
<j:otherwise>
<echo>Using JBoss from ${maven.jboss.home} ...</echo>
</j:otherwise>
</j:choose>
<j:if test="${jbosshomepresent != 'true'}">
<fail>You need to set the maven.jboss.home property and make it point to a valid location. It currently points to [${maven.jboss.home}].</fail>
</j:if>
<ant:echo>Using JBoss version ${maven.jboss.version}</ant:echo>
<ant:echo>Using JBoss from [${maven.jboss.home}]</ant:echo>
<ant:echo>Using JBoss ${maven.jboss.version}</ant:echo>
<ant:property name="maven.jboss.build.deploy.dir"
value="${maven.jboss.build.dir}/${maven.jboss.conf.name}/deploy"/>
@ -123,8 +118,7 @@
<!-- Copy the application-specific JBoss conf files to our
specific configuration (if any) -->
<j:set var="jbossconfX" value="${maven.jboss.conf.dir}X"/>
<j:if test="${jbossconfX != 'X'}">
<j:if test="${context.getVariable('maven.jboss.conf.dir') != null}">
<ant:copy todir="${maven.jboss.build.conf.dir}" overwrite="true">
<ant:fileset dir="${maven.jboss.conf.dir}"/>
</ant:copy>
@ -132,8 +126,7 @@
<!-- Copy the application-specific JBoss deploy files to our
specific configuration (if any) -->
<j:set var="jbossdeployX" value="${maven.jboss.deploy.dir}X"/>
<j:if test="${jbossdeployX != 'X'}">
<j:if test="${context.getVariable('maven.jboss.deploy.dir') != null}">
<ant:copy todir="${maven.jboss.build.deploy.dir}" overwrite="true">
<ant:fileset dir="${maven.jboss.deploy.dir}"/>
</ant:copy>
@ -141,8 +134,7 @@
<!-- Copy the application-specific conf files to our
specific configuration (if any) -->
<j:set var="jbossappconfX" value="${maven.jboss.appconf.dir}X"/>
<j:if test="${jbossappconfX != 'X'}">
<j:if test="${context.getVariable('maven.jboss.appconf.dir') != null}">
<ant:copy todir="${maven.jboss.build.conf.dir}">
<ant:fileset dir="${maven.jboss.appconf.dir}"/>
</ant:copy>
@ -188,7 +180,7 @@
<j:forEach var="lib" items="${pom.artifacts}">
<j:set var="dep" value="${lib.dependency}"/>
<j:if test="${dep.getProperty('jboss.bundle')=='true'}">
<j:if test="${dep.getProperty('jboss.bundle') == 'true'}">
<ant:echo>Bundling: (${dep.groupId}, ${dep.artifactId}, ${dep.type})</ant:echo>
<ant:copy todir="${maven.jboss.build.deploy.dir}" file="${lib.path}"/>
</j:if>
@ -347,19 +339,25 @@
========================================================================
-->
<define:taglib uri="jmx">
<define:tag name="deploy">
<j:set var="undeployURL" value="maven.jboss.jmx.url.undeploy.${maven.jboss.version}"/>
<j:set var="maven.jboss.jmx.url.undeploy"
value='${pom.getPluginContext("maven-jboss-plugin").getVariable("maven.jboss.jmx.url.undeploy")}'/>
value='${pom.getPluginContext("maven-jboss-plugin").getVariable(undeployURL)}'/>
<get dest="deploy.log"
src="${maven.jboss.jmx.url.undeploy}file:${jmx.deploy.file}"/>
<j:set var="deployURL" value="maven.jboss.jmx.url.deploy.${maven.jboss.version}"/>
<j:set var="maven.jboss.jmx.url.deploy"
value='${pom.getPluginContext("maven-jboss-plugin").getVariable("maven.jboss.jmx.url.deploy")}'/>
value='${pom.getPluginContext("maven-jboss-plugin").getVariable(deployURL)}'/>
<get dest="deploy.log"
src="${maven.jboss.jmx.url.deploy}file:${jmx.deploy.file}"/>
</define:tag>
<define:tag name="undeploy">
<j:set var="undeployURL" value="maven.jboss.jmx.url.undeploy.${maven.jboss.version}"/>
<j:set var="maven.jboss.jmx.url.undeploy"
value='${pom.getPluginContext("maven-jboss-plugin").getVariable("maven.jboss.jmx.url.undeploy")}'/>
value='${pom.getPluginContext("maven-jboss-plugin").getVariable(undeployURL)}'/>
<get dest="deploy.log"
src="${maven.jboss.jmx.url.undeploy}file:${jmx.deploy.file}"/>
</define:tag>

View File

@ -71,8 +71,10 @@ maven.jboss.port = 8080
# URL which, when fed to <get>, will cause a thing
# to be deployed
maven.jboss.jmx.url.deploy = http://${maven.jboss.hostname}:${maven.jboss.port}/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=deploy&argType=java.lang.String&arg=
maven.jboss.jmx.url.deploy.3.0 = http://${maven.jboss.hostname}:${maven.jboss.port}/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=deploy&argType=java.lang.String&arg=
maven.jboss.jmx.url.deploy.3.2 = http://${maven.jboss.hostname}:${maven.jboss.port}/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=
# URL which, when fed to <get>, will cause a thing
# to be undeployed
maven.jboss.jmx.url.undeploy = http://${maven.jboss.hostname}:${maven.jboss.port}/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=undeploy&argType=java.lang.String&arg=
maven.jboss.jmx.url.undeploy.3.0 = http://${maven.jboss.hostname}:${maven.jboss.port}/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=undeploy&argType=java.lang.String&arg=
maven.jboss.jmx.url.undeploy.3.2 = http://${maven.jboss.hostname}:${maven.jboss.port}/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=undeploy&argType=java.net.URL&arg0=

View File

@ -9,7 +9,7 @@
<description>Plugin for JBoss.</description>
<shortDescription>JBoss plugin</shortDescription>
<url>http://maven.apache.org/reference/plugins/jboss/</url>
<issueTrackingUrl>http://jira.codehaus.org/BrowseProject.jspa?id=10323</issueTrackingUrl>
<issueTrackingUrl>http://jira.codehaus.org/BrowseProject.jspa?id=10324</issueTrackingUrl>
<siteDirectory>/www/maven.apache.org/reference/plugins/jboss/</siteDirectory>
<repository>
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/jboss/</connection>
@ -36,6 +36,11 @@
<name>1.3</name>
<tag>MAVEN_JBOSS_1_3</tag>
</version>
<version>
<id>1.4</id>
<name>1.4</name>
<tag>HEAD</tag>
</version>
</versions>
<developers>
<developer>
@ -59,6 +64,9 @@
<name>Willie Vu</name>
<email>willievu@yahoo.com</email>
</contributor>
<contributor>
<name>Archimedes Trajano</name>
</contributor>
</contributors>
<dependencies/>
<reports>

View File

@ -8,8 +8,12 @@
<body>
<release version="1.4" date="in CVS">
<action dev="vmassol" type="fix" issue="MPJBOSS-3" due-to="Archimedes Trajano">
Fixed deploy/undeploy URLs for JBoss 3.2.
</action>
<action dev="vmassol" type="fix" issue="MPJBOSS-2" due-to="Sean Timm" due-to-email="stimm@proclarity.com">
Fix jboss:shutdown and jboss:start hanging on pause.
Fix <code>jboss:shutdown</code> and <code>jboss:start</code> hanging on
pause.
</action>
</release>

View File

@ -19,7 +19,7 @@
<td>
<p>
Location of JBoss home (i.e. where JBoss is installed on your
local drive. Example: <code>c:/jboss-3.0.4</code>.
local drive. Example: <code>c:/jboss-3.2.2</code>.
</p>
</td>
</tr>
@ -86,23 +86,37 @@
</td>
</tr>
<tr>
<td>maven.jboss.jmx.url.deploy</td>
<td>maven.jboss.${maven.jboss.version}.jmx.url.deploy</td>
<td>Yes</td>
<td>
<p>
URL at which an http get will deploy a target. Default value is
URL at which an http get will deploy a target.
</p>
<p>
Default value for JBoss 3.0 is
<code>http://${maven.jboss.hostname}:${maven.jboss.port}/jmx-console/HtmlAdaptor?action=invokeOpByName&amp;name=jboss.system:service%3DMainDeployer&amp;methodName=deploy&amp;argType=java.lang.String&amp;arg=</code>
</p>
<p>
Default value for JBoss 3.2 is
<code>http://${maven.jboss.hostname}:${maven.jboss.port}/jmx-console/HtmlAdaptor?action=invokeOpByName&amp;name=jboss.system:service%3DMainDeployer&amp;methodName=deploy&amp;argType=java.net.URL&amp;arg0=</code>
</p>
</td>
</tr>
<tr>
<td>maven.jboss.jmx.url.undeploy</td>
<td>maven.jboss.${maven.jboss.version}.jmx.url.undeploy</td>
<td>Yes</td>
<td>
<p>
URL at which an http get will undeploy a target. Default value is
URL at which an http get will undeploy a target.
</p>
<p>
Default value for JBoss 3.0 is
<code>http://${maven.jboss.hostname}:${maven.jboss.port}/jmx-console/HtmlAdaptor?action=invokeOpByName&amp;name=jboss.system:service%3DMainDeployer&amp;methodName=undeploy&amp;argType=java.lang.String&amp;arg=</code>
</p>
<p>
Default value for JBoss 3.2 is
<code>http://${maven.jboss.hostname}:${maven.jboss.port}/jmx-console/HtmlAdaptor?action=invokeOpByName&amp;name=jboss.system:service%3DMainDeployer&amp;methodName=undeploy&amp;argType=java.net.URL&amp;arg0=</code>
</p>
</td>
</tr>
<tr>