mojo cookbook; resolving transitively

2008-01-15 Thread Nigel Magnay
The Mojo Developer Cookbook
(http://docs.codehaus.org/display/MAVENUSER/Mojo+Developer+Cookbook)
is great.

In it, there's a section on Resolving Transitively. This works great
- however, the artifact set that is resolved is based on Maven's idea
of which graph edges ought to be considered for resolution.

For example, if I have a WAR file, then any declared dependencies that
are JARs (and POM I think) are included, and those artifacts have
their dependencies added to the list (and so on, recursively). The end
result resolves to a single version for each JAR artifact.

However - if the WAR file has a WAR dependency, then it will not be
considered, and any JAR files in there won't be included in the set
that the version is resolved in.

This is the behaviour that I want, where I have a WAR of WARs, and I
want to calculate the resolved set of dependencies.

a) How can I interject my own requirements for dependency traversal?
b) Is / how is this changed in 2.1 - all the methods on
ArtifactResolver have been condensed down into 1..

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



Re: mojo cookbook; resolving transitively

2008-01-15 Thread Jeff MAURY
On Jan 15, 2008 3:15 PM, Nigel Magnay [EMAIL PROTECTED] wrote:

 The Mojo Developer Cookbook
 (http://docs.codehaus.org/display/MAVENUSER/Mojo+Developer+Cookbook)
 is great.

 In it, there's a section on Resolving Transitively. This works great
 - however, the artifact set that is resolved is based on Maven's idea
 of which graph edges ought to be considered for resolution.

 For example, if I have a WAR file, then any declared dependencies that
 are JARs (and POM I think) are included, and those artifacts have
 their dependencies added to the list (and so on, recursively). The end
 result resolves to a single version for each JAR artifact.

 However - if the WAR file has a WAR dependency, then it will not be
 considered, and any JAR files in there won't be included in the set
 that the version is resolved in.

This is not what I have from my experience. If a WAR POM has a dependency of
type war, then then content of this dependency will be copied verbatim to
the target folder.

Jeff



 This is the behaviour that I want, where I have a WAR of WARs, and I
 want to calculate the resolved set of dependencies.

 a) How can I interject my own requirements for dependency traversal?
 b) Is / how is this changed in 2.1 - all the methods on
 ArtifactResolver have been condensed down into 1..

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




-- 
La mélancolie c'est communiste
Tout le monde y a droit de temps en temps
La mélancolie n'est pas capitaliste
C'est même gratuit pour les perdants
La mélancolie c'est pacifiste
On ne lui rentre jamais dedans
La mélancolie oh tu sais ça existe
Elle se prend même avec des gants
La mélancolie c'est pour les syndicalistes
Il faut juste sa carte de permanent

Miossec (2006)

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com


RE: mojo cookbook; resolving transitively

2008-01-15 Thread Jörg Schaible
Jeff MAURY wrote:
 On Jan 15, 2008 3:15 PM, Nigel Magnay [EMAIL PROTECTED] wrote:
 
 The Mojo Developer Cookbook
 (http://docs.codehaus.org/display/MAVENUSER/Mojo+Developer+Cookbook)
 is great. 
 
 In it, there's a section on Resolving Transitively. This works
 great - however, the artifact set that is resolved is based on
 Maven's idea of which graph edges ought to be considered for
 resolution. 
 
 For example, if I have a WAR file, then any declared dependencies
 that are JARs (and POM I think) are included, and those artifacts
 have their dependencies added to the list (and so on, recursively).
 The end result resolves to a single version for each JAR artifact.
 
 However - if the WAR file has a WAR dependency, then it will not be
 considered, and any JAR files in there won't be included in the set
 that the version is resolved in.
 
 This is not what I have from my experience. If a WAR POM has
 a dependency of
 type war, then then content of this dependency will be copied
 verbatim to the target folder.

This was not about a *copy* it was about *resolution*. If the dependend war 
contains foo-1.2 and the local one depends on foo-1.3 you end up with both.

 This is the behaviour that I want, where I have a WAR of WARs, and I
 want to calculate the resolved set of dependencies.

We always exclude WEB-INF/lib/*.* from the dependend wars and redeclare the 
deps.
 
 a) How can I interject my own requirements for dependency traversal?
 b) Is / how is this changed in 2.1 - all the methods on
 ArtifactResolver have been condensed down into 1..

See also MWAR-33 for discussion and workarounds.

- Jörg

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