I would just solve this with 2 profiles and a shared variable ie
${myscope} which is set in the profiles to be "provided" or "compile".
Then in the various poms, I'd specify the dependency as
<scope>${myscope}</scope>.

Alternatively you can specify the dependencies themselves in the profiles [0].

[0] http://docs.codehaus.org/display/MAVEN/Build+Profiles

Wayne

On 1/8/07, Thierry Lach <[EMAIL PROTECTED]> wrote:
OK I think I found out how to do this.  I wouldn't be using different
scopes, but I would be using different assemblies.  Correct or not?

On 1/5/07, Thierry Lach <[EMAIL PROTECTED]> wrote:
>
> I'm putting together a build process in which I want to be able to
> customize the war build to optionally exclude certain jars under certain
> profiles.  Specifically, I want to exclude the junit jar from WEB-INF/lib if
> (and only if) I'm building using the profile jboss, triggered by
> -Djboss-build on the command line.
>
> So I want <scope>provided</scope> when building for jboss, but
> <scope>compile</scope> when not.  Is there any way that I can accomplish
> this?
>
>
>



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

Reply via email to