zoukankan      html  css  js  c++  java
  • maven deploy时报错 distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter

    pom文件没有配置distributionManagement:
    发布仓库一般分为Releases版和snapshot版,所以要配置2个仓库地址 
    <distributionManagement>
            <repository>
                <id>nexus-releases</id>
                <name>corp nexus-releases</name>
                <url>http://你的nexusIP:8081/nexus/content/repositories/releases/</url>
            </repository>
            <snapshotRepository>
                <id>nexus-snapshot</id>
                <name>corp nexus-snapshot</name>
                <url>http://你的nexusIP:8081/nexus/content/repositories/snapshots/</url>
            </snapshotRepository>
        </distributionManagement>
     
    在setting.xml中添加配置:
     
    <servers>
        <!-- 发布Releases版的账号,ID要与distributionManagement中的Releases ID一致 -->
        <server>
          <id>nexus-releases</id>
          <username>admin</username>
          <password>******</password>
        </server>
        <!-- 发布snapshot版的账号,ID要与distributionManagement中的snapshot ID一致 -->
        <server>
          <id>nexus-snapshot</id>
          <username>admin</username>
          <password>******</password>
        </server>
    </servers>
    默认密码是 deployment123,也可以自定义密码,然后去Nexus后台修改对应的密码,在登陆后界面左侧Security下的Users下修改密码。
     
    其实本人已经配置了上面这些内容,但依然报错的原因其实是我的项目是多模块的,我只在一个模块的pom里配置了distributionManagement,但是我却用另一个模块打包,当然会报错。
     
     
  • 相关阅读:
    关于区间 $mex$ 的几种做法
    Selenium+TestNG+Maven+Jenkins+SVN(转载)
    Selenium+Java的TestNG测试报告优化
    使用Log4J收集日志
    Selenium+TestNG+Maven(2)
    自动化测试用例设计实例
    自动化测试用例的编写规则
    selenium 总结篇,常见方法和页面元素的操作
    Selenium Webdriver元素定位的八种常用方式(转载)
    selenium+java利用AutoIT实现文件上传
  • 原文地址:https://www.cnblogs.com/xiohao/p/13539050.html
Copyright © 2011-2022 走看看