wood burning stoves 2.0*
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven dependency infomation of third-party jars Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven dependency infomation of third-party jars" Watch "Maven dependency infomation of third-party jars" New topic
Author

Maven dependency infomation of third-party jars

Jim You
Greenhorn

Joined: Oct 28, 2005
Posts: 4
hi, everyone

I have started learning how to build a project by Maven a few days ago. Something about dependency feature of Maven troubles me a lot.

As you see Maven strongly suggests us stores .jar files we need into Maven respository and get them by giving dependencies information about all .jar files in project.xml when building the project. We need to provide 'groupId' and 'artifactId' property for every .jar file. Sometimes the 'groupId' and 'artifactId' property is unkown to us.

Where can I get a dependency infomation list of the third-party ".jar" files which were stored in Maven center respository? If there are no any third-party .jar files we need to build the project in Maven center respository, what we have to do for building it?

Thanks,
Jim You
[ October 29, 2005: Message edited by: Bear Bibeault ]

Just do it.
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
I'm also learning maven

If the third party jar you are looking for is not present in maven repo, then you can copy the jar to your local maven repository / you can specify the remote repo that you want to be looking at using 'maven.repo.remote' property in your project.properties i guess.

OR

If you depend on xyz-1.2.jar which is not present in maven repo and you have the jar file with you, then i guess you create a folder

xyz\jars under {user-profile}.maven\repository and copy your jar file there.

and in the dependency you can specify

<groupId>xyz<groupId>
<artifactId>xyz</artificatId>
<version>1.2</version>

and maven should source that jar from the local repository instead of looking at maven remote repo.

If the jar you are lookig for is hosted at say

http://www.abc.org/dist/jar/xyz1.2.jar

and

'maven.repo.remote' is pointing to 'http://www.abc.org'

then specifying something like this in in project.xml should work?

<groupId>dist<groupId>
<artifactId>xyz</artificatId>
<version>1.2</version>

[ October 28, 2005: Message edited by: Karthik Guru ]
[ October 28, 2005: Message edited by: Karthik Guru ]
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
Also , I guess that any third party project should supply a project.xml that lists its run-time dependencies that will be needed to make it work so that we dont have to be going around hunting for it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maven dependency infomation of third-party jars
 
Similar Threads
Could not resolve dependencies for maven project
Unable to create one single jar file in maven with dependencies included inside
java.util.MissingResourceException: Can't find bundle for base name in JSF Spring Maven project
Tomcat and Axis2
Ear Building in Maven