zoukankan      html  css  js  c++  java
  • 【maven】maven 项目 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>

     

  • 相关阅读:
    JsonParse类
    vs2013提交项目到github
    js选中select
    按每20条分组查询
    批量修改图片格式
    当前日期后10天日期
    C#生成不重复随机数的方法
    接收端通过Request.InputStream读取流
    C#文件流的读写
    C#中HttpWebRequest的用法详解
  • 原文地址:https://www.cnblogs.com/sxdcgaq8080/p/12641149.html
Copyright © 2011-2022 走看看