0
votes

I'm building a clients project using maven and artifactory. The following happens when I build it. I can't resolve it using maven on it's own, or when I point it to artifactory using <mirrorOf>* in .m2/settings.xml

[ERROR] Failed to execute goal on project reverseMapping: Could not resolve dependencies for project com.bskyb:reverseMapping:mule:14.6.1-SNAPSHOT: Could not find artifact net.sf.saxon:saxon:jar:8.9.0.4-osgi in repo (http://my.artifactory:8081/artifactory/repo) -> [Help 1]

I can see an artifact that appears to be the correct one, here: http://central.maven.org/maven/mule/dependencies/maven2/net/sf/saxon/saxon/8.9.0.4-osgi/

I can download it with the following command

mvn org.apache.maven.plugins:maven-dependency-plugin:2.1:get \ 
  -DrepoUrl=http://central.maven.org/maven/mule/dependencies/maven2 \
  -Dartifact=net.sf.saxon:saxon:8.9.0.4-osgi

This suggests I need to add a repo to artifactory using the repoUrl in the command above

Is this correct?

What is the correct way to implement this so artifactory can resolve it?

1

1 Answers

1
votes

Mule dependencies are, apparently not in Maven Central, but in their own repository, located, in a very confusing way, under http://central.maven.org but not in it.

Mule's repository root URL is http://central.maven.org/maven/mule/dependencies/maven2.

You need to add it a new remote repository to Artifactory. The user guide has the instructions on how to do it.

You're more than welcome to read all the Repositories chapter, Artifactory will make more sense to you after grasping some basic concepts (for example why using repo repository and mirrorOf setting are discouraged).