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.
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.
How's that sound?
> As far as your testing, you could setup a container that has those
> artifacts as part of the common libraries and deploy to that. For
> example, if you're using the jetty plugin,
> http://ramblingabout.wordpress.com/2007/01/12/jsf-on-jetty-and-maven/
> says that you can just add them as dependencies for the plugin. I
> haven't tried it, but it seems reasonable.
That's not satisfying. I will have to put this environment each time
my dependencies are changed. That's just pushing the problem away.
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]