我的常见问题记录

news2024/11/19 15:36:52

1,maven在idea工具可以正常使用,在命令窗口执行出现问题

代码:

E:\test-hello\simple-test>mvn clean compile
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.consola:simple-test:jar:1.0-SNAPSHOT
[WARNING] 'dependencies.dependency.version' for org.junit.jupiter:junit-jupiter:jar is either LATEST or RELEASE (both of them are being deprecated) @ line 14, column 22
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ----------------------< org.consola:simple-test >-----------------------
[INFO] Building simple-test 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for org.apache.maven.plugins:maven-clean-plugin:jar:2.5 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.146 s
[INFO] Finished at: 2021-01-06T16:03:38+08:00
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "dev" could not be activated because it does not exist.
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Cannot access nexus-aliyun (http://maven.aliyun.com/nexus/content/group
s/public) in offline mode and the artifact org.apache.maven.plugins:maven-clean-plugin:jar:2.5 has not been downloaded from it before. -> [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/PluginResolutionException

中文意思:

无法激活请求的配置文件“dev”,因为它不存在。
[错误]插件org.apache.maven网站.插件:maven资源插件:2.6或其某个依赖项无法解析:无法访问nexus aliyun(http://maven.aliyun.com/nexus/content/g
脱机模式下的组/公共)和工件org.apache.maven网站.插件:maven资源插件:jar:2.6版本以前没有下载过。->[帮助1]
[错误]
[错误]要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven。
[错误]使用-X开关重新运行Maven以启用完全调试日志记录。

  1. 提示其实也非常的明显,无法访问地址....
  2. 我将这块注释掉就好了,这块镜像的私有仓库不能访问,这样就可以正常执行了,
  3. 使用命令的话要么在环境变量里配置setting.xml,要不就修改maven路径下的配置文件,一般是放在:C:\Users\简悦\.m2目录下边
  4. 我环境变量里没有配置,使用的是maven文件下的setting.xml

2, mvn archetype:generate构建项目是出现问题

错误码:

E:\test-hello>mvn archetype:generate
[WARNING]
[WARNING] Some problems were encountered while building the effective settings
[WARNING] expected START_TAG or END_TAG not TEXT (position: TEXT seen ...epo.rdc.aliyun.com/repository/129186-release-u560yC/</url>\n\ua0 \t\t\t<r... @351:8)  @ C:\Users\简悦\.m2\settings.xml, line 351, column 8
[WARNING]
[INFO] Scanning for projects...
[WARNING] The POM for org.apache.maven.plugins:maven-antrun-plugin:jar:1.3 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-antrun-plugin:1.3: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.apache.maven.plugins:maven-antrun-plugin:jar:1.3 has not been downloaded from it before.
[WARNING] The POM for org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5: Plugin org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5 or one of its dependencies could not be resolved: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.apache.maven.plugins:maven-assembly-plugin:jar:2.2-beta-5 has not been downloaded from it before.
[WARNING] The POM for org.apache.maven.plugins:maven-dependency-plugin:jar:2.8 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-dependency-plugin:2.8: Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of its dependencies could not be resolved: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.apache.maven.plugins:maven-dependency-plugin:jar:2.8 has not been downloaded from it before.
[WARNING] The POM for org.apache.maven.plugins:maven-release-plugin:jar:2.5.3 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-release-plugin:2.5.3: Plugin org.apache.maven.plugins:maven-release-plugin:2.5.3 or one of its dependencies could not be resolved: Cannot access central (https://repo.maven.apache.org/maven2) in offline mode and the artifact org.apache.maven.plugins:maven-release-plugin:jar:2.5.3 has not been downloaded from it before.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.226 s
[INFO] Finished at: 2021-01-06T17:21:04+08:00
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "dev" could not be activated because it does not exist.
[ERROR] No plugin found for prefix 'archetype' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (F:\maven\Repository), central (https://repo.maven.apache.org/maven2)] -> [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/NoPluginFoundForPrefixException

具体错误信息的翻译:

无法激活请求的配置文件“dev”,因为它不存在。
[错误]在当前项目和插件组中找不到前缀“archetype”的插件[org.apache.maven网站.插件,网址:org.codehaus.mojo]可从存储库[本地(F:\maven\Repository),中心(https://repo.maven.apache.org/maven2)]->[帮助1]
[错误]
[错误]要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven。
[错误]使用-X开关重新运行Maven以启用完全调试日志记录。
[错误]
[错误]有关错误和可能的解决方案的详细信息,请阅读以下文章

连接不到服务器,一方面是这个的问题,但是换了镜像地址还是不能访问,

使用maven debug的方式看一下具体的问题,win下使用cls进行清屏

执行命令:  mvn archetype:generate -X

[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:maven-clean-plugin:2.5: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Cannot access repo2 (https://mvnrepository.com/) in offline mode and the artifact org.apache.maven.plugins:maven-clean-plugin:jar:2.5 has not been downloaded from it before.
org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Cannot access repo2 (https://mvnrepository.com/) in offline mode and the artifact org.apache.maven.plugins:maven-clean-plugin:jar:2.5 has not been downloaded from it before.
    at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve (DefaultPluginDependenciesResolver.java:131)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginDescriptor (DefaultMavenPluginManager.java:182)
    at org.apache.maven.plugin.DefaultBuildPluginManager.loadPlugin (DefaultBuildPluginManager.java:86)
    at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolveFromProject (DefaultPluginPrefixResolver.java:139)
    at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolveFromProject (DefaultPluginPrefixResolver.java:121)
    at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.resolve (DefaultPluginPrefixResolver.java:85)
    at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginForPrefix (MojoDescriptorCreator.java:266)
    at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor (MojoDescriptorCreator.java:220)
    at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments (DefaultLifecycleTaskSegmentCalculator.java:104)
    at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments (DefaultLifecycleTaskSegmentCalculator.java:83)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:89)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:497)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Cannot access repo2 (https://mvnrepository.com/) in offline mode and the artifact org.apache.maven.plugins:maven-clean-plugin:jar:2.5 has not been downloaded from it before.

翻译具体的信息

未能检索的插件描述符org.apache.maven网站.插件:maven clean plugin:2.5:插件org.apache.maven网站.插件:maven clean plugin:2.5或其依赖项之一无法解析:无法访问repo2(https://mvnrepository.com/)在离线模式和工件org.apache.maven网站.插件:maven clean plugin:震击器:2.5不曾以前下载过。
org.apache.maven网站.plugin.PluginResolutionException异常:插件org.apache.maven网站.插件:maven clean plugin:2.5或其依赖项之一无法解析:无法访问repo2(https://mvnrepository.com/)在离线模式和工件org.apache.maven网站.插件:maven clean plugin:震击器:2.5以前没有下载过。

这个应该是和我的配置有关,之前配置只能引用本地的包,不在网上下载

终于解决了,把下面这些镜像仓库都配置上,就不会有问题了

	<!-- 阿里云仓库 -->
    <mirror>
        <id>alimaven</id>
        <mirrorOf>central</mirrorOf>
        <name>aliyun maven</name>
        <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
    </mirror>
 
 
    <!-- 中央仓库1 -->
    <mirror>
        <id>repo1</id>
        <mirrorOf>central</mirrorOf>
        <name>Human Readable Name for this Mirror.</name>
        <url>http://repo1.maven.org/maven2/</url>
    </mirror>
 
 
    <!-- 中央仓库2 -->
    <mirror>
        <id>repo2</id>
        <mirrorOf>central</mirrorOf>
        <name>Human Readable Name for this Mirror.</name>
        <url>http://repo2.maven.org/maven2/</url>
    </mirror>
	
	<mirror>
        <id>repo3</id>
        <mirrorOf>central</mirrorOf>
        <name>Human Readable Name for this Mirror.</name>
        <url>https://mvnrepository.com/</url>
    </mirror>

 这边要选择一个快速创建的模板,上边有编号,我选择了自己创建直接回车.

添加坐标,建包,选版本号,最后确认

成功!!,主要还是镜像源的问题,多添加几个就好了,有的镜像源不稳定.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1855606.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

win11 + ubuntu linux双系统:开机直接进入windows修复

https://zhuanlan.zhihu.com/p/666702893 这种 双系统直接进入win 的问题&#xff0c;应该属于引导坏了&#xff0c;即grub坏了。 原因&#xff1a;笔记本送修了&#xff0c;没拆掉硬盘&#xff0c;可能引导被售后搞坏了。 在win-磁盘管理中查看分区&#xff0c;linux的分区…

文献阅读:通过双线性建模来破译神经元类型连接的遗传密码

文献介绍 文献题目 Deciphering the genetic code of neuronal type connectivity through bilinear modeling 研究团队 Mu Qiao&#xff08;美国加州理工学院&#xff09; 发表时间 2024-06-10 发表期刊 eLife 影响因子 7.7 DOI 10.7554/eLife.91532.3 摘要 了解不同神经元…

仓库管理系统01--数据库介绍

1、表结构 1&#xff09;UserInfo 用户表 2&#xff09;Supplier供应商表 3&#xff09;Store 仓库表 4&#xff09;其他表 Customer 客户表&#xff0c;Spec 规格表&#xff0c;GoodsType 货物类别表&#xff0c;Goods 货物表&#xff0c;InStore 入库表&#xff0c;OutSto…

STM32 - LED灯 蜂鸣器

&#x1f6a9; WRITE IN FRONT &#x1f6a9; &#x1f50e; 介绍&#xff1a;"謓泽"正在路上朝着"攻城狮"方向"前进四" &#x1f50e;&#x1f3c5; 荣誉&#xff1a;2021|2022年度博客之星物联网与嵌入式开发TOP5|TOP4、2021|2222年获评…

mysql学习——SQL中的DQL和DCL

SQL中的DQL和DCL DQL基本查询条件查询聚合函数分组查询排序查询分页查询 DCL管理用户权限控制 学习黑马MySQL课程&#xff0c;记录笔记&#xff0c;用于复习。 DQL DQL英文全称是Data Query Language(数据查询语言)&#xff0c;数据查询语言&#xff0c;用来查询数据库中表的记…

为什么能通过文本分析情感?

通过文本分析情感&#xff0c;通常称为情感分析&#xff08;Sentiment Analysis&#xff09;或意见挖掘&#xff08;Opinion Mining&#xff09;&#xff0c;是自然语言处理&#xff08;NLP&#xff09;的一个分支。这项技术能够识别和提取文本中的主观信息&#xff08;对呀&am…

# 消息中间件 RocketMQ 高级功能和源码分析(八)

消息中间件 RocketMQ 高级功能和源码分析&#xff08;八&#xff09; 一、消息中间件 RocketMQ 源码分析&#xff1a;实时更新消息消费队列与索引文件流程说明 1、实时更新消息消费队列与索引文件 消息消费队文件、消息属性索引文件都是基于 CommitLog 文件构建的&#xff0…

pdf转word在线转换怎么操作?学会这3个,轻松完成转换

pdf转word在线转换怎么操作&#xff1f;PDF转Word在线转换的重要性不言而喻&#xff0c;特别是在需要编辑或修改PDF文件内容时。它极大地简化了繁琐的复制粘贴流程&#xff0c;允许我们直接在Word文档中修改文字、调整格式&#xff0c;大大提高了工作效率。无论是学术研究、商务…

Modsecurity安装+Nginx+腾讯云CentOS+XSS-Labs靶场+WAF规则

君衍. 一、项目环境介绍二、ModSecurity介绍1、Modsecurity基本概述2、Modsecurity工作原理3、Modsecurity功能特点4、Modsecurity优点5、Modsecurity缺点 三、Nginx介绍及配置文件1、Nginx基本概述2、Nginx应用场景3、正向代理4、反向代理5、负载均衡6、动静分离7、主页面路径…

【LinuxC语言】深入理解IP地址与端口号

文章目录 前言端口号IP地址IP地址的分类主机地址与网络地址多播是什么子网掩码特殊的地址与私有的地址总结前言 在计算机网络中,IP 地址和端口号是两个非常重要的概念。IP 地址用于标识网络上的设备,而端口号则用于在同一设备上区分不同的服务或应用。在 Linux C 语言编程中…

一文学会用RKE部署高可用Kubernetes集群

k8s架构图 RKE简介 RKE全称Rancher Kubernetes Engine,是一个快速的,多功能的 Kubernetes 安装工具。通过RKE,我们可以快速的安装一个高可用K8S集群。RKE 支持多种操作系统,包括 MacOS、Linux 和 Windows。 K8S原生安装需要的先决条件较多,比如说需要预安装kubeadm,kub…

GPT-5大幅推迟?OpenAI CTO称将在2025年底到2026年初推出

GPT-5大幅推迟&#xff1f;OpenAI CTO称将在2025年底到2026年初推出 OpenAI CTO同时透露&#xff0c;GPT-5性能将有巨大飞跃&#xff0c;在某些特定任务中达到“博士水平”智能&#xff0c;此前市场曾预测GPT-5可能在2023年底或2024年夏季发布。 一再跳票的GPT-5可能大幅推迟…

基于matlab的SVR回归预测

1 原理 SVR&#xff08;Support Vector Regression&#xff09;回归预测原理&#xff0c;基于支持向量机&#xff08;SVM&#xff09;的回归分支&#xff0c;其核心思想是通过寻找一个最优的超平面来进行回归预测&#xff0c;并处理非线性回归问题。以下是SVR回归预测原理的系统…

腾讯 MOFA-Video: 可控制图转视频

腾讯 MOFA-Video: 可控制图转视频 MOFA-Video 它支持运动轨迹、人脸关键点并支持将其混合控制图像转换为视频。 混合控制: 结合图像、控制信号和关键点生成动画。 运动画笔: 结合图像、轨迹和画笔生成动画。 控制比例: 调整动画的控制比例&#xff0c;从纯 SVD 到完全控制。 通…

实验七:了解可编辑网格与多边形实战

如果文章有写的不准确或需要改进的地方&#xff0c;还请各位大佬不吝赐教&#x1f49e;&#x1f49e;&#x1f49e;。朱七在此先感谢大家了。&#x1f618;&#x1f618;&#x1f618; &#x1f3e0;个人主页&#xff1a;语雀个人知识库 &#x1f9d1;个人简介&#xff1a;大家…

情感搞笑聊天记录视频:AI自动化生成技术,操作简单,教程+软件

在数字化时代&#xff0c;内容创作已成为吸引观众、传递信息的重要手段。随着人工智能技术的飞速发展&#xff0c;AI自动生成视频为创作者提供了新的工具和可能性。本文将介绍如何利用AI技术&#xff0c;通过情感搞笑聊天记录视频&#xff0c;在视频号上实现内容的自动化生成&a…

什么样的落地台灯比较好?五款宝藏可靠护眼大路灯推荐

现代家庭中&#xff0c;落地台灯也逐渐的代替传统台灯&#xff0c;成为许多孩子在读写时的照明神器&#xff0c;它已经被许多家长认可&#xff0c;宽广的光线光线清晰&#xff0c;视觉上舒适了不少。然而&#xff0c;目前市场上有许多品牌未经过充分的技术、材质和工艺研究&…

中国车牌检测数据集VOC+YOLO格式2001张1类别

数据集格式&#xff1a;Pascal VOC格式YOLO格式(不包含分割路径的txt文件&#xff0c;仅仅包含jpg图片以及对应的VOC格式xml文件和yolo格式txt文件) 图片数量(jpg文件个数)&#xff1a;2001 标注数量(xml文件个数)&#xff1a;2001 标注数量(txt文件个数)&#xff1a;2001 标注…

“论云原生架构及其应用”写作框架,系统架构设计师

论文真题 近年来&#xff0c;随着数字化转型不断深入&#xff0c;科技创新与业务发展不断融合&#xff0c;各行各业正在从大工业时代的固化范式进化成面向创新型组织与灵活型业务的崭新模式。在这一背景下&#xff0c;以容器和微服务架构为代表的云原生技术作为云计算服务的新…

【耐水好】强耐水UV胶水是怎样的?

【耐水好】强耐水UV胶水是怎样的&#xff1f; 强耐水UV胶水是一种特殊的胶水&#xff0c;其设计重点在于其出色的耐水性能。以下是关于强耐水UV胶水的特点&#xff1a; 优异的耐水性能&#xff1a;这种胶水能在水环境下保持稳定的粘接强度&#xff0c;不易被水分解或削弱。因…