Deploy jar files to Archiva manually

2.7k Views Asked by At

I have a lot of jar files in my local hard drive and I want to use them as a repository so that my internet connection requirement can be removed.

I installed Archiva but I don't know how can I deploy the jar files to Archiva. there is a UI form which does this task but deploying huge amount of jar files by hand is not easy and waste a lot of time.

How can I use my local jar files as a repository so that I can use Maven(or Ivy) to manage dependencies?

1

There are 1 best solutions below

0
On BEST ANSWER

You can upload them with mvn deploy:deploy-file, which you could use in a script for a bulk upload (discussed here, and here's an example script).

As an alternative, if you want to use those local files directly, you can copy them into the storage location of an Archiva repository. From this thread:

One way to put all your local .m2 repository content is to copy from ~/.m2/repository to ${archiva-install-dir}/data/repository/${managed-repository-name}/

...

Once the copy is done, you can force Archiva d/b scan on the managed repository.