Dependency groups?

2006-12-22 Thread MikeKey

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?

Thanks for any help.
-- 
View this message in context: 
http://www.nabble.com/Dependency-groups--tf2872833s177.html#a8029585
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Dependency Groups

2003-09-01 Thread Dave Ford
Is there a way to define reusable "lib groups"?  IntelliJ lets you do this
under project properties/paths/libraries. For example, if i use hibernate in
5 different projects. And hibernate requires 5 jar files. That's a lot of
extra typing in project.xml (dependencies section).


Dave Ford
Smart Soft - The Developer Training Company
http://www.smart-soft.com



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



Re: Dependency groups?

2006-12-22 Thread Craig McClanahan

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?



We do this kind of thing in Shale, to provide a common set of dependencies
for all of the sample apps.  Each individual app's pom mentions "
org.apache.shale:shale-apps-parent"[1] as its parent, and therefore inherits
all the common dependencies.

Another useful approach to this sort of problem is the Maven2 "archetype"
facilities[2], where you can define the initial structure of a new project
(and include the default set of dependencies in the newly created pom.  The
dependencies aren't shared later, but this is a great way to get a kick
start on a new project that needs a starter set of stuff, but then will
evolve on its own.


Thanks for any help.

--
View this message in context:
http://www.nabble.com/Dependency-groups--tf2872833s177.html#a8029585
Sent from the Maven - Users mailing list archive at Nabble.com.



Craig

[1]
http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/pom.xml?view=log
[2]
http://maven.apache.org/guides/introduction/introduction-to-archetypes.html


-

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




Re: Dependency groups?

2006-12-22 Thread Wendy Smoak

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 pom which has dependencies, and then have your
project _depend_ on that pom, so that you pick up those dependencies
transitively.  For example

   
 net.wsmoak
 dependencies-only
 1.0-SNAPSHOT
 pom
  

--
Wendy

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



RE: Dependency groups?

2006-12-24 Thread Bryan Loofbourrow
>> 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 pom which has dependencies, and then have your
project _depend_ on that pom, so that you pick up those dependencies
transitively. <<

Not only does this technique work, but I think it's both sensible and
useful, any time you want separately characterize or expose a separate type
of dependencies. In particular, I've found it helpful for the
currently-not-really-addressed-in-Maven-2 use case of packaging wars in an
ear, with (most) dependent jars packaged in the ear. You make a dependency
project for the things you want packaged in the ear, and have the war
project and the ear project depend on the dependency project. The only
difficulty with this is that the exclusion of the jars from the war is an
awkward business, because you only have includes and excludes to work with,
with only * as wildcards. Regular expressions would clean that right up, and
I've requested such a change here: http://jira.codehaus.org/browse/MWAR-81 

I've found other uses for this too. I think it's a neat trick.

-- Bryan

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 22, 2006 5:34 PM
To: Maven Users List
Subject: Re: Dependency groups?

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 pom which has dependencies, and then have your
project _depend_ on that pom, so that you pick up those dependencies
transitively.  For example


  net.wsmoak
  dependencies-only
  1.0-SNAPSHOT
  pom
   

-- 
Wendy

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


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



Re: Dependency Groups

2003-09-01 Thread Nelson Arapé
You may use XML Entities

Nelson Arapé

On Monday 01 September 2003 13:14, Dave Ford wrote:
> Is there a way to define reusable "lib groups"?  IntelliJ lets you do this
> under project properties/paths/libraries. For example, if i use hibernate
> in 5 different projects. And hibernate requires 5 jar files. That's a lot
> of extra typing in project.xml (dependencies section).
>
>
> Dave Ford
> Smart Soft - The Developer Training Company
> http://www.smart-soft.com
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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



Re: Dependency Groups

2003-09-01 Thread Jason van Zyl
On Mon, 2003-09-01 at 13:14, Dave Ford wrote:
> Is there a way to define reusable "lib groups"?  IntelliJ lets you do this
> under project properties/paths/libraries. For example, if i use hibernate in
> 5 different projects. And hibernate requires 5 jar files. That's a lot of
> extra typing in project.xml (dependencies section).

Transitive dependencies will come but not slated for the 1.0 release.

> 
> Dave Ford
> Smart Soft - The Developer Training Company
> http://www.smart-soft.com
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
jvz.

Jason van Zyl
[EMAIL PROTECTED]
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


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