Reputation:
the question is:
i start a local lib to collect some common utils in it.
then i use eclipse m2e to run as Maven Install, and it truely generate the jar into my local cached repos dir.
and now, i want to use that lib as a dependency in my project, i just type the dependency xml as the other (like spring etc.).
but it just can load that lib in the maven dependencies libs.
I search the web and find that systemPath could work, but i don' t like this way. how can i use my local jar in a same way?
Upvotes: 0
Views: 206
Reputation: 718678
You can do a (non-Maven) build and:
(I have even resorted to using an "internal repository" that was part of the project's version control check-out; i.e. putting the JAR into version control.)
But I think that the best approach would be to Mavenize the build for the utility JAR, and handle it just like your main Maven projects.
Upvotes: 1
Reputation: 49161
Install it into your repository. Either local (mvn install
) or run repository software like Artifactory, Archiva or Nexus. http://maven.apache.org/repository-management.html
Upvotes: 2