You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stefan Ferstl <st...@gmail.com> on 2014/04/01 08:29:20 UTC

DependencyTreeBuilder vs. DependencyGraphBuilder

I'm using the org.apache.maven.shared:dependency-tree library to
gather dependency information on my projects. In order to get
additional information about version conflicts, I prefer to use
DependencyTreeBuilder instead of DependencyGraphBuilder. However, the
Javadoc of DependencyTreeBuilder says:

"Notice that it doesn't fail with Maven 3, but when Maven 2 and Maven
3 don't calculate the same transitive dependency result, the tree
calculated with this component is consistent with Maven 2 even if run
with Maven 3 (see MSHARED-167)"

The issue MSHARED-167 [1] was closed in June 2012. So may
DependencyTreeBuilder still produce different results than
DependencyGraphBuilder or is this not an issue anymore?


Cheers,
Stefan

[1] https://jira.codehaus.org/browse/MSHARED-167

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: DependencyTreeBuilder vs. DependencyGraphBuilder

Posted by Tonio Caputo <to...@exeo.com.ar>.
Hi,

Interesting problem, I've just faced,  using aether and maven 3.1,  I
developed a plugin for
creating a special kind of 'war' file for a plugin infrastructure.

I was using aether directly,  I faced the problem aether was changed, so
just looking into
maven dependency plugin, and looking at some advice mentioned in the
network I moved
from using aether directly to use maven-dependency-tree library, which
isolates me of the problem
of what Aether provider is used.

Because of the nature of the plugin, I need to use DependencyTree and not
DependencyGraph (need the repeated/confict info).

So wondering, should I go back to using Aether directly (because of
DependencyTree) deprecation, or
some replacement for it will be available ?

thanks in advance
tonio



On Wed, Apr 2, 2014 at 10:34 AM, Stefan Ferstl <st...@gmail.com> wrote:

> I haven't had any problems so far. I was just confused by
> DependencyTreeBuilder's Javadoc. It says that (at least I understood
> it that way) the dependency graph might differ from the dependency
> resolution in Maven 3. The same Javadoc references an Issue
> (MSHARED-167) that was solved two years ago. So I was not sure if
> differences can still occur or not. According to Hervé's reply,
> differences can still occur.
>
>
> Cheers,
> Stefan
>
>
> On Wed, Apr 2, 2014 at 2:49 AM, Martin Gainty <mg...@hotmail.com> wrote:
> > Stefan
> >
> > A year ago..Herve says r1469697 maven-dependency-tree  is fixed for M3
> > Is this not the case?
> >
> >
> > Martin
> >
> >
> >
> >
> >
> >> Date: Tue, 1 Apr 2014 08:29:20 +0200
> >> Subject: DependencyTreeBuilder vs. DependencyGraphBuilder
> >> From: st.ferstl@gmail.com
> >> To: users@maven.apache.org
> >>
> >> I'm using the org.apache.maven.shared:dependency-tree library to
> >> gather dependency information on my projects. In order to get
> >> additional information about version conflicts, I prefer to use
> >> DependencyTreeBuilder instead of DependencyGraphBuilder. However, the
> >> Javadoc of DependencyTreeBuilder says:
> >>
> >> "Notice that it doesn't fail with Maven 3, but when Maven 2 and Maven
> >> 3 don't calculate the same transitive dependency result, the tree
> >> calculated with this component is consistent with Maven 2 even if run
> >> with Maven 3 (see MSHARED-167)"
> >>
> >> The issue MSHARED-167 [1] was closed in June 2012. So may
> >> DependencyTreeBuilder still produce different results than
> >> DependencyGraphBuilder or is this not an issue anymore?
> >>
> >>
> >> Cheers,
> >> Stefan
> >>
> >> [1] https://jira.codehaus.org/browse/MSHARED-167
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: DependencyTreeBuilder vs. DependencyGraphBuilder

Posted by Stefan Ferstl <st...@gmail.com>.
I haven't had any problems so far. I was just confused by
DependencyTreeBuilder's Javadoc. It says that (at least I understood
it that way) the dependency graph might differ from the dependency
resolution in Maven 3. The same Javadoc references an Issue
(MSHARED-167) that was solved two years ago. So I was not sure if
differences can still occur or not. According to Hervé's reply,
differences can still occur.


