在错误的位置创建目录时,Gradle mavenDeployer失败

时间:2014-11-08 16:20:06

标签: gradle build.gradle

我有一个build.gradle脚本,其中包含以下部分,用于将工件上传到私有版Maven回购:

uploadArchives {
    repositories {
        mavenDeployer {
            repository(url: "/opt/maven_repo/private-release") {
                pom.artifactId = archive
            }
        }
    }
}

我在unix机器上运行构建,并且用户具有对目录/ opt / maven_repo / private-release的写访问权。但是,任务失败并显示以下输出:

:uploadArchives
Uploading: company-name/artifact-name/relX.N/artifact-name-relX.N.jar to repository remote at /opt/maven_repo/private-release
Specified destination directory cannot be created: /company-name/artifact-name/relX.N
:uploadArchives FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':uploadArchives'.
> Could not publish configuration 'archives'
   > Error deploying artifact 'artifact-name:jar': Error deploying artifact: Specified destination directory cannot be created: /company-name/artifact-name/relX.N

P.S。:工件实际上放在〜/ .m2 / repository中,我觉得它试图在根目录而不是指定的存储库目录中创建目录

0 个答案:

没有答案