سؤال

I'm using Jfrog Artifactory to contain artifacts. I'm building with Maven. Is there a way to configure Maven to automatically download missing artifacts, artifacts that are not in the Artifactory repo.

Example:
org.maven.framework-2.5.0 is downloaded from Artifactory since it exists in the Artifactory. org.maven.anotherframework-2.2.2 doesn't exists in Artifacotry. How to set maven to get from internet?

Is it common to use Artifactory this way?

هل كانت مفيدة؟

المحلول

You should configure Artifactory to fetch missing artifacts from the Internet, not Maven. Artifactory can (and should) be used as a proxy:

enter image description here

It already comes with set a pre-configured popular remote repositories and you can add new ones.

So, if Maven fails on unresolved dependency, find a repository that has it, add it to Artifactory as remote repository, retry the build. If you can't find any repository that has it, you can upload the jar directly to Artifactory and retry the build.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top