2017-06-14 3 views
0

私は新しいartifactory gradle repoを使って新しいプロジェクトを立ち上げようとしています。私はartifactoryでアーティファクトを解決することができましたが、spring io &を混ぜて起動しようとすると、依存関係を要求するときにスプリング依存関係管理プラグインがバージョンを追加しないように見えて、ビルドに失敗します。artifactoryを持つspring dependency-management gradleプラグイン

FAILURE: Build failed with an exception. 

* What went wrong: 
Could not resolve all dependencies for configuration ':compileClasspath'. 
> Could not find org.springframework.boot:spring-boot-starter-data-rest:. 
    Searched in the following locations: 
     https://my-website.com/artifactory/gradle-release/org/springframework/boot/spring-boot-starter-data-rest//spring-boot-starter-data-rest-.pom 
     https://my-website.com/artifactory/gradle-release/org/springframework/boot/spring-boot-starter-data-rest//spring-boot-starter-data-rest-.jar 
     https://my-website.com/artifactory/gradle-release/org.springframework.boot/spring-boot-starter-data-rest/ivy-.xml 
     https://my-website.com/artifactory/gradle-release/org.springframework.boot/spring-boot-starter-data-rest//spring-boot-starter-data-rest-.jar 

https://my-website.com/artifactory/gradle-release/org/springframework/boot/spring-boot-starter-data-rest/1.5.3.RELEASE/にファイルが表示されますが、「1.5.3.RELEASE」はURLパスまたはファイル名には対応していないようです。

私の問題は私のビルドスクリプトにあると推測しています - 誰かが問題を特定するのを助けてくれますか?

build.gradle:

plugins { 
    id 'java' 
    id 'io.spring.dependency-management' version '1.0.3.RELEASE' 
    id 'org.springframework.boot' version '1.5.3.RELEASE' 
    id 'com.jfrog.artifactory' version '4.4.18' 
} 

dependencyManagement { 
    imports { 
     mavenBom 'io.spring.platform:platform-bom:Brussels-SR2' 
    } 
} 

artifactory { 
    contextUrl = "${artifactory_contextUrl}" 
    publish { 
     repository { 
      repoKey = 'gradle-release-local' 
      username = "${artifactory_user}" 
      password = "${artifactory_password}" 
     } 
    } 
    resolve { 
     repository { 
      repoKey = 'gradle-release' 
      username = "${artifactory_user}" 
      password = "${artifactory_password}" 
     } 
    } 
} 

dependencies { 
    compile 'org.springframework.boot:spring-boot-starter-data-rest' 
    compile 'org.springframework.boot:spring-boot-starter-hateoas' 
    compile 'org.springframework.boot:spring-boot-starter-web' 
    compile 'org.apache.commons:commons-lang3' 

    testCompile'org.springframework.boot:spring-boot-starter-test' 
    testCompile'org.springframework.restdocs:spring-restdocs-mockmvc' 
} 

答えて

0

はそれを考え出した - 私のビルドスクリプトに問題がなかったように見える - それは私のartifactoryのセキュリティ設定でした。

artifactoryを使用して依存関係を解決するには、リモートリポジトリのdeploy/cacheを有効にする必要があります(これはmavencentralに何かを配備する予定がないので必要ではないと思います)。私が春に追加した新しい依存関係をキャッシュしようとするアーティファクトは、ビルドが失敗する原因となっていました)。出典:https://www.jfrog.com/knowledge-base/what-are-best-practices-for-using-permissions/

これは他の人に役立つことを願っています。私は1日十分な時間を費やしました。

関連する問題