<action dev="vmassol" type="fix">

When generating the JBoss server configuration zip, exclude
        JBoss tmp and log directories from the zip.
      </action>
      <action dev="vmassol" type="update">
        Change strategy for bunding J2EE modules in the jboss server
        configuration. This is now achieved through dependencies in
        <code>project.xml</code>. for any J2EE module you want to incude
        add a <code>jboss.bundle</code> property in the said dependency
        definition.
      </action>


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113522 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
vmassol committed 2003-06-19 14:06:20 +00:00
1 parent 9f51cc2e43
commit 8321c780b1
3 files changed
+72 -80

No files matched your search

+53 -61
View File
@@ -7,10 +7,12 @@
=============================================================================
-->
<project
xmlns:ant="jelly:ant"
xmlns:j="jelly:core"
xmlns:util="jelly:util"
xmlns:jmx="jmx"
xmlns:define="jelly:define">
xmlns:define="jelly:define"
xmlns:artifact="artifact">
<!--
========================================================================
@@ -28,11 +30,18 @@
-->
<goal name="jboss:init">
<!-- Check if the maven.jboss.home mandatory property is set -->
<j:set var="jbosshomeX" value="${maven.jboss.home}X"/>
<!-- Check if the maven.jboss.home mandatory property is set and point
to a valid location -->
<ant:condition property="jbosshomepresent" value="true">
<ant:and>
<ant:isset property="maven.jboss.home"/>
<ant:available file="${maven.jboss.home}" type="dir"/>
</ant:and>
</ant:condition>
<j:set var="jbosshomepresentX" value="${jbosshomepresent}X"/>
<j:choose>
<j:when test="${jbosshomeX == 'X'}">
<fail>You need to set the maven.jboss.home property</fail>
<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>
@@ -50,7 +59,8 @@
<!--
========================================================================
Creates a custom JBoss server configuration directory structure.
Creates a custom JBoss server configuration directory structure
(with no J2EE modules deployed).
========================================================================
-->
<goal name="jboss:configure"
@@ -112,79 +122,61 @@
<!--
========================================================================
Generates the zipped distributable. This goal is called automatically
by the "jboss:package-*" goals.
Package J2EE modules in the custom JBoss server configuration
directory structure.
========================================================================
-->
<goal name="jboss:dist">
<goal name="jboss:package"
description="Creates a specific JBoss server configuration"
prereqs="jboss:init,jboss:configure">
<j:forEach var="dep" items="${pom.dependencies}">
<j:if test="${dep.getProperty('jboss.bundle')=='true'}">
<ant:echo>Bundling: (${dep.groupId}, ${dep.artifactId}, ${dep.type})</ant:echo>
<!-- TODO: Use getDependencyPath() once it supports artifacts other
than jars -->
<copy todir="${maven.jboss.build.deploy.dir}"
file="${maven.repo.local}/${dep.artifactDirectory}/${dep.type}s/${dep.artifact}"/>
</j:if>
</j:forEach>
</goal>
<!--
========================================================================
Generates the zipped JBoss configuration.
========================================================================
-->
<goal name="jboss:dist" prereqs="jboss:package"
description="Generate zipped JBoss configuration">
<!-- Generate the distributable -->
<zip destfile="${maven.build.dir}/${pom.artifactId}-${pom.currentVersion}.zip">
<zipfileset dir="${maven.jboss.build.dir}/${maven.jboss.conf.name}"
prefix="${maven.jboss.conf.name}"/>
prefix="${maven.jboss.conf.name}">
<exclude name="tmp/**"/>
<exclude name="log/**"/>
</zipfileset>
</zip>
</goal>
<!--
========================================================================
Creates a custom JBoss server configuration directory structure,
packaging an EAR in it.
Install the produced zip artifact to the local repository
========================================================================
-->
<goal name="jboss:package-ear"
description="Creates a specific JBoss server configuration (with EAR)"
prereqs="jboss:init,ear:ear,jboss:configure">
<goal name="jboss:install" prereqs="jboss:dist"
description="Install the zip into the local repository">
<!-- Copy the EAR to install to the JBoss deploy dir. -->
<copy file="${maven.build.dir}/${maven.final.name}.ear"
todir="${maven.jboss.build.deploy.dir}"/>
<attainGoal name="jboss:dist"/>
</goal>
<!--
========================================================================
Creates a custom JBoss server configuration directory structure,
packaging a WAR in it.
========================================================================
-->
<goal name="jboss:package-war"
description="Creates a specific JBoss server configuration (with WAR)"
prereqs="jboss:init,war:war,jboss:configure">
<j:set var="warBuildDir"
value="${pom.getPluginContext('maven-war-plugin').getVariable('maven.war.build.dir')}"/>
<j:set var="warFinalName"
value="${pom.getPluginContext('maven-war-plugin').getVariable('maven.war.final.name')}"/>
<!-- Copy the WAR to install to the JBoss deploy dir. -->
<copy file="${warBuildDir}/${warFinalName}"
todir="${maven.jboss.build.deploy.dir}"/>
<attainGoal name="jboss:dist"/>
<artifact:install
artifact="${maven.build.dir}/${pom.artifactId}-${pom.currentVersion}.zip"
type="zip"
project="${pom}"/>
</goal>
<!--
========================================================================
Creates a custom JBoss server configuration directory structure,
packaging an EJB-JAR in it.
========================================================================
-->
<goal name="jboss:package-ejb"
description="Creates a specific JBoss server configuration (with EJB-JAR)"
prereqs="jboss:init,ejb:ejb,jboss:configure">
<!-- Copy the EJB-JAR to install to the JBoss deploy dir. -->
<copy file="${maven.build.dir}/${maven.final.name}.jar"
todir="${maven.jboss.build.deploy.dir}"/>
<attainGoal name="jboss:dist"/>
</goal>
<!--
========================================================================
Start JBoss using our specific server configuration.
+11
View File
@@ -8,6 +8,17 @@
<body>
<release version="1.2" date="in CVS">
<action dev="vmassol" type="fix">
When generating the JBoss server configuration zip, exclude
JBoss tmp and log directories from the zip.
</action>
<action dev="vmassol" type="update">
Change strategy for bunding J2EE modules in the jboss server
configuration. This is now achieved through dependencies in
<code>project.xml</code>. for any J2EE module you want to incude
add a <code>jboss.bundle</code> property in the said dependency
definition.
</action>
</release>
<release version="1.1" date="2003-06-17">
+8 -19
View File
@@ -10,34 +10,23 @@
<goal>
<name>jboss</name>
<description>
Default goal. Does the same as <code>jboss:configure</code>.
Default goal. Does the same as <code>jboss:package</code>.
</description>
</goal>
<goal>
<name>jboss:configure</name>
<description>
Creates a custom JBoss server configuration directory structure.
Creates a custom JBoss server configuration directory structure
(with no J2EE modules deployed in it).
</description>
</goal>
<goal>
<name>jboss:package-ear</name>
<name>jboss:package</name>
<description>
Creates a custom JBoss server configuration directory structure
and deploys an EAR in it.
</description>
</goal>
<goal>
<name>jboss:package-ejb</name>
<description>
Creates a custom JBoss server configuration directory structure
and deploys an EJB-JAR in it.
</description>
</goal>
<goal>
<name>jboss:package-war</name>
<description>
Creates a custom JBoss server configuration directory structure
and deploys a WAR in it.
Calls the <code>jboss:configure</code> goal and deploys all J2EE
modules marked with the
<code>&lt;jboss.bundle&gt;true&lt;/jboss.bundle&gt;</code>
property in the project dependency definition.
</description>
</goal>
<goal>