I have following Artifactory (6.12.1) settings
Remote repositories:
- central: https://repo.maven.apache.org/maven2
- jboss: https://repository.jboss.org/nexus/content/groups/public/
- jcenter https://jcenter.bintray.com
- jvnet-nexus-staging: http://maven.java.net/content/repositories/staging/
- rabbit-milestone: https://dl.bintray.com/rabbitmq/maven-milestones
- repository.spring.milestone: https://repo.spring.io/milestone
- repository.spring.snapshot: https://repo.spring.io/snapshot
- sonatype-oss-snapshots: https://oss.sonatype.org/content/repositories/snapshots/
Virtual repositories
- libs-release: libs-release-local, central, repository.spring.milestone, jcenter, jboss, rabbit-milestone
- libs-snapshot: libs-snapshot-local, repository.spring.snapshot, jvnet-nexus-staging, sonatype-oss-snapshots
I'm trying to build spring-boot locally and I've forced all remote repositories from my system to go through our Artifactory. So I've added to my .m2/settings.xml
following section:
<profile>
<id>artifactory</id>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>https://artifactory.secret.com/artifactory/libs-release</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot</name>
<url>https://artifactory.secret.com/artifactory/libs-snapshot</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>spring-milestone</id>
<name>libs-release</name>
<url>https://artifactory.secret.com/artifactory/libs-release</url>
</repository>
<repository>
<snapshots />
<id>spring-snapshot</id>
<name>libs-snapshot</name>
<url>https://artifactory.secret.com/artifactory/libs-snapshot</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>rabbit-milestone</id>
<name>libs-release</name>
<url>https://artifactory.secret.com/artifactory/libs-release</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>https://artifactory.secret.com/artifactory/libs-release</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot</name>
<url>https://artifactory.secret.com/artifactory/libs-snapshot</url>
</pluginRepository>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>spring-milestone</id>
<name>libs-release</name>
<url>https://artifactory.secret.com/artifactory/libs-release</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>spring-snapshot</id>
<name>libs-snapshot</name>
<url>https://artifactory.secret.com/artifactory/libs-snapshot</url>
</pluginRepository>
</pluginRepositories>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
I've verified that everything works and our projects install dependencies correctly. This should be all ok.
Now the spring-boot project has repository definitions in root pom.xml, but my settings override it, which means maven is trying to download from our Artifactory (as intended).
But it get's stuck on this dependency
[INFO] -------------< org.springframework.boot:spring-boot-docs >--------------
[INFO] Building Spring Boot Docs 2.2.0.BUILD-SNAPSHOT [80/88]
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://artifactory.secret.com/artifactory/libs-release/org/apache/geronimo/specs/geronimo-jta_1.0.1B_spec/1.0.1/geronimo-jta_1.0.1B_spec-1.0.1.pom
Downloaded from central: https://artifactory.secret.com/artifactory/libs-release/org/apache/geronimo/specs/geronimo-jta_1.0.1B_spec/1.0.1/geronimo-jta_1.0.1B_spec-1.0.1.pom (737 B at 12 kB/s)
Downloading from central: https://artifactory.secret.com/artifactory/libs-release/org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
Downloading from snapshots: https://artifactory.secret.com/artifactory/libs-snapshot/org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
Downloading from central: https://artifactory.secret.com/artifactory/libs-release/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1.1/geronimo-jms_1.1_spec-1.1.1.pom
Downloaded from central: https://artifactory.secret.com/artifactory/libs-release/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1.1/geronimo-jms_1.1_spec-1.1.1.pom (2.6 kB at 20 kB/s)
Downloading from central: https://artifactory.secret.com/artifactory/libs-release/org/apache/geronimo/specs/geronimo-jms_2.0_spec/1.0-alpha-2/geronimo-jms_2.0_spec-1.0-alpha-2.pom
Downloaded from central: https://artifactory.secret.com/artifactory/libs-release/org/apache/geronimo/specs/geronimo-jms_2.0_spec/1.0-alpha-2/geronimo-jms_2.0_spec-1.0-alpha-2.pom (4.3 kB at 73 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Spring Boot Build 2.2.0.BUILD-SNAPSHOT:
[INFO]
[INFO] Spring Boot Docs ................................... FAILURE [ 0.486 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:32 min
[INFO] Finished at: 2019-08-31T17:55:28+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project spring-boot-docs: Could not resolve dependencies for project org.springframework.boot:spring-boot-docs:jar:2.2.0.BUILD-SNAPSHOT: Failed to collect dependencies at org.apache.activemq:activemq-jms-pool:jar:5.15.9 -> org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0.1: Failed to read artifact descriptor for org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0.1: Could not find artifact org.apache.geronimo.specs:specs:pom:1.1 in central (https://artifactory.secret.com/artifactory/libs-release) -> [Help 1]
When I look at maven central, the version is there
When I look at central
in Artifactory the org.apache.geronimo.specs:specs
artifact is also there
But it's never downloaded and cached, there is only 1.4
I've tried purging the whole org.apache.geronimo
tree from Artifactory caches and from my local maven cache, but it still only sees the 1.4
version.
Is there some other cache that I should try to refresh? Or is it an Artifactory bug? Thanks
<mirror>
entry into yoursettings.xml
so that you can be sure all requests are redirected to that mirror. – J Fabian Meier<mirror>
but had some problems with it - overriding repositories worked the first time I've tried it. – Filip Procházka