• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Maven dependency infomation of third-party jars

 
Jim You
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic