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.
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@232650 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
0c15cac721
commit
e3c2a638d8
5 files changed
+98
-26
No files matched your search
+55
-21
@@ -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}"/>
|
||||
|
||||
+10
-2
@@ -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 @@ maven.ejb.src=${maven.src.dir}/ejb
|
||||
# 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 @@ maven.ejb.client.base.excludes=**/*Bean.class,**/*CMP.class,**/*Session.class
|
||||
# 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
|
||||
+1
-1
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,12 +70,24 @@
|
||||
<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>
|
||||
@@ -134,6 +146,16 @@
|
||||
${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>
|
||||
</section>
|
||||
<section name="other settings">
|
||||
|
||||
Reference in new issue
Block a user