mirror of https://github.com/apache/maven.git
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@279376 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8f02461a69
commit
9da3f0d5ff
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue