Maven. What to do with "homeless" jars?
Posted
by Jake
on Stack Overflow
See other posts from Stack Overflow
or by Jake
Published on 2010-05-26T21:27:44Z
Indexed on
2010/05/26
21:31 UTC
Read the original article
Hit count: 242
maven
|local-dependency
I have some proprietary.jar that I need to include in my project, but I don't wish to install it to the local repository.
What I did initially was to put the jar into version control in my project's lib/
folder, and then specify the Maven dependency as:
<!-- LOCAL DEPENDENCY -->
<dependency>
<groupId>topsecret</groupId>
<artifactId>proprietary</artifactId>
<version>0.0.1</version>
<scope>system</scope>
<systemPath>${basedir}/lib/java/proprietary.jar</systemPath>
</dependency>
However, this becomes a big problem when my project becomes someone else's dependency. Maven will not be able to validate this POM because the path is not absolute.
What is the best way to overcome this problem?
© Stack Overflow or respective owner