You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by James Green <ja...@gmail.com> on 2013/09/19 16:17:41 UTC

dependency:tree gets wrong version?

Gotta be a simple one this!

Upgraded ourselves to apache-cxf-2.7.6 and we've been getting errors since.
Well-publicised solution is to find and remove any dependencies on woodstox
prior to 4.2.0.

So dependency:tree only shows us having 4.2.0. Yet clean & build results in
WEB-INF/lib having 4.1.2. On both cases we are operating at the parent
module level.

Any ideas how else to find this apparently stuck dependency?

James

Re: dependency:tree gets wrong version?

Posted by James Green <ja...@gmail.com>.
Appreciate that and this provides a good way forward. While "debugging" the
problem we actually ended up removing a pile of dependencies included which
were no longer required shaving about 7mb from the binary so it ended up
being fruitful anyway..!


On 20 September 2013 18:04, Jörg Schaible <jo...@gmx.de> wrote:

> Hi James,
>
> James Green wrote:
>
> > org.apache.maven.plugins:maven-dependency-plugin:2.8
> >
> > The only way we resolved our problem was by loading the project into
> > Eclipse and viewing the graph of dependencies, then dropping each that
> had
> > a transitive dependency on the older woodstox. Eventually jaxws-rt was
> > dropped and the woodstox 2.4.0 was included. So we added an exclude here
> > and we've been fine since.
> >
> > It would have been nice if the dependency plugin showed that really. We
> > did upgrade the dependency from an older release but didn't see any
> change
> > as a result.
>
> Hmm. I control my versions normally with a shared dependencyManagement
> section. No room for surprises!
>
> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: dependency:tree gets wrong version?

Posted by Jörg Schaible <jo...@gmx.de>.
Hi James,

James Green wrote:

> org.apache.maven.plugins:maven-dependency-plugin:2.8
> 
> The only way we resolved our problem was by loading the project into
> Eclipse and viewing the graph of dependencies, then dropping each that had
> a transitive dependency on the older woodstox. Eventually jaxws-rt was
> dropped and the woodstox 2.4.0 was included. So we added an exclude here
> and we've been fine since.
> 
> It would have been nice if the dependency plugin showed that really. We
> did upgrade the dependency from an older release but didn't see any change
> as a result.

Hmm. I control my versions normally with a shared dependencyManagement 
section. No room for surprises!

- Jörg


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


Re: dependency:tree gets wrong version?

Posted by James Green <ja...@gmail.com>.
org.apache.maven.plugins:maven-dependency-plugin:2.8

The only way we resolved our problem was by loading the project into
Eclipse and viewing the graph of dependencies, then dropping each that had
a transitive dependency on the older woodstox. Eventually jaxws-rt was
dropped and the woodstox 2.4.0 was included. So we added an exclude here
and we've been fine since.

It would have been nice if the dependency plugin showed that really. We did
upgrade the dependency from an older release but didn't see any change as a
result.

James



On 20 September 2013 08:13, Jörg Schaible <Jo...@scalaris.com>wrote:

> Hi James,
>
> James Green wrote:
>
> > Gotta be a simple one this!
> >
> > Upgraded ourselves to apache-cxf-2.7.6 and we've been getting errors
> > since. Well-publicised solution is to find and remove any dependencies on
> > woodstox prior to 4.2.0.
> >
> > So dependency:tree only shows us having 4.2.0. Yet clean & build results
> > in WEB-INF/lib having 4.1.2. On both cases we are operating at the parent
> > module level.
> >
> > Any ideas how else to find this apparently stuck dependency?
>
> All dependency plugins (except the most recent IIRC) will use the old M2
> way
> to calculate the dependencies. So, if you use M3, the effectively used
> dependencies might differ from the plugin's output unless you use version
> 2.8 of the plugin. Which version are you using?
>
> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: dependency:tree gets wrong version?

Posted by Jörg Schaible <Jo...@scalaris.com>.
Hi James,

James Green wrote:

> Gotta be a simple one this!
> 
> Upgraded ourselves to apache-cxf-2.7.6 and we've been getting errors
> since. Well-publicised solution is to find and remove any dependencies on
> woodstox prior to 4.2.0.
> 
> So dependency:tree only shows us having 4.2.0. Yet clean & build results
> in WEB-INF/lib having 4.1.2. On both cases we are operating at the parent
> module level.
> 
> Any ideas how else to find this apparently stuck dependency?

All dependency plugins (except the most recent IIRC) will use the old M2 way 
to calculate the dependencies. So, if you use M3, the effectively used 
dependencies might differ from the plugin's output unless you use version 
2.8 of the plugin. Which version are you using?

- Jörg


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


Re: dependency:tree gets wrong version?

Posted by Richard Vowles <ri...@bluetrainsoftware.com>.
Enforcing it would be:

 <dependency>
      <groupId>org.codehaus.woodstox</groupId>
      <artifactId>woodstox-core-asl</artifactId>
      <version>[4.2.0]</version>
    </dependency>

Note the square brackets around the version. 4.2.0 is still simply an
advised version, and Maven can and will override it. With the square
brackets it will fail.




On Fri, Sep 20, 2013 at 4:32 AM, Ziga GREGORIC <zi...@gmail.com>wrote:

> Try enforcing version with
>
> <dependencyManagement>
>   <dependencies>
>     <dependency>
>       <groupId>org.codehaus.woodstox</groupId>
>       <artifactId>woodstox-core-asl</artifactId>
>       <version>4.2.0</version>
>     </dependency>
>   </dependencies>
> </dependencyManagement>
>
> on parent level (check if this is the right artifact).
>
> Regards,
> Ziga Gregoric
>
>
> On Thu, Sep 19, 2013 at 4:17 PM, James Green <james.mk.green@gmail.com
> >wrote:
>
> > Gotta be a simple one this!
> >
> > Upgraded ourselves to apache-cxf-2.7.6 and we've been getting errors
> since.
> > Well-publicised solution is to find and remove any dependencies on
> woodstox
> > prior to 4.2.0.
> >
> > So dependency:tree only shows us having 4.2.0. Yet clean & build results
> in
> > WEB-INF/lib having 4.1.2. On both cases we are operating at the parent
> > module level.
> >
> > Any ideas how else to find this apparently stuck dependency?
> >
> > James
> >
>



-- 
---
Richard Vowles,
Groovy, Java, Javascript, AngularJS

ph: +64275467747, google+:plus.to/Richard.Vowles <http://rvowl.es/UX8Bmq>

Re: dependency:tree gets wrong version?

Posted by Ziga GREGORIC <zi...@gmail.com>.
Try enforcing version with

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.codehaus.woodstox</groupId>
      <artifactId>woodstox-core-asl</artifactId>
      <version>4.2.0</version>
    </dependency>
  </dependencies>
</dependencyManagement>

on parent level (check if this is the right artifact).

Regards,
Ziga Gregoric


On Thu, Sep 19, 2013 at 4:17 PM, James Green <ja...@gmail.com>wrote:

> Gotta be a simple one this!
>
> Upgraded ourselves to apache-cxf-2.7.6 and we've been getting errors since.
> Well-publicised solution is to find and remove any dependencies on woodstox
> prior to 4.2.0.
>
> So dependency:tree only shows us having 4.2.0. Yet clean & build results in
> WEB-INF/lib having 4.1.2. On both cases we are operating at the parent
> module level.
>
> Any ideas how else to find this apparently stuck dependency?
>
> James
>