首页 > 其他分享 > Maven配置换仓库出现错误1

Maven配置换仓库出现错误1

时间:2024-01-14 21:31:57浏览次数:27  
标签:maven http 错误 plugin 仓库 Maven apache org content

一:概述

mvn install后出现错误,寻找解决办法。

二:具体过程

<1>命令行使用mvn install报错

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.062 s
[INFO] Finished at: 2024-01-14T19:44:07+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\laiyao1314). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException

C:\Users\laiyao1314>mvn archetype:create-from-project
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.064 s
[INFO] Finished at: 2024-01-14T19:48:29+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\laiyao1314). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException

                    Maven配置换仓库出现错误1_jar

<2>通过·mvn archetype:create-from-project,运行后一开始没有报错,后面报错了

[INFO] Scanning for projects...
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/3.2.0/maven-clean-plugin-3.2.0.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/3.2.0/maven-clean-plugin-3.2.0.pom (5.3 kB at 3.4 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/35/maven-plugins-35.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/35/maven-plugins-35.pom (9.9 kB at 15 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/maven-parent/35/maven-parent-35.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/maven-parent/35/maven-parent-35.pom (45 kB at 59 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/apache/25/apache-25.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/apache/25/apache-25.pom (21 kB at 26 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/3.2.0/maven-clean-plugin-3.2.0.jar
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/3.2.0/maven-clean-plugin-3.2.0.jar (36 kB at 60 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/3.1.1/maven-install-plugin-3.1.1.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/3.1.1/maven-install-plugin-3.1.1.pom (7.8 kB at 11 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/39/maven-plugins-39.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/39/maven-plugins-39.pom (8.1 kB at 14 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/maven-parent/39/maven-parent-39.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/maven-parent/39/maven-parent-39.pom (48 kB at 67 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/apache/29/apache-29.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/apache/29/apache-29.pom (21 kB at 12 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/3.1.1/maven-install-plugin-3.1.1.jar
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/3.1.1/maven-install-plugin-3.1.1.jar (31 kB at 26 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-deploy-plugin/3.1.1/maven-deploy-plugin-3.1.1.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-deploy-plugin/3.1.1/maven-deploy-plugin-3.1.1.pom (8.9 kB at 9.4 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-deploy-plugin/3.1.1/maven-deploy-plugin-3.1.1.jar
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-deploy-plugin/3.1.1/maven-deploy-plugin-3.1.1.jar (39 kB at 65 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-site-plugin/3.12.1/maven-site-plugin-3.12.1.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-site-plugin/3.12.1/maven-site-plugin-3.12.1.pom (20 kB at 28 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/36/maven-plugins-36.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/36/maven-plugins-36.pom (9.9 kB at 17 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/maven-parent/36/maven-parent-36.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/maven-parent/36/maven-parent-36.pom (45 kB at 62 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/apache/26/apache-26.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/apache/26/apache-26.pom (21 kB at 25 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-site-plugin/3.12.1/maven-site-plugin-3.12.1.jar
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-site-plugin/3.12.1/maven-site-plugin-3.12.1.jar (119 kB at 89 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-antrun-plugin/3.1.0/maven-antrun-plugin-3.1.0.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-antrun-plugin/3.1.0/maven-antrun-plugin-3.1.0.pom (9.1 kB at 14 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/34/maven-plugins-34.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/34/maven-plugins-34.pom (11 kB at 16 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/maven-parent/34/maven-parent-34.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/maven-parent/34/maven-parent-34.pom (43 kB at 69 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/apache/23/apache-23.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/apache/23/apache-23.pom (18 kB at 30 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-antrun-plugin/3.1.0/maven-antrun-plugin-3.1.0.jar
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-antrun-plugin/3.1.0/maven-antrun-plugin-3.1.0.jar (41 kB at 66 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-assembly-plugin/3.6.0/maven-assembly-plugin-3.6.0.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-assembly-plugin/3.6.0/maven-assembly-plugin-3.6.0.pom (15 kB at 22 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-assembly-plugin/3.6.0/maven-assembly-plugin-3.6.0.jar
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-assembly-plugin/3.6.0/maven-assembly-plugin-3.6.0.jar (236 kB at 248 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-dependency-plugin/3.6.1/maven-dependency-plugin-3.6.1.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-dependency-plugin/3.6.1/maven-dependency-plugin-3.6.1.pom (18 kB at 20 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/40/maven-plugins-40.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/40/maven-plugins-40.pom (8.1 kB at 12 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/maven-parent/40/maven-parent-40.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/maven-parent/40/maven-parent-40.pom (49 kB at 69 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/apache/30/apache-30.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/apache/30/apache-30.pom (23 kB at 38 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-dependency-plugin/3.6.1/maven-dependency-plugin-3.6.1.jar
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-dependency-plugin/3.6.1/maven-dependency-plugin-3.6.1.jar (191 kB at 201 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-release-plugin/3.0.1/maven-release-plugin-3.0.1.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-release-plugin/3.0.1/maven-release-plugin-3.0.1.pom (9.8 kB at 13 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/release/maven-release/3.0.1/maven-release-3.0.1.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/release/maven-release/3.0.1/maven-release-3.0.1.pom (11 kB at 18 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-release-plugin/3.0.1/maven-release-plugin-3.0.1.jar
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-release-plugin/3.0.1/maven-release-plugin-3.0.1.jar (61 kB at 102 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-metadata.xml
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/mojo/maven-metadata.xml
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/mojo/maven-metadata.xml (21 kB at 20 kB/s)
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-metadata.xml (10 kB at 9.6 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-archetype-plugin/maven-metadata.xml
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-archetype-plugin/maven-metadata.xml (981 B at 1.4 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-archetype-plugin/3.2.1/maven-archetype-plugin-3.2.1.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-archetype-plugin/3.2.1/maven-archetype-plugin-3.2.1.pom (12 kB at 17 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/archetype/maven-archetype/3.2.1/maven-archetype-3.2.1.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/archetype/maven-archetype/3.2.1/maven-archetype-3.2.1.pom (13 kB at 22 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-archetype-plugin/3.2.1/maven-archetype-plugin-3.2.1.jar
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-archetype-plugin/3.2.1/maven-archetype-plugin-3.2.1.jar (101 kB at 121 kB/s)
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  30.474 s
[INFO] Finished at: 2024-01-14T19:49:46+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.1:create-from-project (default-cli): Goal requires a project to execute but there is no POM in this directory (C:\Users\laiyao1314). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException

                    Maven配置换仓库出现错误1_maven_02

出现这种原因是没有创建pom

<3>创建pom

在创建 POM 之前,我们首先需要描述项目组 (groupId), 项目的唯一ID。

所有 POM 文件都需要 project 元素和三个必需字段:groupId,artifactId,version。

使用mvn help:effective-pom命令查看Super POM 默认配置

mvn help:effective-pom
[ERROR] Error executing Maven.
[ERROR] 1 problem was encountered while building the effective settings
[FATAL] Non-parseable settings D:\Maven\apache-maven-3.9.6\conf\settings.xml: end tag name </settings> must be the same as start tag <profiles> from line 196 (position: TEXT seen ...</activeProfiles>\n  -->\n</settings>... @269:12)  @ D:\Maven\apache-maven-3.9.6\conf\settings.xml, line 269, column 12
[INFO] Scanning for projects...
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-help-plugin/maven-metadata.xml
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-help-plugin/maven-metadata.xml (715 B at 352 B/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-help-plugin/3.4.0/maven-help-plugin-3.4.0.pom
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-help-plugin/3.4.0/maven-help-plugin-3.4.0.pom (9.7 kB at 15 kB/s)
Downloading from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-help-plugin/3.4.0/maven-help-plugin-3.4.0.jar
Downloaded from alimaven: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-help-plugin/3.4.0/maven-help-plugin-3.4.0.jar (64 kB at 85 kB/s)
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.016 s
[INFO] Finished at: 2024-01-14T20:30:50+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-help-plugin:3.4.0:effective-pom (default-cli): Goal requires a project to execute but there is no POM in this directory (C:\Users\laiyao1314). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException





标签:maven,http,错误,plugin,仓库,Maven,apache,org,content
From: https://blog.51cto.com/u_15912723/9242422

相关文章

  • npm仓库设置
    1.默认仓库,是国外的,安装会很慢D:\workspace\vue-test>npmconfiggetregistryhttps://registry.npmjs.org/2.设置npm仓库D:\workspace\vue-test>npmconfigsetregistryhttps://registry.apm.taobao.orgD:\workspace\vue-test>npmconfiggetregistryhttps:/......
  • 远程桌面连接出现了内部错误怎么解决?
    远程桌面连接是一种非常方便的工具,可以让用户从远程访问其他计算机的桌面界面。但是,有时候在连接远程桌面时会出现内部错误,导致无法连接或者连接后无法正常使用。小德将分析远程桌面连接出现内部错误的原因和解决方法。1.确认网络连接在使用远程桌面连接之前,首先需要确保计算机之......
  • 服务器出现500、502、503错误的原因以及解决方法
    服务器我们经常会遇到访问不了的情况有的时候是因为我们服务器被入侵了所以访问不了,有的时候是因为出现了服务器配置问题,或者软硬件出现问题导致的无法访问的问题,这时候会出现500、502、503等错误代码。基于以上问题我们第一步可以先重启服务器,一般重启服务器可以解决大多数问题,如......
  • 【JAVA基础】Java项目开发工具之Maven
    JAVA开发工具IDE有哪些?eclipce、idea、vscode等等IDEA比Eclipse更强大和高效。IDEA提供了更好的代码补全和重构功能,更好的代码导航和搜索功能,以及更好的支持多模块项目和多语言开发等。构建项目工具构建项目工具有哪些?Maven、Gradle、Ant等Maven管理和构建项目以及维护......
  • 2.4 两类错误率、Neyman-Person决策与ROC曲线
    两类错误率灵敏度=真阳性(决策正确的阳性)/状态阳性(真阳性+假阴性)Sn=TP/TP+FN特异度=真阴性(决策正确的阴性)/状态阴性(真阴性+假阳性)Sp=TN/TN+FP第一类错误率(假阳......
  • GitHub创建新仓库
    第一步、右上角点击【+】,选择【Newrepository】 第二步、设置一下仓库的基本信息在如下图的红框位置,输入仓库的名称、描述以及是否公开。第三步、滑到最下面,点击【Createrepository】,仓库就创建好了 ......
  • Maven常见问题与原理技巧
     背景目前项目中主流的都是使用maven等构建工具,当然在使用过程中也会遇到各种各样的疑惑或问题,比如:maven生命周期到底有啥用jar包下载不了怎么办不知道配置怎么配,下载jar包的顺序是什么jar包冲突又是怎么解决问的人多了,也就形成了大家的共性问题,这里基于这些问题,本文......
  • 无涯教程-Maven - 快照
    SNAPSHOT是一个特殊版本,指示当前的开发副本,与常规版本不同,Maven为每个构建都在远程存储库中检查新的SNAPSHOT版本。现在,数据服务团队将每次将SNAPSHOT更新的代码发布到存储库中,例如数据服务:1.0-SNAPSHOT,将替换旧的SNAPSHOTjar。快照与版本对于Version,如果Maven一旦下载了提......
  • 【SVN】代码仓库增加配置.svnignore 文件,忽略不上传同步的文件夹
    1.编辑.svnignore文件新建.svnignore文件,将需要忽略的文件夹名称放入,比如下面例子datasetsdatasets_classdatadatasshujuweightsweightdatasetx64buildx86outputoutputsinference_outputs*.build*.distdistActiondemologslog__pycache__*.pt*.onnx*.e......
  • 错误日志处理
    左耳听风~摘录统一分类的错误字典。无论你是使用错误码还是异常捕捉,都需要认真并统一地做好错误的分类。最好是在一个地方定义相关的错误。比如,HTTP的4XX表示客户端有问题,5XX则表示服务端有问题。也就是说,你要建立一个错误字典。同类错误的定义最好是可以扩展的。这一点非常重......