Я пытаюсь опубликовать sh артефактов в private-GitLab с двумя зависимостями (Web и Actuator), как показано ниже
dependencies {
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.boot:spring-boot-starter-web")
}
repositories {
maven {
url "https://<gitlab-url>/repo"
name "GitLab"
credentials(HttpHeaderCredentials) {
name = 'Private-Token'
value = gitLabPrivateToken
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
Но не уверен, что столкнулся с ошибкой 401. Я заменил git URL на локальный каталог, и это удалось. Я вижу сгенерированные файлы метаданных и pom. При использовании артефактов из локального каталога в другом проекте с использованием ниже build.gradle
buildscript {
repositories {
mavenCentral()
maven {
url "C://<location>//gradle-test"
}
}
dependencies {
classpath("com.gradle:gradleproject:0.0.1-SNAPSHOT")
}
}
я сталкиваюсь с ошибкой ниже.
C:\Users\root\gradle>gradle build
> Task :buildEnvironment
------------------------------------------------------------
Root project
------------------------------------------------------------
classpath
\--- com.gradle:gradleproject:0.0.1-SNAPSHOT
+--- org.springframework.boot:spring-boot-starter-actuator:2.3.0.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.3.0.RELEASE
| | +--- org.springframework.boot:spring-boot:2.3.0.RELEASE
| | | +--- org.springframework:spring-core:5.2.6.RELEASE
| | | | \--- org.springframework:spring-jcl:5.2.6.RELEASE
| | | \--- org.springframework:spring-context:5.2.6.RELEASE
| | | +--- org.springframework:spring-aop:5.2.6.RELEASE
| | | | +--- org.springframework:spring-beans:5.2.6.RELEASE
| | | | | \--- org.springframework:spring-core:5.2.6.RELEASE (*)
| | | | \--- org.springframework:spring-core:5.2.6.RELEASE (*)
| | | +--- org.springframework:spring-beans:5.2.6.RELEASE (*)
| | | +--- org.springframework:spring-core:5.2.6.RELEASE (*)
| | | \--- org.springframework:spring-expression:5.2.6.RELEASE
| | | \--- org.springframework:spring-core:5.2.6.RELEASE (*)
| | +--- org.springframework.boot:spring-boot-autoconfigure:2.3.0.RELEASE
| | | \--- org.springframework.boot:spring-boot:2.3.0.RELEASE (*)
| | +--- org.springframework.boot:spring-boot-starter-logging:2.3.0.RELEASE
| | | +--- ch.qos.logback:logback-classic:1.2.3
| | | | +--- ch.qos.logback:logback-core:1.2.3
| | | | \--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
| | | +--- org.apache.logging.log4j:log4j-to-slf4j:2.13.2
| | | | +--- org.slf4j:slf4j-api:1.7.25 -> 1.7.30
| | | | \--- org.apache.logging.log4j:log4j-api:2.13.2
| | | \--- org.slf4j:jul-to-slf4j:1.7.30
| | | \--- org.slf4j:slf4j-api:1.7.30
| | +--- jakarta.annotation:jakarta.annotation-api:1.3.5
| | +--- org.springframework:spring-core:5.2.6.RELEASE (*)
| | \--- org.yaml:snakeyaml:1.26
| +--- org.springframework.boot:spring-boot-actuator-autoconfigure:2.3.0.RELEASE
| | +--- org.springframework.boot:spring-boot-actuator:2.3.0.RELEASE
| | | \--- org.springframework.boot:spring-boot:2.3.0.RELEASE (*)
| | +--- org.springframework.boot:spring-boot:2.3.0.RELEASE (*)
| | +--- org.springframework.boot:spring-boot-autoconfigure:2.3.0.RELEASE (*)
| | +--- com.fasterxml.jackson.core:jackson-databind:2.11.0
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.11.0
| | | \--- com.fasterxml.jackson.core:jackson-core:2.11.0
| | +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.0
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.11.0
| | | +--- com.fasterxml.jackson.core:jackson-core:2.11.0
| | | \--- com.fasterxml.jackson.core:jackson-databind:2.11.0 (*)
| | +--- org.springframework:spring-core:5.2.6.RELEASE (*)
| | \--- org.springframework:spring-context:5.2.6.RELEASE (*)
| \--- io.micrometer:micrometer-core:1.5.1
| +--- org.hdrhistogram:HdrHistogram:2.1.12
| \--- org.latencyutils:LatencyUtils:2.0.3
\--- org.springframework.boot:spring-boot-starter-web:2.3.0.RELEASE
+--- org.springframework.boot:spring-boot-starter:2.3.0.RELEASE (*)
+--- org.springframework.boot:spring-boot-starter-json:2.3.0.RELEASE
| +--- org.springframework.boot:spring-boot-starter:2.3.0.RELEASE (*)
| +--- org.springframework:spring-web:5.2.6.RELEASE
| | +--- org.springframework:spring-beans:5.2.6.RELEASE (*)
| | \--- org.springframework:spring-core:5.2.6.RELEASE (*)
| +--- com.fasterxml.jackson.core:jackson-databind:2.11.0 (*)
| +--- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.11.0
| | +--- com.fasterxml.jackson.core:jackson-core:2.11.0
| | \--- com.fasterxml.jackson.core:jackson-databind:2.11.0 (*)
| +--- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.11.0 (*)
| \--- com.fasterxml.jackson.module:jackson-module-parameter-names:2.11.0
| +--- com.fasterxml.jackson.core:jackson-core:2.11.0
| \--- com.fasterxml.jackson.core:jackson-databind:2.11.0 (*)
+--- org.springframework.boot:spring-boot-starter-tomcat:2.3.0.RELEASE
| +--- jakarta.annotation:jakarta.annotation-api:1.3.5
| +--- org.apache.tomcat.embed:tomcat-embed-core:9.0.35
| +--- org.glassfish:jakarta.el:3.0.3
| \--- org.apache.tomcat.embed:tomcat-embed-websocket:9.0.35
| \--- org.apache.tomcat.embed:tomcat-embed-core:9.0.35
+--- org.springframework:spring-web:5.2.6.RELEASE (*)
\--- org.springframework:spring-webmvc:5.2.6.RELEASE
+--- org.springframework:spring-aop:5.2.6.RELEASE (*)
+--- org.springframework:spring-beans:5.2.6.RELEASE (*)
+--- org.springframework:spring-context:5.2.6.RELEASE (*)
+--- org.springframework:spring-core:5.2.6.RELEASE (*)
+--- org.springframework:spring-expression:5.2.6.RELEASE (*)
\--- org.springframework:spring-web:5.2.6.RELEASE (*)
(*) - dependencies omitted (listed previously)
Может кто-нибудь мне помочь где я допустил ошибку или как исправить эту ошибку? и это правильный способ потребления?