1

私はartifactoryとgradleを初めて使用し、それらをセットアップしようとしていますが、gradle成果物の公開中に次のエラーが発生します:

15:14:44.544 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.UnsupportedOperationException
15:14:44.544 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.artifacts.repositories.LegacyDependencyResolver.abortPublishTransaction(LegacyDependencyResolver.java:150)
15:14:44.544 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.artifacts.ivyservice.IvyResolverBackedModuleVersionPublisher.publish(IvyResolverBackedModuleVersionPublisher.java:59)
15:14:44.544 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyPublisher$Publication.publishTo(DefaultIvyDependencyPublisher.java:77)
15:14:44.545 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyPublisher.publish(DefaultIvyDependencyPublisher.java:48)
15:14:44.545 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.internal.artifacts.ivyservice.IvyBackedArtifactPublisher.publish(IvyBackedArtifactPublisher.java:63)
15:14:44.545 [ERROR] [org.gradle.BuildExceptionReporter]    at org.gradle.api.tasks.Upload.upload(Upload.java:82)
15:14:44.545 [ERROR] [org.gradle.BuildExceptionReporter]    ... 79 more
15:14:44.545 [ERROR] [org.gradle.BuildExceptionReporter] 

そして、build.gradle に次の構成があります

apply plugin:'java'
apply plugin:'artifactory'
apply plugin:'maven'

buildscript {
    repositories {
        maven {
            url 'http://localhost:9081/artifactory/plugins-release'
            credentials {
                username = "${artifactory_user}"
                password = "${artifactory_password}"
            }
        }
    }
    dependencies {
        classpath(group: 'org.jfrog.buildinfo', name: 'build-info-extractor-gradle', version: '2.0.9')
    }
}

artifactory {
    contextUrl = "${artifactory_contextUrl}"   //The base Artifactory URL if not overridden by the publisher/resolver
    publish {
        repository {
            repoKey = 'libs-release-local'
            username = "${artifactory_user}"
            password = "${artifactory_password}"
            maven = true

        }
    }
    resolve {
        repository {
            repoKey = 'libs-release'
            username = "${artifactory_user}"
            password = "${artifactory_password}"
            maven = true
        }
    }
}
........
........
........

def myJar = file('build/libs/myjar-1.0.jar')

artifacts {
    archives myJar
}

uploadArchives {
  repositories {
    mavenRepo url: "http://localhost:9082/artifactory/libs-release-local";

    repositories.mavenDeployer {
      repository(url: "http://localhost:9082/artifactory/libs-release-local") {
        authentication(userName: "${artifactory_user}", password: "${artifactory_password}")
      }
      pom.version = versionNumber
      pom.artifactId = artifactId
      pom.groupId = groupId
    }
  }
}

例外から、Ivy リゾルバーが使用されていることがわかりますが、どこでも使用できるように Ivy をセットアップしていません。誰かが私がここで間違っていることを指摘できますか?

4

1 に答える 1