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

 
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,但是我却用另一个模块打包,当然会报错。==、

maven deploy时报错的更多相关文章

  1. eclipse 配置Maven问题解决办法:新建maven工程时报错:Could not resolve archetype org.apache.maven.archetypes .

    此文乃本作者配置maven,被其折磨n天,究极解决方案,好文要顶啊.欢迎致电: zhe-jiang.he@hp.com 首先各maven.archetypes下载地址: http://mirrors. ...

  2. 创建Maven Module时报错:The parent project must have a packaging type of POM

    创建Maven Module时报错:The parent project must have a packaging type of POM 解决的办法,是把父项目的Packaging改成pom:

  3. tomcat启动窗口报错&&eclipse使用maven编译时报错

    tomcat启动窗口报错log4j:ERROR Could not find value for key log4j.appender.stdoutlog4j:ERROR Could not inst ...

  4. maven install时报错Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile

    首先检查父项目,子项目的jdk版本是否一致,编码格式是否一致我的问题就错在了编码格式上,父项目用的是UTF-8,子项目新建的,默认GBK这时,使用maven install命令出错 提示:[INFO] ...

  5. 【maven 报错】maven项目执行maven install时报错Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)

    在使用maven新建的web项目中,执行 执行如上的这两个操作,报错: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-co ...

  6. Maven deploy时报Fatal error compiling: tools.jar not found错误的问题处理

    摘自:http://blog.csdn.net/achilles12345/article/details/19046061 在Eclipse环境下,使用Maven进行deploy时发现报了该错误:F ...

  7. maven build时报错Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test

    [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ ...

  8. maven打包时报错:-source 1.5 中不支持 diamond 运算符

    报错现象: 解决方法: 在pom文件中加入下面依赖 <build> <plugins> <plugin> <groupId>org.apache.mav ...

  9. maven install时报错 Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test)

    今天在一个maven项目上执行maven install命令的时候一直报错,错误信息如下: [INFO] ----------------------------------------------- ...

随机推荐

  1. Codevs 1744 格子染色==BZOJ 1296 粉刷匠

    1744 格子染色  时间限制: 1 s  空间限制: 128000 KB  题目等级 : 钻石 Diamond 题解  查看运行结果     题目描述 Description 有 n 条木板需要被粉 ...

  2. 视频生成 量产 win 转 linux ffmpeg linux 安装 对批量视频的尽可能短时间生成

    环境准备 Welcome to aliyun Elastic Compute Service! [root@mytest ~]# pip install baidu-aip Looking in in ...

  3. 蜘蛛页面 获取一个网站的全部url 乐观代码

    蜘蛛页面 from selenium import webdriver import time import random from bs4 import * import pymysql h, pt ...

  4. Swing手动进行最大化最小化

    首先jdk的setExtendedState是有bug的,需要先重载JFrame的setExtendedState方法 /** * Fix the bug "jframe undecorat ...

  5. HDU 4850 Wow! Such String!

    链接:http://acm.hdu.edu.cn/showproblem.php?pid=4850 题意:给定一个N(1 ≤ N ≤ 500000),构造一个长度为N的小写字母字符串,要求所有长度大于 ...

  6. 如何在Mac OS X 中运行Lua (Running Lua on Mac OS X)

    参考文章:1) http://www.oschina.net/question/12_769552) http://rudamoura.com/luaonmacosx.html 最近在为iOS开发游戏 ...

  7. [IOI2005]Riv 河流

    https://www.zybuluo.com/ysner/note/1300088 题面 有一棵\(n\)个点的树,现在在上面放\(k\)个标记,使得每个点的权值乘上自己到最近的标记祖先的距离的和最 ...

  8. U74201 旅行计划 树上找链长度

    题目背景 珂朵莉放假了,她打算去唐山旅行. 题目描述 我们简单地把唐山的共 nn 个景点看成是一棵树,有 n-1n−1 条边将它们连接起来,每个景点有一个游览指数 v_ivi​.珂朵莉的假期时间不长, ...

  9. Python print 输出不换行,只有空格

    for x in open("/home/soyo/桌面/中期内容/6.txt"): print x, ,,,]: print x, #print 输出没有换行,只有空格 结果: ...

  10. 谷歌浏览器(Chrome)查看http报文headers信息

    转自:https://blog.csdn.net/floatdreamed/article/details/79208719 ①打开谷歌浏览器,随意输入要搜索的内容 ②按下F12键,此时会弹出浏览器的 ...