Author: snicoll
Date: Wed Sep  7 09:37:45 2005
New Revision: 279376

URL: http://svn.apache.org/viewcvs?rev=279376&view=rev
Log:
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

Modified:
    
maven/components/trunk/maven-plugins/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JavaModule.java
    
maven/components/trunk/maven-plugins/maven-ear-plugin/src/site/apt/configuration-examples.apt

Modified: 
maven/components/trunk/maven-plugins/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JavaModule.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JavaModule.java?rev=279376&r1=279375&r2=279376&view=diff
==============================================================================
--- 
maven/components/trunk/maven-plugins/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JavaModule.java
 (original)
+++ 
maven/components/trunk/maven-plugins/maven-ear-plugin/src/main/java/org/apache/maven/plugin/ear/JavaModule.java
 Wed Sep  7 09:37:45 2005
@@ -30,7 +30,7 @@
 {
     protected static final String JAVA_MODULE = "java";
 
-    private Boolean library = Boolean.FALSE;
+    private Boolean includeInApplicationXml = Boolean.FALSE;
 
     public JavaModule()
     {
@@ -43,9 +43,10 @@
 
     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() );
@@ -57,18 +58,5 @@
     protected String getType()
     {
         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();
     }
 }

Modified: 
maven/components/trunk/maven-plugins/maven-ear-plugin/src/site/apt/configuration-examples.apt
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-ear-plugin/src/site/apt/configuration-examples.apt?rev=279376&r1=279375&r2=279376&view=diff
==============================================================================
--- 
maven/components/trunk/maven-plugins/maven-ear-plugin/src/site/apt/configuration-examples.apt
 (original)
+++ 
maven/components/trunk/maven-plugins/maven-ear-plugin/src/site/apt/configuration-examples.apt
 Wed Sep  7 09:37:45 2005
@@ -3,7 +3,7 @@
  ---
  Stéphane Nicoll
  ---
- 15-Aug-2005
+ 07-Sep-2005
  ---
 
 Introduction
@@ -25,8 +25,10 @@
   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 @@
   </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 @@
              <javaModule>
                <groupId>artifactGroupId</groupId>
                <artifactId>artifactId</artifactId>
-               <library>true</library>
+               <includeInApplicationXml>true</includeInApplicationXml>
              </javaModule>
           </modules>
         </configuration>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to