How can I configure the artifactory-maven-plugin to resolve dependencies from our private Artifactory server?
The official documentation explains on how to publish: https://www.jfrog.com/confluence/display/RTF/Maven+Artifactory+Plugin#MavenArtifactoryPlugin-Usage
Usually, dependency resolving works by adding servers to my .m2/settings.xml and specifying credentials there. However, in a cloud Docker build environment, it is difficult to place the settings.xml inside the container. It would be much easier if the plugin could be configured accordingly.
The Gradle Artifactory Plugin has explicit documentation about this (see dependencies resolution): https://www.jfrog.com/confluence/display/RTF/Gradle+Artifactory+Plugin#GradleArtifactoryPlugin-UsingtheArtifactoryPluginDSL
Turns out the Maven plugin also has a resolver configuration option. But it is not documented anywhere. This does not work (Maven still won't try to download dependencies from Artifactory):
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>2.6.1</version>
<inherited>false</inherited>
<configuration>
<resolver>
<contextUrl>${artifactory.context.url}</contextUrl>
<username>${artifactory.username}</username>
<password>${artifactory.password}</password>
<repoKey>libs-local</repoKey>
</resolver>
</configuration>
</plugin>