I have the following Gradle 8.9 configuration:
plugins {
id 'org.springframework.boot' version '3.2.7'
id 'io.spring.dependency-management' version '1.1.6'
id 'java'
}
group = 'com.test'
version = '0.0.1'
java {
sourceCompatibility = '21'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
ext {
set('springCloudVersion', "2023.0.3")
artifactory_contextUrl = "http://192.168.1.111/repository"
external_artifactory_contextUrl = "http://12.22.31.201/repository"
}
repositories {
mavenCentral()
maven {
url "${artifactory_contextUrl}/plugins-release"
allowInsecureProtocol = true
}
maven {
url "${external_artifactory_contextUrl}/plugins-release"
allowInsecureProtocol = true
}
}
dependencies {
......
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
tasks.named('test') {
useJUnitPlatform()
}
When I compile the project on Jenkins server I get error:
Could not get resource ‘http://192.168.1.111/repository/plugins-release/com/….’.
The first repository is behind NAT. It should be switched to the second repository and jar should be download but for some reason it’s not working. Do you know how I can fix this?