I have a similar use case.  In a multi-module build all but two of the
modules have the same base dependency so they are specified in the parent
pom.  However I really don't want those dependencies in the two modules, so
how can I exclude them?

(BTW, my use case is a Java project that has a couple of Flex modules,
obviously Flex doesn't need the otherwise global log4j dependency.)

Short of not putting any dependencies in the parent how can I exclude them?

-Dave

On Wed, Apr 29, 2009 at 11:58 AM, Nick Stolwijk <[email protected]>wrote:

> > Hi, I have a common POM to all my projects.
> Each project should have its own POM, with a parent pom hierarchy to
> avoid duplication, declare dependencyManagement and plugin
> versions/configuration.
>
> > The problem is that project X cannot use my common POM.
> Then let it have its own POM, like each project.
>
> > I don't think there is an easy solution,
> I don't understand your problem, maybe try to better describe the
> problem with some code examples (not the whole code!)
>
> >the closest I could find is to use dependencyManagement instead of the
> dependency itself. But that > would increase the amount of code.
> No, that would decrease the amount of code. You don't have to specify
> the version in each POM, but only in your company pom. It is not
> logical that each project has exactly the same set of dependencies.
>
> If you could try to explain what your current setup looks like, maybe
> we could give you some pointers how to improve it.
>
> Hth,
>
> Nick Stolwijk
> ~Java Developer~
>
> Iprofs BV.
> Claus Sluterweg 125
> 2012 WS Haarlem
> www.iprofs.nl
>
>
>
> On Wed, Apr 29, 2009 at 7:25 PM, icet <[email protected]> wrote:
> > Hi, I have a common POM to all my projects.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to