ICode9

精准搜索请尝试: 精确搜索
首页 > 编程语言> 文章详细

java – 未在分配管理元素中的POM或-DaltDep中指定存储库元素loymentRepository = id :: layout :: url参数

2019-09-23 17:11:24  阅读:339  来源: 互联网

标签:java maven deployment pom-xml


我在部署时遇到问题,这是我收到的错误消息:

[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ core ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.296 s
[INFO] Finished at: 2014-11-26T17:05:00+02:00
[INFO] Final Memory: 13M/244M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:
deploy (default-deploy) on project core: Deployment failed: repository element w
as not specified in the POM inside distributionManagement element or in -DaltDep
loymentRepository=id::layout::url parameter -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception

我检查了互联网上的一些资源,但没有一个适合我的情况.我认为它与我的pom.xml有关,所以这里是它的相关部分:

<build>
        <plugins>
              <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.3.2</version>
                    <configuration>
                         <source>1.7</source>
                         <target>1.7</target>
                    </configuration>
              </plugin>
        </plugins>
  </build>

  <repositories>
        <repository>
              <id>repository.springframework.maven.release</id>
              <name>Spring Framework Maven Release Repository</name>
              <url>http://maven.springframework.org/release</url>
        </repository>
        <repository>
              <id>Appid</id>
              <name>AppName</name>
              <url>http://IPaddress/nexus/content/repositories/Myapps/</url>
        </repository>
  </repositories>

您认为问题可能是什么?提前致谢.

解决方法:

您应该在pom.xml的分发管理部分中包含要部署的存储库.

例:

<project xmlns="http://maven.apache.org/POM/4.0.0"   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                      http://maven.apache.org/xsd/maven-4.0.0.xsd">
...   
<distributionManagement>
    <repository>
      <uniqueVersion>false</uniqueVersion>
      <id>corp1</id>
      <name>Corporate Repository</name>
      <url>scp://repo/maven2</url>
      <layout>default</layout>
    </repository>
    ...
</distributionManagement>
...
</project>

Distribution Management

标签:java,maven,deployment,pom-xml
来源: https://codeday.me/bug/20190923/1815371.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有