0
votes

I am setting up a new Artifactory Server.

I have a need where my Maven Java project should not have any dependency to a remote repository to get the related jar files configured in pom.xml. For example Spring Boot related files.

The project will pull all related jar files from the local repository manager (Artifactory). So if the internet is down or no outside connection is available all files can be pulled from the local Artifactory repo.

How can I add open source projects like Spring boot to my local Artifactory repo. I do not want to use Virtual repository which points to the external maven repo etc since I do not want any external dependency .

The goal is when I do my maven build all related jar files (for example Spring Boot) will be pulled form the local Artifactory repository.

Thanks.

1

1 Answers

0
votes

It is recommended to use remote and virtual repositories in Artifactory. When working with a remote repository, Artifactory will locally cache artifacts which were fetched from the external repository. This means that even if the remote repository is offline, you can still get the cached artifacts from Artifactory.
Using a virtual repository, allows you to aggregate your local repositories with remote repositories and point Maven to a single repository URL.

If you always want to work just with local repositories, you can take one of 2 approaches:

  1. Caching artifacts in a remote repository, copying them to a local repository and building only with the local repository
  2. Uploading / importing 3rd part dependencies to a local repository

In any case, I would aggregate local repositories in a virtual one for the sake of having one repository for Maven.