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.

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.

On 4/27/07, Jerome Lacoste <[EMAIL PROTECTED]> wrote:
Hi,

our project has several wars all bundled in an ear. In order to reduce
the size, we moved most of the dependencies to the ear using
<optional>true</optional>.

Now we would like the developers to be able to test & deploy the wars
independently and it is not possible due to the now 'missing'
dependencies.

I can see 2 options:

* use profiles. Not very flexible and project specific

* add an option to ignore the <optional> recommendations in the war
plugin. Later on perhaps create a new fullwar mojo that ignores the
<optional> recommendation by default and store the results in a
different war file. Attach the artifact.

mvn war -DignoreOptional=true
mvn war:fullwar // creates target/$warname-$version-fullwar.war ??

Maybe there's a third solution? Anyone doing similar today ? Comments ?

Cheers,

--
Jerome Lacoste

---------------------------------------------------------------------
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]

Reply via email to