Cheers,
Stefan


On Wed, Apr 2, 2014 at 2:49 AM, Martin Gainty <mg...@hotmail.com> wrote:
> Stefan
>
> A year ago..Herve says r1469697 maven-dependency-tree  is fixed for M3
> Is this not the case?
>
>
> Martin
>
>
>
>
>
>> Date: Tue, 1 Apr 2014 08:29:20 +0200
>> Subject: DependencyTreeBuilder vs. DependencyGraphBuilder
>> From: st.ferstl@gmail.com
>> To: users@maven.apache.org
>>
>> I'm using the org.apache.maven.shared:dependency-tree library to
>> gather dependency information on my projects. In order to get
>> additional information about version conflicts, I prefer to use
>> DependencyTreeBuilder instead of DependencyGraphBuilder. However, the
>> Javadoc of DependencyTreeBuilder says:
>>
>> "Notice that it doesn't fail with Maven 3, but when Maven 2 and Maven
>> 3 don't calculate the same transitive dependency result, the tree
>> calculated with this component is consistent with Maven 2 even if run
>> with Maven 3 (see MSHARED-167)"
>>
>> The issue MSHARED-167 [1] was closed in June 2012. So may
>> DependencyTreeBuilder still produce different results than
>> DependencyGraphBuilder or is this not an issue anymore?
>>
>>
>> Cheers,
>> Stefan
>>
>> [1] https://jira.codehaus.org/browse/MSHARED-167
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: DependencyTreeBuilder vs. DependencyGraphBuilder

Posted by Martin Gainty <mg...@hotmail.com>.
Stefan

A year ago..Herve says r1469697 maven-dependency-tree  is fixed for M3
Is this not the case?


Martin 

  



> Date: Tue, 1 Apr 2014 08:29:20 +0200
> Subject: DependencyTreeBuilder vs. DependencyGraphBuilder
> From: st.ferstl@gmail.com
> To: users@maven.apache.org
> 
> I'm using the org.apache.maven.shared:dependency-tree library to
> gather dependency information on my projects. In order to get
> additional information about version conflicts, I prefer to use
> DependencyTreeBuilder instead of DependencyGraphBuilder. However, the
> Javadoc of DependencyTreeBuilder says:
> 
> "Notice that it doesn't fail with Maven 3, but when Maven 2 and Maven
> 3 don't calculate the same transitive dependency result, the tree
> calculated with this component is consistent with Maven 2 even if run
> with Maven 3 (see MSHARED-167)"
> 
> The issue MSHARED-167 [1] was closed in June 2012. So may
> DependencyTreeBuilder still produce different results than
> DependencyGraphBuilder or is this not an issue anymore?
> 
> 
> Cheers,
> Stefan
> 
> [1] https://jira.codehaus.org/browse/MSHARED-167
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
 		 	   		  

Re: DependencyTreeBuilder vs. DependencyGraphBuilder

Posted by Hervé BOUTEMY <he...@free.fr>.
the difference still exists, and will never be fixed: that's the reasoning 
behind deprecating DependencyTreeBuilder

I you need additional info about version conflicts, you should use Aether API + 
Maven Aether Provider for Maven 3, which will give you everything

But at this precise level, you don't have any single API working with every 
version of Maven

Regards,

Hervé

Le mardi 1 avril 2014 08:29:20 Stefan Ferstl a écrit :
> I'm using the org.apache.maven.shared:dependency-tree library to
> gather dependency information on my projects. In order to get
> additional information about version conflicts, I prefer to use
> DependencyTreeBuilder instead of DependencyGraphBuilder. However, the
> Javadoc of DependencyTreeBuilder says:
> 
> "Notice that it doesn't fail with Maven 3, but when Maven 2 and Maven
> 3 don't calculate the same transitive dependency result, the tree
> calculated with this component is consistent with Maven 2 even if run
> with Maven 3 (see MSHARED-167)"
> 
> The issue MSHARED-167 [1] was closed in June 2012. So may
> DependencyTreeBuilder still produce different results than
> DependencyGraphBuilder or is this not an issue anymore?
> 
> 
> Cheers,
> Stefan
> 
> [1] https://jira.codehaus.org/browse/MSHARED-167
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org