Maven:发布:执行失败,但部署有效。

时间:2014-03-16 21:55:36

标签: maven deployment amazon-s3 release

我的pom文件如下所示:

    <distributionManagement>
            <repository>
              <id>maven-s3-release-repo</id>
              <name>S3 Release Repository</name>
              <!-- http://bigpetstore.s3.amazonaws.com/maven/ -->
              <url>s3://bigpetstore/maven</url>
            </repository>
    </distributionManagement>

当我运行“mvn deploy”时,我将我的项目发布到正确的存储库。

但是,如果我运行“release:prepare”后跟“release:perform”,我会收到以下错误:

[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-  
plugin:2.7:deploy (default-deploy) on project BigPetStorePro: Deployment failed: 
repository element was not specified in the POM inside distributionManagement element or 
in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]

所以,我的问题是:为什么“mvn deploy”能够轻松部署我的内容,但是,mvn release:prepare无法看到distributionManagement的内容?

显然,标签存在。

0 个答案:

没有答案