Meaningless Drivel is fun!*
The moose likes Ant, Maven and Other Build Tools and the fly likes Override dependencies of third party jar in maven Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Override dependencies of third party jar in maven" Watch "Override dependencies of third party jar in maven" New topic
Author

Override dependencies of third party jar in maven

Raihan Jamal
Ranch Hand

Joined: Mar 23, 2010
Posts: 86
Like this org.carrot2 is depending on commons-httpclient 3.1 So how I can change this commons-httpclient 3.1 to HttpClient 4.1.1. I am working in eclipse. As I want to remove commons-httpclient:3.1 from those who are depending on this jar file and I want to replace with HttpClient 4.1.1.

So what I was trying to do.. I doubled click on this org.carrot2 from dependency hierarchy folder and went into its pom.xml file and was trying to change commons-httpclient 3.1 to httpclient 4.1.1 but it is not allowing me to change as backspace and delete is not working on that..

Any suggestions will be appreciated..
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3829

So you are trying to modify a third party library jar (this may include the library being compiled with the new dependency) file and distribute it with your application to the client?
I'm not sure about any licencing issues with this, but we'll leave it aside for the moment. Are you not trying to modify the extracted jar here?

[EDIT]Changed to licencing instead copyright[/EDIT]


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16061
    
  21

There are some restrictions on this, but for the most part, if you have a POM that has a dependency that has a sub-dependency on an older version of a jar, you can specify the newer version in your POM and that version will be the one and only version that is installed and bound to your target.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Override dependencies of third party jar in maven