On 12/22/06, MikeKey <[EMAIL PROTECTED]> wrote:

Forgive a likely newbie question but I've not found anything outside a hacked
parent pom to get something like this to work.

Is there any way to setup a pre-defined set of dependencies to include in a
given pom?  For example, Hibernate requires several jars to be included as
dependencies to a project using it...is there a sane way in maven to define
a hibernate-dependencies.pom or something like that and include it in my
pom.xml?  To make a reusable set of dependencies?

Without seeing the project, it's hard to make a recommendation.  If
you're finding that you have the same dependencies in a lot of places,
is it possible that some code could be moved into a separate module?
Then you'd depend on that jar, and get thost dependencies
transitively.

To answer your original question... I'm not sure I'd recommend this
approach, but (I just tried it and) it works... you can create a
project with <packaging>pom which has dependencies, and then have your
project _depend_ on that pom, so that you pick up those dependencies
transitively.  For example

   <dependency>
     <groupId>net.wsmoak</groupId>
     <artifactId>dependencies-only</artifactId>
     <version>1.0-SNAPSHOT</version>
     <type>pom</type>
  </dependency>

--
Wendy

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

Reply via email to