On 4/28/07, Dan Tran <[EMAIL PROTECTED]> wrote:
is it a bug?
nah, i think that the behavior for <optional> is correct, but since it was the only option for slimming down wars with the desired manifest, it was being used in situations that probably didn't make sense. the only way that you could argue that this is a problem with the war plugin is if you thought that there should be a way to differentiate provided by the ear and provided by the container. the feature for the ear plugin would definitely be a rfe. it certainly works now, but it'd be nice if it cleaned up your libs.
On 4/27/07, Jerome Lacoste <[EMAIL PROTECTED]> wrote: > > 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] > >
-- Gregory Kick http://kickstyle.net/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
