BuildingBuilding the package requires Maven and a working copy of JBoss. The principle allows other containers accepting JMX calls to be used but that would require probably some modification in source code and build files. The build process is a typical Maven one with just one special requirement: The variable com.maxiq.tools.jboss.home has to be defined (e.g. in build.properties) to the root dir of a working JBoss installation. For example, you can try something like:
com.maxiq.tools.jboss.home = e:/jbosstc in your build.properties file, presuming your JBoss is installed in e:\jbosstc. When building (with tests), a JBoss instance running in the specified home has to be already running. The build process had been tested on Windows 2000, with JDK 1.3.1_02 and JBoss 3.2.1. If this is not your setup, your mileage may vary. Using with AntIn order to use the package with Ant you have to cover the following steps:
Using with MavenWhen using in Maven the approach is to use the be an through Jelly code. Here is one example: <j:useBean var="jmxbean" class="com.maxiq.tools.jboss.JMXDeploymentMonitor" jbhome="${the.jboss.home.dir}" file="${the.jboss.deploy.dir}/myapp.war" timeout="60000"/> <j:set var="jbossRunning" value="${jmxbean.isServerAlive()}" /> <j:if test="${jbossRunning}"> <echo>Current deployment status: ${jmxbean.isDeployed()}</echo> </j:if> The above example checks if the server is running and if so, it shows the deployment status of myapp.war. Using in other environmentsUsing the package in othe environments is possible, because it is basically a bean. You should instantiate the bean, set the required properties, then use its methods to interact with the JBoss instance with respect to the deployment status of things. If you want to use this approach, then please consult the Javadoc. |