mavenmaven 项目 deploy 报错:Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7(示(代

Posted Angel挤一挤

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mavenmaven 项目 deploy 报错:Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7(示(代相关的知识,希望对你有一定的参考价值。

=======================

 

参考地址:

https://blog.csdn.net/liuxiao723846/article/details/52604377

 

 

报错:

maven 项目 deploy  报错:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project 项目名XXX: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRep
ository=id::layout::url parameter

 

 

 

 

报错原因:

意思是在pom文件中缺少distributionManagement标签,或者缺少-DaltDeployementRepositoty,说的是缺少deploy的地址,maven不知道你想要deploy到哪里,在pom文件中增加如下信息,就发布成功了.

 

解决方法:

<distributionManagement>
       
        <snapshotRepository>
            <id>nexus</id>
            <name>snapshots</name>
            <url>http://XXXXXXXXXXXXX/nexus/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

<distributionManagement>
        <repository>
            <id>nexus</id>
            <name>releases</name>
            <url>http://mvn2.qdingnet.com/nexus/content/repositories/releases</url>
            <uniqueVersion>true</uniqueVersion>
        </repository>
        <snapshotRepository>
            <id>nexus</id>
            <name>snapshots</name>
            <url>http://XXXXXXXXXXXXX/nexus/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

 

以上是关于mavenmaven 项目 deploy 报错:Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7(示(代的主要内容,如果未能解决你的问题,请参考以下文章

Mavenmaven 插件开发实战

mavenmaven的web项目打包报错:No compiler is provided in this environment. Perhaps you are running on a JRE(代

mavenmaven项目移除Maven Dependencies后如何再添加进去

Maven maven-deploy-plugin 总是上传两次

idea导入eclipse项目,tomcat启动报错org.apache.catalina.deploy.WebXml addFilter

IntelliJ IDEA 14.1.4导入项目启动报错:Error during artifact deployment.[组件部署期间出错]