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. BestCoder Round #56/hdu5463 Clarke and minecraft 水题

    Clarke and minecraft 问题描述 克拉克是一名人格分裂患者.某一天,克拉克分裂成了一个游戏玩家,玩起了minecraft.渐渐地,克拉克建起了一座城堡. 有一天,克拉克为了让更多的人 ...

  2. 万一的Delphi消息教程

    http://www.cnblogs.com/del/category/134064.html

  3. Size Classes with Xcode 6:为所有的尺寸准备一个Storyboard

    我最喜欢的Xcode6的特性是新的size classes 概念,有了它,我们解决了“我如何能够快速的为那么多不同尺寸屏幕以及方向的设备写app”.他们也让在一个storyboard中创建一个通用的a ...

  4. hdu 5782(kmp+hash)

    Cycle Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submi ...

  5. 关于Dubbo中一些小众但很实用的功能

    dubbo功能非常完善,很多时候我们不需要重复造轮子,下面列举一些你不一定知道,但是很好用的功能: 直连Provider 在开发及测试环境下,可能需要绕过注册中心,只测试指定服务提供者,这时候可能需要 ...

  6. 框架-Java:Spring Boot

    ylbtech-框架-Java:Spring Boot 1.返回顶部 1. Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程.该 ...

  7. Java中的经典算法之冒泡排序

    原理:比较两个相邻的元素,将值大的元素交换至右端. 思路:依次比较相邻的两个数,将小数放在前面,大数放在后面.即在第一趟:首先比较第1个和第2个数,将小数放前,大数放后.然后比较第2个数和第3个数,将 ...

  8. 22.Extjs Panel中显示多行工具栏(tbar)

    转自:http://blog.sina.com.cn/s/blog_454fbf740100t0xj.html 在应用程序的制作中,我们经常性的会用到工具栏,在Extjs中Panel中提供了tbar和 ...

  9. maven pom 详细配置

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...

  10. iptables的介绍

    iptables介绍 iptables 1)iptables程序工作在内核的TCP/IP网络协议栈框架netfilter上,通过网络过滤可以实现入侵检测以及入侵防御功能,而不是单个协议当中. 2)ip ...