简体   繁体   English

mvn部署失败:未在POM中指定存储库元素

[英]mvn Deployment failed: repository element was not specified in the POM

When I run mvn clean deploy on my project I get an error 当我在项目上运行mvn clean deploy时出现错误

Also my project in eclipse displays the following errors which I don't know if they are related to my current problem. 另外,我在eclipse中的项目会显示以下错误,这些错误是否与我当前的问题有关。

Project configuration not up-to-date with pom.xml plugin configuration not covered by lifecycle configuration 项目配置不是最新的,pom.xml插件配置未包含在生命周期配置中

In addition my eclipse doesn't seems to compile the files correctly. 另外,我的日食似乎无法正确编译文件。 My SpringBoot java files aren't being compiled as java files. 我的SpringBoot Java文件没有被编译为Java文件。 I can tell because if I deliberately induce syntax errors, there isn't a compilation error. 我可以说,因为如果我故意引起语法错误,那么就没有编译错误。 This is all run on eclipse EE and is part of a maven project so I don't even know if a source folder is needed. 这些都在eclipse EE上运行,并且是maven项目的一部分,所以我什至不知道是否需要源文件夹。

Also I'm displaying my main pom.xml file below and it has compilation errors on "pom" and both "&ndash" 我也在下面显示我的主要pom.xml文件,它在“ pom”和“&ndash”上都有编译错误

I've tried the following solutions 我尝试了以下解决方案

Eclipse Blue, Maven: Project configuration is not up-to-date with pom.xml Eclipse Blue,Maven:pom.xml的项目配置不是最新的

Failed to resolve version for org.apache.maven.archetypes 无法解析org.apache.maven.archetypes的版本

repository element was not specified in the POM inside distributionManagement element or in -DaltDep loymentRepository=id::layout::url parameter 未在distributionManagement元素内的POM或-DaltDep loymentRepository = id :: layout :: url参数中指定存储库元素

<?xml version="1.0" encoding="UTF-8"?>
<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">
<modelVersion>4.0.0</modelVersion>

<groupId>com.fanniemae.dfc</groupId>
<artifactId>dfc_app</artifactId>
<packaging>pom</packaging>
<version>0.0.1-SNAPSHOT</version>
<modules>
    <module>dfc_angular</module>
    <module>dfc_springBoot</module>
</modules>

<!--<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.3RELEASE</version>
    <relativePath/> &lt;!&ndash; lookup parent from repository 
&ndash;&gt;
</parent>-->

</project>

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project dfc_app: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter [错误]无法在项目dfc_ap​​p上执行目标org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy(默认部署):部署失败:未在distributionManagement元素内或-中的POM中指定存储库元素DaltDeploymentRepository = id :: layout :: url参数

mvn deploy will deploy the produced artifact to a Maven Repository. mvn deploy会将产生的工件部署到Maven存储库。

To do so it needs the configuration to which repository it must be deployed and this is missing. 为此,它需要配置必须将其部署到哪个存储库,并且缺少此配置。

But I assume that you don't want to deploy it to a repository but just build it. 但是我假设您不想将其部署到存储库中,而只是构建它。

That's mvn install This will install it in your local repository. 这是mvn install它将安装在您的本地存储库中。

Maybe you should start with reading the docs: https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html 也许您应该先阅读文档: https : //maven.apache.org/guides/getting-started/maven-in-five-minutes.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 部署失败:未在POM中指定存储库元素 - Deployment failed: repository element was not specified in the POM 部署失败:在 distributionManagement 元素或 -DaltDeploymentRepository 中的 POM 中未指定存储库元素 - Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository Maven:未在distributionManagement中的POM中指定存储库元素? - Maven: repository element was not specified in the POM inside distributionManagement? mvn包忽略pom.xml中的存储库 - mvn package ignoring repository in pom.xml 未在POM内部distributionManagement元素或-DaltDep loymentRepository = id :: layout :: url参数中指定存储库元素 - repository element was not specified in the POM inside distributionManagement element or in -DaltDep loymentRepository=id::layout::url parameter mvn 无法从远程存储库解析父 pom - mvn can't resolve parent pom from remote repository mvn release:执行失败,因为pom文件不在存储库的根目录下 - mvn release:perform fails because pom file is not at root of repository 如何在pom.xml中设置部署存储库 - How to set deployment repository in pom.xml 覆盖在pom.xml中指定的nexus存储库的URL - Override URL to nexus repository specified in pom.xml Maven不使用依赖项pom.xml中指定的存储库 - Maven doesn't use repository specified in the pom.xml of dependency
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM