【异常】Maven提示 repository element was not specified in the POM inside distributionManagement element
2023-09-14 09:04:55 时间
一、报错内容
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project logan-web: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
二、报错说明
想要执行npm 的deploy操作,但是失败了。
想在本地的pom文件配置好之后,执行deploy命令,可以将maven所打的jar包上传到远程的repository,便于其他开发者和工程共享。但是本地都没有distributionManagement,如何怎么上传到Nexus私服呢?
三、解决方案
在项目下的pom文件里面新建,上传jar包到Nexus私服中,才能执行deploy动作。
<distributionManagement>
<repository>
<id>随便起</id>
<url>maven环境下setting文件里面的私有库</url>
</repository>
<snapshotRepository>
<id>随便起</id>
<url>maven环境下setting文件里面的快照库</url>
</snapshotRepository>
</distributionManagement>
把这个配置放到 POM文件下,然后重新depoly,就会出现BUILD成功了
相关文章
- Maven项目导入时,org .apache.maven.plugins依赖爆红报错
- 【Maven】maven打包生成可执行jar文件
- mvnd - the Maven Daemon
- 改变maven打包路径_Maven打包技巧「建议收藏」
- window安装maven配置环境变量[通俗易懂]
- java中的maven_maven创建web项目
- Maven配置Tomcat_maven和tomcat的区别
- JavaWeb day5 Tomcat配置及idea创建Maven-Tomcat项目
- 【Maven】私服
- Linux下配置maven
- Maven 操作文档与代码示例
- 企业开发中Maven的基本使用
- maven中使用dom4j解析、生成XML的简易方法详解程序员
- Maven学习 (二) Eclipse 上安装 Maven3插件详解程序员
- 基于 Maven 的多模块 Java ( Spring ) 项目构建详解编程语言
- Spring+Mybatis+Maven+MySql搭建实例详解编程语言
- Maven与Redis完美结合实现高效管理Creating efficient Redis Integration using Maven(maven整合redis)
- Redis与Maven:实现更高效的技术结合(redis与maven)
- Maven下载安装Oracle数据库驱动包(mvn安装oracle包)
- 使用Maven搭建Oracle数据库环境(maven oracle)