diff --git a/ear/plugin.jelly b/ear/plugin.jelly index 9dc49d3f..36e2fb20 100644 --- a/ear/plugin.jelly +++ b/ear/plugin.jelly @@ -71,6 +71,7 @@ + @@ -85,23 +86,26 @@ Bundling: ${dep.type} - ${dep.id} - ${dep.version} - - - - - - - - - - - - - - + + + + + + + + + + + + Dependency ${lib.file.name} will be bundled as ${bundlePath} + + + + + @@ -140,6 +144,11 @@ + + + + + diff --git a/ear/src/plugin-test/test02/maven.xml b/ear/src/plugin-test/test02/maven.xml index 9e437703..73f985ed 100644 --- a/ear/src/plugin-test/test02/maven.xml +++ b/ear/src/plugin-test/test02/maven.xml @@ -38,11 +38,19 @@ + msg="commons-logging was not bundled"/> + msg="commons-collections was bundled incorrectly"/> + + + + + + diff --git a/ear/src/plugin-test/test02/project.xml b/ear/src/plugin-test/test02/project.xml index 2f2f0f30..8a7f8ebe 100644 --- a/ear/src/plugin-test/test02/project.xml +++ b/ear/src/plugin-test/test02/project.xml @@ -28,8 +28,8 @@ 2004 au.gov.qld - Test for Jar paths in Ears - Test that a jar is packaged in the path specified in the project file + Test for new properties ear.bundle.name and ear.bundle.dir + Tests if a dependency which has the properties ear.bundle.name or ear.bundle.dir it is properly bundled in the EAR (see issues MPEAR-26 and MPEAR-23) @@ -39,6 +39,11 @@ Queensland Government Java Developer + + Felipe Leme + felipeal + Jelly Developer + @@ -58,6 +63,25 @@ true + + commons-digester + commons-digester + 1.6 + + true + commons-digester.jar + + + + log4j + log4j + 1.2.8 + + true + LOG4J.JAR + /APP-INF/lib + + ${basedir}/src diff --git a/ear/xdocs/changes.xml b/ear/xdocs/changes.xml index ddd688c8..4686ca1b 100644 --- a/ear/xdocs/changes.xml +++ b/ear/xdocs/changes.xml @@ -25,6 +25,7 @@ + Add new property dependency (ear.bundle.name) to define the name a dependency should have the EAR. Changed the default value of maven.ear.displayname. Add new property dependency(ear.bundle.dir) to define where a dependency should be added in the EAR. Build now fails in some cases were the dependencies are copied with wrong case. diff --git a/ear/xdocs/properties.xml b/ear/xdocs/properties.xml index 3765b0f0..72942213 100644 --- a/ear/xdocs/properties.xml +++ b/ear/xdocs/properties.xml @@ -187,6 +187,37 @@ ]]> +

(it does not matter if the value of ear.bundle.dir starts with a slash (/) or not - it will always be relative to the root of the EAR)

+

+ It is also possible to change the name by which the dependency will be bundles using the ear.bundle.name property: +

+ + groupId + jarArtifactId + aversion + jar + + true + aJar + + + ]]> +

In the example above, the dependency will be bundled simply as aJar and not jarArtifactId.aversion; note that ear.bundle.name and ear.bundle.dir can be used together:

+ + groupId + jarArtifactId + aversion + jar + + true + aJar + /anotherDir + + + ]]> +

Finally, please note that if a jar is a java client module, you will need to declare it using the ear.module property, rather than ear.bundle: