我的常见问题记录

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>

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

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

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

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

SpringBoot系列之搭建WebSocket应用

SpringBoot系列之@ServerEndpoint方式开发WebSocket应用。在实时的数据推送方面,经常会使用WebSocket或者MQTT来实现,WebSocket是一种不错的方案,只需要建立连接,服务端和客户端就可以进行双向的数据通信。很多网站的客户聊天,也经常使用WebSocket技术来实现。 WebSocket…

[巨详细]使用HBuilder-X新建uniapp项目教程

文章目录 安装HBuilder-X启动uniapp项目其他&#xff1a;下载预览浏览器下载终端插件想用uni-ui 安装HBuilder-X 详细步骤可看上文》》 启动uniapp项目 先打开HBuilder-X 点击新建项目 选择uniapp侧边栏&#xff0c;mian中的点击浏览 选择已经安装到本地的uniapp项目&#…

多商户零售外卖超市外卖商品系统源码

构建你的数字化零售王国 一、引言&#xff1a;数字化零售的崛起 在数字化浪潮的推动下&#xff0c;零售业务正经历着前所未有的变革。多商户零售外卖超市商品系统源码应运而生&#xff0c;为商户们提供了一个全新的数字化零售解决方案。通过该系统源码&#xff0c;商户们可以…

SpringIOC核心源码

一、Spring IOC容器源码解析 1、Spring IOC容器的核心类 &#xff08;1&#xff09;BeanFactory与ApplicationContext &#xff08;2&#xff09;默认容器DefaultListableBeanFactory a. DefaultListableBeanFactory实现的接口 b.DefaultListableBeanFactory继承的类&#…

【TB作品】MSP430G2553单片机,红外双机通信,红外通信程序

文章目录 NEC 红外通信协议实验步骤1. 硬件连接2. 程序说明红外发射部分红外接收部分 说明帮助 NEC 红外通信协议 NEC 红外通信协议是一种广泛应用于遥控器设备的红外通信协议。它采用脉冲宽度调制(PWM)来编码数据&#xff0c;并使用38kHz的载波频率进行传输。协议的特点如下&…

让在制品管理更有效

徐总的工厂生产线非常繁忙&#xff0c;每天都在不停地运转。但在制品的流转和存储也非常混乱&#xff0c;导致了很多问题的出现。 一方面&#xff0c;由于缺乏有效的管理&#xff0c;在制品的库存不断增加&#xff0c;占用了大量的资金和空间资源。这些库存不仅增加了库存成本&…

麦肯锡:量子传感究竟在何处可以发光发热

量子传感技术已经提供价值&#xff0c;潜在的应用案例可以塑造多个行业。有四种核心技术具有应用前景&#xff1a;固态自旋、中性原子、超导电路和离子阱&#xff0c;它们具有在广泛的物理属性上的传感能力&#xff0c;包括磁场、电场、旋转、温度、重力、时间和压力。选择哪种…

HTML(23)——垂直对齐方式

垂直对齐方式 属性名&#xff1a;vertical-align 属性值效果baseline基线对齐(默认)top顶部对齐middle居中对齐bottom底部对齐 默认情况下浏览器对行内块&#xff0c;行内标签都按文字处理&#xff0c;默认基线对齐 导致图片看起来会偏上&#xff0c;文字偏下。 示例&#…

USB2.0学习1--基本概念

目录 1.USB概念 2.USB协议发展 3.USB接口类型 3.1 TYPE类型 3.2 Mini类型 3.3 Micro类型 4. USB体系结构和关键概念 4.1 USB工作原理 4.2 USB物理拓扑结构 4.3 USB逻辑拓扑结构 4.4 USB软件架构 4.5 USB数据流模型 4.5.1 USB设备端点 4.5.2 USB管道 4.6 USB即插…

高晓松音频 百度网盘,高晓松音频 百度网盘资源,百度云大全

讲座主要围绕分享了自己的心得和体会&#xff0c;以及对产业现状的深刻洞察。认为&#xff0c;不仅是一种艺术形式&#xff0c;更是一种生活方式。他鼓励年轻人要勇于追求自己的音乐梦想&#xff0c;同时也要关注音乐产业的发展趋势&#xff0c;为音乐产业的繁荣贡献自己的力量…

自动预约申购 i茅台工具完善

自动预约申购茅台工具 概述新的改变界面预览 概述 今天刷到一个windows自动刷茅台的工具&#xff0c;是用wpf实现的&#xff0c;看到作者最后是2023年更新的&#xff0c;评论中有好多人提出一些需求&#xff0c;刚才在学习wpf&#xff0c;就试着完善了一下。 工具下载&#x…

分布式系列之限流组件

概述 在高并发场景下&#xff0c;请求量瞬间到达&#xff0c;后端服务器即使有缓存、集群主备、分库分表、容错降级等措施&#xff0c;也有可能扛不住这请求量&#xff0c;因此可考虑引入限流组件。限流的目的&#xff1a;防止恶意请求流量或流量超出系统承载。 应用场景&…

DEtection TRansformer (DETR)与YOLO在目标检测方面的比较

1. 概述 计算机视觉中的目标检测是一个复杂而有趣的领域&#xff0c;它涉及到让计算机能够识别图像中的物体&#xff0c;并确定它们的位置。下面是DETR和YOLO这两种目标检测方法简单比较&#xff1a; 1.1 YOLO YOLO是一种非常流行的目标检测算法&#xff0c;它的核心思想是将…

IDEA 2024.01版本 git分支merge合并

使用idea工具来进行merge合并 1、拉取远端分支信息 2、我的分支是sprint-240627,我要将test分支合并到我这个分支上 找到test分支 3、选择【Merge origin/test into sprint-240627】 从test合并到我们要合并得分支上&#xff0c;结束 4、如果有冲突&#xff0c;就解决冲突即可…

5. zabbix分布式监控

zabbix分布式监控 一、zabbix分布式监控二、zabbix分布式监控部署1、环境描述2、zabbix proxy的部署2.1 安装zabbix proxy相关的软件2.2 创建proxy需要的库、导入表2.3 编辑zabbix proxy配置文件&#xff0c;指定数据库连接2.4 启动zabbix proxy 3、在zabbix server添加代理4、…

基于 ROS 的 Terraform 托管服务轻松部署文本转语音系统 ChatTTS

介绍 ChatTTS是专门为对话场景设计的文本转语音模型&#xff0c;例如LLM助手对话任务。它支持英文和中文两种语言。最大的模型使用了10万小时以上的中英文数据进行训练。ChatTTS webUI & API 为 ChatTTS 提供了网页界面和API服务。 资源编排服务&#xff08;Resource Orc…

竞赛选题 python opencv 深度学习 指纹识别算法实现

1 前言 &#x1f525; 优质竞赛项目系列&#xff0c;今天要分享的是 &#x1f6a9; python opencv 深度学习 指纹识别算法实现 &#x1f947;学长这里给一个题目综合评分(每项满分5分) 难度系数&#xff1a;3分工作量&#xff1a;4分创新点&#xff1a;4分 该项目较为新颖…

.locked勒索病毒详解 | 防御措施 | 恢复数据

引言 在数字化飞速发展的今天&#xff0c;我们享受着信息技术带来的便捷与高效&#xff0c;然而&#xff0c;网络安全问题也随之而来&#xff0c;且日益严重。其中&#xff0c;勒索病毒以其狡猾的传播方式和巨大的破坏性&#xff0c;成为了网络安全领域中的一大难题。.locked勒…

创新、引领、发展——SAMPE中国2024年会在京盛大开幕

绿树阴浓夏日长&#xff0c;在这个色彩缤纷的季节&#xff0c;SAMPE中国2024年会暨第十九届国际先进复合材料制品原材料、工装及工程应用展览会在中国国际展览中心&#xff08;北京朝阳馆&#xff09;隆重开幕。新老朋友共聚一堂&#xff0c;把酒话桑麻。 为期4天的国际学术会…

TensorRT-LLM加速框架的基本使用

TensorRT-LLM是英伟达发布的针对大模型的加速框架&#xff0c;TensorRT-LLM是TensorRT的延申。TensorRT-LLM的GitHub地址是 https://github.com/NVIDIA/TensorRT-LLM 这个框架在0.8版本有一个比较大的更新&#xff0c;原先的逻辑被统一了&#xff0c;所以早期的版本就不介绍了…