On 4/27/07, Gregory Kick <[EMAIL PROTECTED]> wrote:
On 4/27/07, Jerome Lacoste <[EMAIL PROTECTED]> wrote:
> On 4/27/07, Gregory Kick <[EMAIL PROTECTED]> wrote:
> > I think that instead of using optional, you have been meaning to use
> > <scope>provided</scope>.  This would indicate that the jars are
> > necessary, but won't include them in your war because it is assumed
> > that it will be provided by the container, or in your case, the ear.
>
> Nope. Cf last part of
> 
http://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html

Ouch, that's a little disconcerting.  Here's what the pom reference
has to say about optional:

"optional: Marks optional a dependency when this project itself is a
dependency. Confused? For example, imagine a project A that depends
upon project B to compile a portion of code that may not be used at
runtime, then we may have no need for project B for all project."

Since it sounds like none of your dependencies are optional in either
the english or maven senses of the word, I don't see the justification
for the way the war manifests are configured.    What you've done
makes sense in terms of getting the desired effect, but not so much in
terms of the meaning of the metadata.

agreed

What I'd rather see is an option in the ear plugin for removing
artifacts from dependencies that are already present in APP-INF/lib.
That way, you can remove the optional tag completely, still have your
manifests the way you want, be able to test and still have your lean
ears.

That would be better as I would have to make a single change to my
project (the optimization could almost be on by default in a next
major release of the plugin).

The solution should also update the wars MANIFEST files.

Cheers,

Jerome

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

Reply via email to