I have deployed a JAR file to a custom Artifactory repository (called my_custom_repo), and am attempting to access it in a Maven build. My POM file points to my artifactory repo using the tag:
<repositories>
<repository>
<id>snapshots</id>
<name>c70766072326c-snapshots</name>
<url>http://mymachine:8081/artifactory/my_custom_repo</url>
</repository>
</repositories>
And my dependency is set up as follows:
<dependency>
<groupId>mygroupid</groupId>
<artifactId>reslib</artifactId>
<version>0.1.0</version>
</dependency>
I have also set Artifactory to give anonymous access (for reading, of course) to the my_custom_repo.
I have been attempting to build my application. The build is failing with the following error message:
Could not resolve dependencies for project com.factor3.apps:myserver:jar:0.0.1: Failed to collect
dependencies at mygroupid.libs:reslib:jar:0.1.0: Failed to read artifact descriptor for
mygroupid:reslib:jar:0.1.0: Could not transfer artifact mygroupid:reslib:pom:0.1.0 from/to snapshots
(http://mymachine1:8081/artifactory/my_custom_repo/): Not authorized -> [Help 1]
I have attempted a few things, including a mvn clean install. The failure persists.
Is there some configuration of my POM file, Maven, or Artifactory what will enable me to successfully compile my project?