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. 【Qt入门实践】Qt之哲学家问题(linux 多线程)

    转载请注明出处:http://blog.csdn.net/feng1790291543 linux多线程实现哲学家问题,依据哲学家吃饭.拿筷子.放下筷子...... watermark/2/text/ ...

  2. 《ASP.NET4 从入门到精通》学习笔记4

    第4部分诊断与插件 刚開始看这章的时候,真实一头雾水.不知道在讲什么.只是看了关于http pipeline之后.才了解相关说明. 因此对于这一章的学习,建议各位首先看看http pipeline然后 ...

  3. 通过spark rdd 求取 特征的稀疏向量

    通过spark rdd 求取  特征的稀疏向量 spark 类标签的稀疏 特征向量 - bonelee - 博客园 http://www.cnblogs.com/bonelee/p/7814081.h ...

  4. 【NOIP 2016】初赛-完善程序 & 参考答案

    参考答案 感觉这两题目都挺好的~~ T1 交朋友 简单描述:有n个人依次进入教室,每个人进入会找一个身高绝对值相差最小的人交朋友(相同时更想和高的交朋友),求每个人交的朋友. Solution: So ...

  5. 【USACO 2017Feb】 Why Did the Cow Cross the Road

    [题目链接] 点击打开链接 [算法] dist[i][j][k]表示当前走到(i,j),走的步数除以3的余数为k的最小花费 spfa即可 [代码] #include<bits/stdc++.h& ...

  6. bzoj2763 [JLOI2011]飞行路线——分层图

    题目:https://www.lydsy.com/JudgeOnline/problem.php?id=2763 构建分层图. 代码如下: 写法1(空间略大)(时间很慢): #include<i ...

  7. 14. extjs中treepanel属性和方法

    转自:http://www.cnblogs.com/connortang/p/4414907.html 1.Ext.tree.TreePanel 主要配置项: root:树的根节点. rootVisi ...

  8. jquery easyui 显示和关闭数据加载的遮罩

    $('#yearReportTable').datagrid('loading');//打开等待div $('#yearReportTable').datagrid('loaded');//关闭等待d ...

  9. bzoj1051受欢迎的牛(Tarjan)

    1051: [HAOI2006]受欢迎的牛 Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 4776  Solved: 2542 Description ...

  10. linux学习之路6 Vi文本编辑器

    vim是vi的增强版本 vim拥有三种模式: 命令模式(常规模式) vim启动后,默认进入命令模式.任何模式都可以通过按esc键回到命令模式(可以多按几次.命令模式可以通过键入不同的命令完成选择.复制 ...