You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2017/12/20 09:33:38 UTC

[maven-ear-plugin] 21/45: MNG-826: - Jar dependencies are not included in the generated application.xml ; Hence 'library' is the default behavior and has been removed - Added includeInApplicationXml property on JavaModule to allow it to be included in the generated application.xml

This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to annotated tag maven-ear-plugin-2.0
in repository https://gitbox.apache.org/repos/asf/maven-ear-plugin.git

commit 4d89c27bfb724ef878f096936f5d305a63b4425f
Author: Stephane Nicoll <sn...@apache.org>
AuthorDate: Wed Sep 7 16:37:45 2005 +0000

    MNG-826:
    - Jar dependencies are not included in the generated application.xml ; Hence 'library' is the default behavior and has been removed
    - Added includeInApplicationXml property on JavaModule to allow it to be included in the generated application.xml
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk/maven-plugins/maven-ear-plugin@279376 13f79535-47bb-0310-9956-ffa450edef68
---
 .../org/apache/maven/plugin/ear/JavaModule.java    | 22 +++++-----------------
 src/site/apt/configuration-examples.apt            | 17 +++++++++--------
 2 files changed, 14 insertions(+), 25 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugin/ear/JavaModule.java b/src/main/java/org/apache/maven/plugin/ear/JavaModule.java
index c38b8f4..deb4c94 100644
--- a/src/main/java/org/apache/maven/plugin/ear/JavaModule.java
+++ b/src/main/java/org/apache/maven/plugin/ear/JavaModule.java
@@ -30,7 +30,7 @@ public class JavaModule
 {
     protected static final String JAVA_MODULE = "java";
 
-    private Boolean library = Boolean.FALSE;
+    private Boolean includeInApplicationXml = Boolean.FALSE;
 
     public JavaModule()
     {
@@ -43,9 +43,10 @@ public class JavaModule
 
     public void appendModule( XMLWriter writer, String version )
     {
-        // Generates an entry in the application.xml only if this
-        // module is not a library
-        if (!isLibrary()) {
+        // Generates an entry in the application.xml only if
+        // includeInApplicationXml is set
+        if ( includeInApplicationXml.booleanValue() )
+        {
             writer.startElement( MODULE_ELEMENT );
             writer.startElement( JAVA_MODULE );
             writer.writeText( getUri() );
@@ -58,17 +59,4 @@ public class JavaModule
     {
         return "jar";
     }
-
-    /**
-     * Specify whether this Java module is a third party library or not.
-     * <p/>
-     * If <tt>true</tt>, the module will not be included in the generated
-     * <tt>application.xml</tt>.
-     *
-     * @return true if the module is a third party library, false otherwise
-     */
-    public boolean isLibrary()
-    {
-        return library.booleanValue();
-    }
 }
diff --git a/src/site/apt/configuration-examples.apt b/src/site/apt/configuration-examples.apt
index 5cf395d..41b2f98 100644
--- a/src/site/apt/configuration-examples.apt
+++ b/src/site/apt/configuration-examples.apt
@@ -3,7 +3,7 @@
  ---
  St�phane Nicoll
  ---
- 15-Aug-2005
+ 07-Sep-2005
  ---
 
 Introduction
@@ -25,8 +25,10 @@ Introduction
   Also, a dependency might be excluded from the generated EAR file by specifying the
   excluded flag.
 
-  Finally, third party libraries are handled by setting the library flag. If this flag
-  is set, the module is not included in the generated application.xml
+  Please note that third party libraries are not included in the generated
+  application.xml (only ejb-client should be included in a <java> entry). However, a
+  jar dependency could be included in the generated application.xml by specifying the
+  includeInApplicationXml flag.
 
 Customizing the context root
 
@@ -157,11 +159,10 @@ Excluding a module
   </build>
 +---------
 
-Declaring a module as a third party library
+Including a third party library in the generated application.xml
 
-  If third party libraries need to be included in an EAR file, the 'library' flag could be
-  used. Note that no entry in the application.xml will be created for such module. This
-  flag works only for java modules.
+  If third party libraries need to be included in the generated application.xml, the
+  'includeInApplicationXml' flag could be used. This flag works only for java modules.
 
 +--------
   <build>
@@ -175,7 +176,7 @@ Declaring a module as a third party library
              <javaModule>
                <groupId>artifactGroupId</groupId>
                <artifactId>artifactId</artifactId>
-               <library>true</library>
+               <includeInApplicationXml>true</includeInApplicationXml>
              </javaModule>
           </modules>
         </configuration>

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.