0

I have a folder containing libraries which I ripped from a Maven repository and need to be able to load them into my local repository. Because they were extracted from Maven using the dependency:copy-dependencies goal they all have their artifact and version number as part of the file name. Most of these a proprietary libraries so I cannot just fetch them again from a global repository.

Any Ideas?

JLove

2 Answers 2

1

Are you asking how to intall them in your local repo, or how to make them available to maven from the project? If the former just look at the docs for mvn install:install:file if the latter I wrote a blog post on a way to package project local maven dependencies http://codeghost.co.uk/blog/2012/8/15/environment-agnostic-non-public-maven-library-references.html

Sign up to request clarification or add additional context in comments.

2 Comments

I'm asking how to install them to my local repo, probably should have said that my main reason for the question is the volume of libraries (100+) which is the main issue... I think I'll just write a shell script. Thanks
The project local repo could still be a quick win for you then. Assuming you don't care what the group id of the artifacts is, you can make a single folder structure with just the final artifact id being different. You can then update your exiting dependencies to use your new details. The libs will get installed into your local repo using the new structure when you run mvn install
0

Best things for such purposes is to install a repository manager and install such kind of libraries into the repository manager. Afterwards you can use them as usual dependencies.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.