Author: vmassol
Date: Sun Aug 14 14:41:15 2005
New Revision: 232650
URL: http://svn.apache.org/viewcvs?rev=232650&view=rev
Log:
MPEJB-2: EJB client jar can now be generated and deployed/installed
automatically by the standard goals (<code>ejb</code>, <code>ejb:ejb</code>,
<code>ejb:install</code> and <code>ejb:deploy</code>). Previous goals dedicated
to ejb client have been deprecated. There is a new property
<code>maven.ejb.client.generate</code> which decides whether or not to generate
the ejb client jar. It defaults to true.
Modified:
maven/maven-1/plugins/trunk/ejb/plugin.jelly
maven/maven-1/plugins/trunk/ejb/plugin.properties
maven/maven-1/plugins/trunk/ejb/project.xml
maven/maven-1/plugins/trunk/ejb/xdocs/changes.xml
maven/maven-1/plugins/trunk/ejb/xdocs/properties.xml
Modified: maven/maven-1/plugins/trunk/ejb/plugin.jelly
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/ejb/plugin.jelly?rev=232650&r1=232649&r2=232650&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/ejb/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/ejb/plugin.jelly Sun Aug 14 14:41:15 2005
@@ -2,7 +2,7 @@
<!--
/*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Copyright 2001-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,9 +27,11 @@
<j:new var="ejbTypeHandler"
className="org.apache.maven.ejb.EJBArtifactTypeHandler" />
<!--==================================================================-->
- <!-- Default goal : Builds a ejb file -->
+ <!-- Default goal : Builds ejb files -->
<!--==================================================================-->
- <goal name="ejb" prereqs="ejb:ejb" description="Build an ejb file"/>
+ <goal name="ejb" prereqs="ejb:ejb"
+ description="Build ejb-jar and ejb-client files">
+ </goal>
<!--==================================================================-->
<!-- Initializations -->
@@ -43,9 +45,19 @@
</goal>
<!--==================================================================-->
- <!-- Builds an ejb file -->
+ <!-- Builds ejb files -->
<!--==================================================================-->
- <goal name="ejb:ejb" prereqs="ejb:init" description="Build an ejb file">
+ <goal name="ejb:ejb" prereqs="ejb:init"
+ description="Build ejb-jar and ejb-client files">
+
+ <attainGoal name="ejb:ejb-jar-internal"/>
+ <j:if test="${context.getVariable('maven.ejb.client.generate') == 'true'}">
+ <attainGoal name="ejb:ejb-client-internal"/>
+ </j:if>
+
+ </goal>
+
+ <goal name="ejb:ejb-jar-internal">
<ant:echo>Building ejb ${maven.final.name}</ant:echo>
@@ -134,27 +146,33 @@
</goal>
- <!--==================================================================-->
- <!-- Builds an ejb client jar file -->
- <!--==================================================================-->
- <goal name="ejb:ejb-client" prereqs="ejb:ejb" description="Build a client
ejb file">
- <ant:jar jarfile="${maven.ejb.build.dir}/${maven.final.name}-client.jar"
+ <goal name="ejb:ejb-client-internal">
+
+ <ant:jar jarfile="${maven.ejb.build.dir}/${maven.ejb.client.final.name}"
basedir="${maven.build.dest}"
excludes="${maven.ejb.client.base.excludes},${maven.ejb.client.excludes}"
- index="${maven.ejb.client.index}"
- >
- </ant:jar>
+ index="${maven.ejb.client.index}"/>
+
</goal>
-
+
+ <goal name="ejb:ejb-client" prereqs="ejb:ejb" description="Build a client
ejb file">
+
+ <echo>DEPRECATED: You should use the ejb:ejb goal instead which
automatically creates an ejb-client jar too.</echo>
+ <attainGoal name="ejb:ejb-client-internal"/>
+
+ </goal>
+
<!--==================================================================-->
<!-- Install the ejb client in the local repository -->
<!--==================================================================-->
<goal name="ejb:install-client"
prereqs="ejb:ejb-client"
description="Install the ejb client in the local repository">
-
+
+ <echo>DEPRECATED: You should use the ejb:install goal instead which
automatically installs the ejb-client jar too.</echo>
+
<artifact:install
- artifact="${maven.ejb.build.dir}/${maven.final.name}-client.jar"
+ artifact="${maven.ejb.build.dir}/${maven.ejb.client.final.name}"
type="ejb-client"
project="${pom}"
typeHandler="${ejbTypeHandler}"/>
@@ -162,17 +180,24 @@
</goal>
<!--==================================================================-->
- <!-- Install the ejb in the local repository -->
+ <!-- Install the ejbs in the local repository -->
<!--==================================================================-->
<goal name="ejb:install"
prereqs="ejb:ejb"
- description="Install the ejb in the local repository">
+ description="Install the ejb files in the local repository">
- <artifact:install
+ <artifact:install
artifact="${maven.ejb.build.dir}/${maven.ejb.final.name}"
type="ejb"
project="${pom}"
typeHandler="${ejbTypeHandler}"/>
+ <j:if test="${context.getVariable('maven.ejb.client.generate') == 'true'}">
+ <artifact:install
+ artifact="${maven.ejb.build.dir}/${maven.ejb.client.final.name}"
+ type="ejb-client"
+ project="${pom}"
+ typeHandler="${ejbTypeHandler}"/>
+ </j:if>
</goal>
@@ -203,6 +228,13 @@
type="ejb"
project="${pom}"
typeHandler="${ejbTypeHandler}"/>
+ <j:if test="${context.getVariable('maven.ejb.client.generate') ==
'true'}">
+ <artifact:deploy
+ artifact="${maven.ejb.build.dir}/${maven.ejb.client.final.name}"
+ type="jar"
+ project="${pom}"
+ typeHandler="${ejbTypeHandler}"/>
+ </j:if>
</goal>
@@ -222,14 +254,16 @@
</goal>
<!--==================================================================-->
- <!-- Deploys the ejb to the remote repository -->
+ <!-- Deploys the ejbs to the remote repository -->
<!--==================================================================-->
<goal name="ejb:deploy-client"
prereqs="ejb:ejb-client"
description="Deploys the ejb client to the remote repository">
+ <echo>DEPRECATED: You should use the ejb:deploy goal instead which
automatically deploys the ejb-client jar too.</echo>
+
<artifact:deploy
- artifact="${maven.ejb.build.dir}/${maven.final.name}-client.jar"
+ artifact="${maven.ejb.build.dir}/${maven.ejb.client.final.name}"
type="jar"
project="${pom}"
typeHandler="${ejbTypeHandler}"/>
Modified: maven/maven-1/plugins/trunk/ejb/plugin.properties
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/ejb/plugin.properties?rev=232650&r1=232649&r2=232650&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/ejb/plugin.properties (original)
+++ maven/maven-1/plugins/trunk/ejb/plugin.properties Sun Aug 14 14:41:15 2005
@@ -1,5 +1,5 @@
# -------------------------------------------------------------------
-# Copyright 2001-2004 The Apache Software Foundation.
+# Copyright 2001-2005 The Apache Software Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -29,9 +29,14 @@
# Location where the generated EJB will be placed.
maven.ejb.build.dir = ${maven.build.dir}
-# Name of the generated EJB file (without the path).
+# Name of the generated EJB file (without the path which is specified by
+# maven.ejb.build.dir).
maven.ejb.final.name = ${maven.final.name}.jar
+# Name fo the generated EJB client file (without the path which is specified by
+# maven.ejb.build.dir).
+maven.ejb.client.final.name = ${maven.final.name}-client.jar
+
# Location of ejb xml configs - not used atm due to using jar task not ejbjar
maven.ejb.descriptordir=${maven.ejb.src}/META-INF
@@ -46,3 +51,6 @@
# Note: Files are relative to build.dir
maven.ejb.includes=**
maven.ejb.excludes=**/package.html
+
+# Decide whether a client jar is generated or not.
+maven.ejb.client.generate = true
Modified: maven/maven-1/plugins/trunk/ejb/project.xml
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/ejb/project.xml?rev=232650&r1=232649&r2=232650&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/ejb/project.xml (original)
+++ maven/maven-1/plugins/trunk/ejb/project.xml Sun Aug 14 14:41:15 2005
@@ -2,7 +2,7 @@
<!--
/*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Copyright 2001-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Modified: maven/maven-1/plugins/trunk/ejb/xdocs/changes.xml
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/ejb/xdocs/changes.xml?rev=232650&r1=232649&r2=232650&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/ejb/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/ejb/xdocs/changes.xml Sun Aug 14 14:41:15 2005
@@ -25,6 +25,14 @@
</properties>
<body>
<release version="1.7-SNAPSHOT" date="in SVN trunk">
+ <action dev="vmassol" type="fix" issue="MPEJB-2">
+ EJB client jar can now be generated and deployed/installed
+ automatically by the standard goals (<code>ejb</code>,
<code>ejb:ejb</code>,
+ <code>ejb:install</code> and <code>ejb:deploy</code>). Previous goals
+ dedicated to ejb client have been deprecated. There is a new
+ property <code>maven.ejb.client.generate</code> which decides whether
or
+ not to generate the ejb client jar. It defaults to true.
+ </action>
<action dev="vmassol" type="fix" issue="MPEJB-16" due-to="Håvard
Bjåstad">
Added new EJB type handler that supports <code>ejb</code> and
<code>ejb-client</code> types. This fixes the bug with
Modified: maven/maven-1/plugins/trunk/ejb/xdocs/properties.xml
URL:
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/ejb/xdocs/properties.xml?rev=232650&r1=232649&r2=232650&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/ejb/xdocs/properties.xml (original)
+++ maven/maven-1/plugins/trunk/ejb/xdocs/properties.xml Sun Aug 14 14:41:15
2005
@@ -2,7 +2,7 @@
<!--
/*
- * Copyright 2001-2004 The Apache Software Foundation.
+ * Copyright 2001-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -70,13 +70,25 @@
<td>maven.ejb.final.name</td>
<td>Yes</td>
<td>
- Name of the generated EJB file.
+ Name of the generated EJB file (without the path which is specified
+ by the <code>maven.ejb.build.dir</code> property).
</td>
<td>
${maven.final.name}.jar
</td>
</tr>
<tr>
+ <td>maven.ejb.client.final.name</td>
+ <td>Yes</td>
+ <td>
+ Name of the generated EJB client file (without the path which is
+ specified by the <code>maven.ejb.build.dir</code> property).
+ </td>
+ <td>
+ ${maven.final.name}-client.jar
+ </td>
+ </tr>
+ <tr>
<td>maven.ejb.includes</td>
<td>Yes</td>
<td>
@@ -132,6 +144,16 @@
</td>
<td>
${maven.ejb.src}/META-INF/MANIFEST.MF
+ </td>
+ </tr>
+ <tr>
+ <td>maven.ejb.client.generate</td>
+ <td>Yes</td>
+ <td>
+ Decide wether to generate an ejb client jar or not.
+ </td>
+ <td>
+ true
</td>
</tr>
</table>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]