Я пытаюсь скопировать самый новый файл jar (com.bar.baz:mapping:0.0.1-SNAPSHOT
) с моего сервера Nexus, используя Gradle.
Загрузка определенной версии работает с использованием следующего build.gradle:
apply plugin: "java"
repositories {
maven {
credentials {
username = "${mavenUser}"
password = "${mavenPassword}"
}
url "https://nexus.cluster.foo.cloud/repository/maven-snapshots"
authentication {
basic(BasicAuthentication)
}
}
}
configurations {
copyConf
}
dependencies {
copyConf group: "com.bar.baz", name: "mapping", version: "0.0.1-20190508.085532-7"
}
task copyTask(type: Copy) {
from configurations.copyConf
into "."
}
Но я хочу загрузить самую новую версию 0.0.1-SNAPSHOT
, а не конкретную версию 0.0.1-20190508.085532-7
.Это возможно?Как?
Использование версии "latest.integration"
вместо "0.0.1-20190508.085532-7"
(и вызов gradle copyTask --refresh-dependencies --stacktrace
) дает:
FAILURE: Build failed with an exception.
* What went wrong: Could not resolve all files for configuration ':copyConf'.
> Could not find any matches for com.bar.baz:mapping:latest.integration as no versions
of com.bar.baz:mapping are available. Searched in
the following locations:
https://nexus.cluster.foo.cloud/repository/maven-snapshots/com/ba/baz/mapping/maven-metadata.xml
https://nexus.cluster.foo.cloud/repository/maven-snapshots/com/bar/baz/mapping/0.0.1-SNAPSHOT/maven-metadata.xml
https://nexus.cluster.foo.cloud/repository/maven-snapshots/com/bar/baz/mapping/0.0.1-SNAPSHOT/mapping-0.0.1-20190508.085534-8.pom
https://nexus.cluster.foo.cloud/repository/maven-snapshots/com/bar/baz/mapping/0.0.1-SNAPSHOT/mapping-0.0.1-20190508.085534-8.jar
Required by:
project :
* Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException:
Could not resolve all files for configuration ':copyConf'.
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.rethrowFailure(DefaultConfiguration.java:918)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access$1600(DefaultConfiguration.java:116)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:892)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getFiles(DefaultConfiguration.java:404)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getFiles(Unknown
Source)
at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:206)
at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:116)
…
Обновление:
Использование версии "0.0.1-SNAPSHOT"
вместо "0.0.1-20190508.085532-7"
(и вызов gradle copyTask --refresh-dependencies --stacktrace
) выдает почти одинаковую ошибку, единственное отличие:
Использование версии "0.0.1"
вместо "0.0.1-20190508.085532-7"
(и вызова gradle copyTask --refresh-dependencies --stacktrace
) выдает:
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':copyConf'.
> Could not resolve com.bar.baz:mapping:0.0.1.
Required by:
project :
> Could not resolve com.bar.baz:mapping:0.0.1.
> Could not get resource 'https://nexus.cluster.regulator.cloud/repository/maven-snapshots/com/bar/baz/mapping/0.0.1/mapping-0.0.1.pom'.
> Could not GET 'https://nexus.cluster.regulator.cloud/repository/maven-snapshots/com/bar/baz/mapping/0.0.1/mapping-0.0.1.pom'. Received status code 400 from server: Bad Request
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':copyConf'.
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.rethrowFailure(DefaultConfiguration.java:918)
...
Другое обновление:
Копирование самого нового файла JAR с сервера Nexus с Maven работает, сследующий pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.bar.baz</groupId>
<artifactId>TAndMapping</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>${project.artifactId}</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mapping>mapping</mapping>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
</execution>
</executions>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.bar.baz</groupId>
<artifactId>${mapping}</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>jar</type>
<overWrite>true</overWrite>
<destFileName>${mapping}.jar</destFileName>
</artifactItem>
</artifactItems>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>nexus-snapshots</id>
<name>Snapshot</name>
<url>https://nexus.cluster.regulator.cloud/repository/maven-snapshots/</url>
</repository>
</repositories>
</project>
Еще одно обновление: переключаясь на Gradle 5.4.1, я получаю немного другие трассировки стека:
Для версии latest.integration
:
- Исключение составляет: org.gradle.api.tasks.TaskExecutionException: Выполнение не выполнено для задачи ': copyTask'.в org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute (CatchExceptionTaskExecuter.java:38) в org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter $ 1.ExecuteTask: EventFiring.gav.gradle.api.internal.tasks.execution.EventFiringTaskExecuter $ 1.call (EventFiringTaskExecuter.java:52) в org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter $ 1.call (EventFiringTaskExecuter.gava.)internal.operations.DefaultBuildOperationExecutor $ CallableBuildOperationWorker.execute (DefaultBuildOperationExecutor.java:416) в org.gradle.internal.operations.DefaultBuildOperationExecutor $ CallableBuildOperationWorker.execute.ExeException(DefaultBuildOperationExecutor.java:165) в org.gradle.internal.operations.DefaultBuildOperationExecutor.execute (DefaultBuildOperationExecutor.java:250) в org.gradle.internal.operations.DefaultBuildOperationExecutor.execute (DefaultBuildOperationExecutor.java:158) в org.gradle.internal.operations.DefaultBuildOperationExecutor.call (DefaultBuildOperationExecutor.java:102) в org.gradle.internal.operations.DelegatingBuildOperationEx36j.jecutor.cutor.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute (EventFiringTaskExecuter.java:49) в org.gradle.execution.plan.LocalTaskNodeExecutor.execute (LocalTaskNodeExecutor.java:43) в org.gration.gra$ InvokeNodeExecutorsAction.execute (DefaultTaskExecutionGraph.java:355) по адресу org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ InvokeNodeExecutorsAction.execute (DefaultTaskExecutionGraph.jexextion.Gext_Game: 336) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ BuildOperationAwareExecutionAction.execute (DefaultTaskExecutionGraph.java:322) в org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker $ 1.execute (DefaultPlanExecutor.java:134) в org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker $ 1.execute (DefaultPlanExec9).по адресу org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker.execute (DefaultPlanExecutor.java:202) по адресу org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker.executeNextNode (DefaultPlanExecutor.javationgrag.lang atlange или.DefaultPlanExecutor $ ExecutorWorker.run (DefaultPlanExecutor.java:129)в org.gradle.internal.concurrent.ExecutorPolicy $ CatchAndRecordFailures.onExecute (ExecutorPolicy.java:63) в org.gradle.internal.concurrent.ManagedExecutorImpl $ 1.run (ManagedExecutorImpl.java:46cur.ThreadFactoryImpl $ ManagedThreadRunnable.run (ThreadFactoryImpl.java:55) Причина: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration $ ArtifactResolveException: Не удалось разрешить все файлы для конфигурации ': copyConf'.в org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.rethrowFailure (DefaultConfiguration.java:1195) в org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access $ 2100 (DefaultConfiguration.java:138) в org.gradle.api.internal.artifacts.configurations.DefaultConfiguration $ ConfigurationFileCollection.getFiles (DefaultConfiguration.java:1170) в org.gradle.api.internal.file.AbstractFileCollection.iterator (AbstractFileCollection.java:72) в org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.iterator (DefaultConfiguration.java:467) по адресу org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext $ FileTreeConverter.convertInto (DefaultFileCollectionResolveContext.japigra) .9file.collections.DefaultFileCollectionResolveContext.doResolve (DefaultFileCollectionResolveContext.java:114) в org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees (DefaultFileCollectionResolveContext.java:85) в org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext $ FileTreeConverter.convertInto (DefaultFileCollectionResolveContext.java:195) в org.gradle.apes.olol.Java: 109) в org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees (DefaultFileCollectionResolveContext.java:85) в org.gradle.api.internal.file.CompositeFileCollection $ 1.visFFileCollection1. atitFileCollectionorg.gradle.api.internal.file.CompositeFileTree $ FilteredFileTree.visitContents (CompositeFileTree.java:120) в org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveNested.grajolg.xt. org.olg.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve (DefaultFileCollectionResolveContext.java:112) в org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileCollections (DefaultFileCollectionResolveContext.java:92) по адресу org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext $ FileCollectionConverter.conv.FileFile.Col_File.Col_File.Col_File.Col_File.Col_File.Col_File.Col_File.Col_Col_Col_Col_Live.We_Col_Col_Col_Col_L_Col_M_C_T_L_C_L_C_L_C_L_C_T_L_C_L_C_L_Te_C_L_Te_Col_Te_Col_To.doResolve (DefaultFileCollectionResolveContext.java:109) в org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileCollections (DefaultFileCollectionResolveContext.java:92) на сайте192) в org.gradle.api.internal.file.CompositeFileCollection.isEmpty (CompositeFileCollection.java:98) в org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute (SkipEmpaskEx6767) 67).api.internal.tasks.execution.ResolveBeforeExecutionOutputsTaskExecuter.execute (ResolveBeforeExecutionOutставитTaskExecuter.java:67) в org.gradle.api.internal.tasks.execution.ResolveAfterPreviousExecutionStateTaskExecuter.execute (ResolveAfterPreviousExecutionStateTaskExecuter.java:46) в org.gradle.ecut.Exup.TupTo94)в org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute (FinalizePropertiesTaskExecuter.java:46)
в org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute (ResolveTaskExecutionModeExecuter.java:95)
в org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute (SkipTaskWithNoActionsExecuter.java:57)
в org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute (SkipOnlyIfTaskExecuter.java:56)
в org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute (CatchExceptionTaskExecuter.java:36)
... еще 24 Причина: org.gradle.internal.resolve.ModuleVersionNotFoundException: не удалось
найти совпадения для com.bar.baz: отображение: последний.интеграция как нет
Доступны версии com.bar.baz: отображение. Искал в
следующие места:
Для версии 0.0.1-SNAPSHOT
:
- Исключение: org.gradle.api.tasks.TaskExecutionException: сбой при выполнении задачи ': copyTask'. в
org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute (CatchExceptionTaskExecuter.java:38)
в
org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter $ 1.executeTask (EventFiringTaskExecuter.java:73)
в
org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter $ 1.call (EventFiringTaskExecuter.java:52)
в
org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter $ 1.call (EventFiringTaskExecuter.java:49)
в
org.gradle.internal.operations.DefaultBuildOperationExecutor $ CallableBuildOperationWorker.execute (DefaultBuildOperationExecutor.java:416)
в
org.gradle.internal.operations.DefaultBuildOperationExecutor $ CallableBuildOperationWorker.execute (DefaultBuildOperationExecutor.java:406)
в
org.gradle.internal.operations.DefaultBuildOperationExecutor $ 1.execute (DefaultBuildOperationExecutor.java:165)
в
org.gradle.internal.operations.DefaultBuildOperationExecutor.execute (DefaultBuildOperationExecutor.java:250)
в
org.gradle.internal.operations.DefaultBuildOperationExecutor.execute (DefaultBuildOperationExecutor.java:158)
в
org.gradle.internal.operations.DefaultBuildOperationExecutor.call (DefaultBuildOperationExecutor.java:102)
в
org.gradle.internal.operations.DelegatingBuildOperationExecutor.call (DelegatingBuildOperationExecutor.java:36)
в
org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute (EventFiringTaskExecuter.java:49)
в
org.gradle.execution.plan.LocalTaskNodeExecutor.execute (LocalTaskNodeExecutor.java:43)
в
org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ InvokeNodeExecutorsAction.execute (DefaultTaskExecutionGraph.java:355)
в
org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ InvokeNodeExecutorsAction.execute (DefaultTaskExecutionGraph.java:343)
в
org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ BuildOperationAwareExecutionAction.execute (DefaultTaskExecutionGraph.java:336)
в
org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ BuildOperationAwareExecutionAction.execute (DefaultTaskExecutionGraph.java:322)
в
org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker $ 1.execute (DefaultPlanExecutor.java:134)
в
org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker $ 1.execute (DefaultPlanExecutor.java:129)
в
org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker.execute (DefaultPlanExecutor.java:202)
в
org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker.executeNextNode (DefaultPlanExecutor.java:193)
в
org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker.run (DefaultPlanExecutor.java:129)
в
org.gradle.internal.concurrent.ExecutorPolicy $ CatchAndRecordFailures.onExecute (ExecutorPolicy.java:63)
вorg.gradle.internal.concurrent.ManagedExecutorImpl $ 1.run (ManagedExecutorImpl.java:46)
в
org.gradle.internal.concurrent.ThreadFactoryImpl $ ManagedThreadRunnable.run (ThreadFactoryImpl.java:55)
Вызванный:
org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration $ ArtifactResolveException:
Не удалось разрешить все файлы для конфигурации ': copyConf'. в
org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.rethrowFailure (DefaultConfiguration.java:1195)
в
org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.access $ 2100 (DefaultConfiguration.java:138)
в
org.gradle.api.internal.artifacts.configurations.DefaultConfiguration $ ConfigurationFileCollection.getFiles (DefaultConfiguration.java:1170)
в
org.gradle.api.internal.file.AbstractFileCollection.iterator (AbstractFileCollection.java:72)
в
org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.iterator (DefaultConfiguration.java:467)
в
org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext $ FileTreeConverter.convertInto (DefaultFileCollectionResolveContext.java:209)
в
org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve (DefaultFileCollectionResolveContext.java:114)
в
org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees (DefaultFileCollectionResolveContext.java:85)
в
org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext $ FileTreeConverter.convertInto (DefaultFileCollectionResolveContext.java:195)
в
org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve (DefaultFileCollectionResolveContext.java:109)
в
org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees (DefaultFileCollectionResolveContext.java:85)
в
org.gradle.api.internal.file.CompositeFileCollection $ 1.visitContents (CompositeFileCollection.java:130)
в
org.gradle.api.internal.file.CompositeFileTree $ FilteredFileTree.visitContents (CompositeFileTree.java:120)
в
org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveNested (DefaultFileCollectionResolveContext.java:144)
в
org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve (DefaultFileCollectionResolveContext.java:112)
в
org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileCollections (DefaultFileCollectionResolveContext.java:92)
в
org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext $ FileCollectionConverter.convertInto (DefaultFileCollectionResolveContext.java:164)
в
org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve (DefaultFileCollectionResolveContext.java:109)
в
org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileCollections (DefaultFileCollectionResolveContext.java:92)
в
org.gradle.api.internal.file.CompositeFileCollection.getSourceCollections (CompositeFileCollection.java:192)
в
org.gradle.api.internal.file.CompositeFileCollection.isEmpty (CompositeFileCollection.java:98)
в
org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute (SkipEmptySourceFilesTaskExecuter.java:67)
в
org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionOutputsTaskExecuter.execute (ResolveBeforeExecutionOutputsTaskExecuter.java:67)
в
org.gradle.api.internal.tasks.execution.ResolveAfterPreviousExecutionStateTaskExecuter.execute (ResolveAfterPreviousExecutionStateTaskExecuter.java:46)
в
org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute (CleanupStaleOutputsExecuter.java:94)
в
org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute (FinalizePropertiesTaskExecuter.java:46)
вorg.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute (ResolveTaskExecutionModeExecuter.java:95) в org.gradle.api.internal.tasks.execution.SkipTecukWithNoActionsExgra.nj.jj.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute (SkipOnlyIfTaskExecuter.java:56) в org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute (CatchException.jpg): more.gradle.internal.resolve.ModuleVersionNotFoundException: Не удалось найти com.bar.baz: отображение: 0.0.1-SNAPSHOT.Поиск в следующих местах:
Для версии 0.0.1
:
- Исключение составляет: org.gradle.api.tasks.TaskExecutionException: выполнение задачи не выполнено: 'copyTask'.в org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute (CatchExceptionTaskExecuter.java:38) ..... org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute (CatchExceptionTavak):... еще 24 Причина: org.gradle.internal.resolve.ModuleVersionResolveException: Не удалось разрешить com.bar.baz: отображение: 0.0.1.Требуется: проект: Причина: org.gradle.internal.resolve.ModuleVersionResolveException: Не удалось разрешить com.bar.baz: отображение: 0.0.1.Вызвано: org.gradle.api.resources.ResourceException: не удалось получить ресурс 'https://nexus.cluster.regulator.cloud/repository/maven-snapshots/com/bar/baz/mapping/0.0.1/mapping-0.0.1.pom'. в org.gradle.internal.resource.ResourceExceptions.failure (ResourceExceptions.java:74)
....org.gradle.internal.concurrent.ThreadFactoryImpl $ ManagedThreadRunnable.run (ThreadFactoryImpl.java:55) Причина: org.gradle.internal.resource.transport.http.HttpErrorStatusCodeException: не удалось получить код состояния * * 1106400 с сервера: Неверный запрос в org.gradle.internal.resource.transport.http.HttpClientHelper.processResponse (HttpClientHelper.java:160) в ... org.gradle.internal.concurrent.ThreadFactoryImpl $ ManagedThreadRunnactFactoryImpl.jpg (): 55) Причина: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration $ ArtifactResolveException: не удалось разрешить все файлы для конфигурации ': copyConf'.... org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute (CatchExceptionTaskExecuter.java:36) ... еще 24 Причина: org.gradle.internal.resolve.ModuleVersionResolveException: Не удалось разрешить com.bar.Баз: отображение: 0.0.1.Требуется: проект: Причина: org.gradle.internal.resolve.ModuleVersionResolveException: Не удалось разрешить com.bar.baz: отображение: 0.0.1.Вызывается: org.gradle.api.resources.ResourceException: Не удалось получить ресурс 'https://nexus.cluster.regulator.cloud/repository/maven-snapshots/com/bar/baz/mapping/0.0.1/mapping-0.0.1.pom'. в org.gradle.internal.resource.ResourceExceptions.failure (ResourceExceptions.java:74) ... в org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor.copyToCache (DefaultCacheAwareExternalResourceAccessor.java:199) ... еще 110
Еще одно обновление: из-за ответа @Louis Jacomet я посмотрелнаш сервер Nexus более подробно, и в настоящее время .../com/bar/baz/mapping/0.0.1-SNAPSHOT/maven-metadata.xml
перечисляет:
<metadata modelVersion="1.1.0">
<groupId>com.bar.baz</groupId>
<artifactId>mapping</artifactId>
<version>0.0.1-SNAPSHOT</version>
<versioning>
<snapshot>
<timestamp>20190516.163117</timestamp>
<buildNumber>2</buildNumber>
</snapshot>
<lastUpdated>20190516163117</lastUpdated>
<snapshotVersions>
<snapshotVersion>
<extension>jar</extension>
<value>0.0.1-20190516.163116-1</value>
<updated>20190516163117</updated>
</snapshotVersion>
<snapshotVersion>
<extension>pom</extension>
<value>0.0.1-20190516.163116-1</value>
<updated>20190516163117</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
</metadata>
Следовательно, поиск в gradle в https://nexus.cluster.regulator.cloud/repository/maven-snapshots/com/bar/baz/mapping/0.0.1-SNAPSHOT/mapping-0.0.1-20190516.163117-2.jar
.Он не может найти его, потому что единственная версия, доступная на сервере Nexus, это версия 0.0.1-20190516.163116-1
.Я не понимаю, почему это так, и думаю, что это ошибка Nexus, а не ошибка Gradle.Тем не менее, копирование через Maven (см. Второе обновление с pom.xml) все еще находит версию 0.0.1-SNAPSHOT, доступную на Nexus, и загружает ее.