It's not a secret anymore!*
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven dependencies Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven dependencies" Watch "Maven dependencies" New topic
Author

Maven dependencies

Tiago Fernandez
Ranch Hand

Joined: May 16, 2003
Posts: 167
Hi,

I'm trying to compile my project using Maven, and I got a couple of JAR dependencies in my project. One of them is my personal lib, so I couldn't download it from any remote server. So, how do I set things up in my project.xml?

For example, my lib is X:\mylibs\foo.jar and I have to tell Maven to use it. How to do it? Meanwhile I'll STFM

Tks.


Tiago Fernandez
http://www.tiago182.spyw.com/
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
You can simply put it in your maven repository ($HOME/.maven/repository).

- Peter
Max Loukianov
Greenhorn

Joined: Oct 07, 2003
Posts: 3
You have an option of putting it into your local Maven repository and then describing the dependency in your project.xml file:

<dependency>
<groupId>your_company<groupId>
<artifactId>your_library_name</artifactId>
<version>1.3</version>
</dependency>

then the jar file will have to be located at:

maven/repository/your_company/jars/your_library_name-1.3.jar

Hope this helps.

max@jbossfaq.com
---------------
http://www.jbossfaq.com is hosted on JBoss at http://www.thebeanfactory.com
[ January 15, 2005: Message edited by: Max Loukianov ]

--------------------<br /><a href="http://www.jbossfaq.com" target="_blank" rel="nofollow">www.jbossfaq.com</a> is hosted on JBoss at <a href="http://www.thebeanfactory.com" target="_blank" rel="nofollow">www.thebeanfactory.com</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maven dependencies