Grails maven部署没有获取distributionManagement设置

时间:2014-04-22 05:14:58

标签: maven grails artifactory

我有一个Grails 2.2.3项目,我正在尝试将maven部署到artifactory。

我在项目的根目录中有一个包含以下内容的pom.xml文件:

<distributionManagement>
    <repository>
        <id>central</id>
        <name>libs-release-local</name>
        <url>http://SERVER_NAME:8081/artifactory/libs-release-local</url>
        <uniqueVersion>false</uniqueVersion>
    </repository>
    <snapshotRepository>
        <id>central</id>
        <name>libs-snapshot-local</name>
        <url>http://SERVER_NAME:8081/artifactory/libs-snapshot-local</url>
        <uniqueVersion>false</uniqueVersion>
    </snapshotRepository>
</distributionManagement>

但是,当我执行:grails maven-deploy时,我收到以下错误:

| Skipping POM generation because 'pom.xml' exists in the root of the project...
| Error Error deploying artifact: Error deploying artifact 'GROUP:ARTIFACT:grails-app': Error deploying artifact: Failed to transfer file: http://SERVER_NAME:8081/artifactory/remote-repos/GROUPID/ARTIFACT/1.0.1/ARTIFACT-1.0.1.grails-app. Return code is: 405
| Error Have you specified a configured repository to deploy to (--repository argument) or specified distributionManagement in your POM?
| Error org.codehaus.groovy.grails.cli.ScriptExitException
| Error     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

对于初学者来说,remote-repos与pom的distributionManagement部分中的repo不同。为什么忽略该部分?

0 个答案:

没有答案