-
关于MAVEN的配置和使用5
今天使用maven构建项目,maven和eclipse插件都有! 环境变量也配置了,但是在新建maven项目的时候,出现了图片上的情况!
想问下具体需要怎么样配置才可以正常使用!
问题补充:suziwen 写道你直接通过maven命令行能创建项目吗,
看你的.m2文件里的setting.xml和maven安装目录下的setting.xml是怎么配置仓库的,仓库地址能访问到吗
mvn archetype:create -DgroupId=yang -DartifactId=helloworld命令用的是这个命令,但是提示[WARNING] Failed to retrieve plugin descriptor for org.apache.maven.plugins:mave n-clean-plugin:2.4.1: Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 o r one of its dependencies could not be resolved: Failed to read artifact descrip tor for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1 Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- site-plugin/3.0/maven-site-plugin-3.0.pom
这样的警告,然后错误就是[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 (C:\Users\acer\.m2\repository), central (http://repo.maven.a pache.org/maven2)] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [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 rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundF orPrefixException C:\Users\acer>
这个错误了!
问题补充:suziwen 写道你的MAVEN是什么版本的,我的2.2.1运行你的命令正常
mvn archetype:create -DgroupId=yang -DartifactId=helloworld -e
mvn archetype:create -DgroupId=yang -DartifactId=helloworld -X
加上-e或者-X参数看看详细些的错误信息
我的是3.0.4版本的,错误好像是仓库不能更新,难道是我的配置文件那里写错了吗?org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found for prefix 'archetype' in the current project and in the plugin groups [org.apac he.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\ Users\acer\.m2\repository), central (http://repo.maven.apache.org/maven2)] at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.r esolve(DefaultPluginPrefixResolver.java:94) at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.findPluginF orPrefix(MojoDescriptorCreator.java:262) at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDesc riptor(MojoDescriptorCreator.java:222) at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalcul ator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:106) at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalcul ator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:86) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl eStarter.java:98) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun cher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav a:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La uncher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java: 352)
这个是新的错误!
问题补充:suziwen 写道你那里直接访问这个网址能访问到吗
http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-site-plugin/3.0/maven-site-plugin-3.0.pom
要是不行就先把.m2文件删除(或者改个其他名),再执行你那命令那MVN再重新构建下。
你的命令在我机器上的MVN 3.0.4版本也能正常执行
问题解决了! 是网络问题! 那个网站一直到刚才才能访问! 现在已经成功建立了! 真是邪了门了! 难道谁还故意封了apache的IP?2012年3月18日 02:38
3个答案 按时间排序 按投票排序
-
采纳的答案
你那里直接访问这个网址能访问到吗
http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-site-plugin/3.0/maven-site-plugin-3.0.pom
要是不行就先把.m2文件删除(或者改个其他名),再执行你那命令那MVN再重新构建下。
你的命令在我机器上的MVN 3.0.4版本也能正常执行2012年3月18日 17:19
-
你的MAVEN是什么版本的,我的2.2.1运行你的命令正常
mvn archetype:create -DgroupId=yang -DartifactId=helloworld -e
mvn archetype:create -DgroupId=yang -DartifactId=helloworld -X
加上-e或者-X参数看看详细些的错误信息2012年3月18日 14:04
-
你直接通过maven命令行能创建项目吗,
看你的.m2文件里的setting.xml和maven安装目录下的setting.xml是怎么配置仓库的,仓库地址能访问到吗2012年3月18日 06:42
相关推荐
Maven配置文件Maven配置文件
Maven的配置及使用,Maven的配置及使用Maven的配置及使用Maven的配置及使用Maven的配置及使用Maven的配置及使用Maven的配置及使用
File 转 MultipartFile 和需要的maven配置File 转 MultipartFile 和需要的maven配置File 转 MultipartFile 和需要的maven配置
maven配置阿里云镜像仓库,maven配置阿里云镜像仓库,maven配置阿里云镜像仓库。
在cto上买的javaee全套课程 这个是maven配置与使用的笔记
包含了<<maven权威指南>>,maven官方api使用等,自己的maven笔记等详细的maven使用教程,同时还包含了maven客户端搭建,服务器配置于搭建的详细资料,是以整套的maven学习资料.
maven的下载配置和基本使用
maven阿里云配置文件,采用maven3.5.2,是一个非常实用的配置文件。
maven配置
maven配置操作文档
Maven 配置注意事项: 1.安装maven,在myeclipse中换为自己安装的maven 2.修改maven中conf/setting....5.使用maven-build时配置global:tomcat7:redeploy 6.配置tomcat里面管理员帐号密码 ,manager-script"/>
Maven的安装、配置及使用入门
Maven项目对象模型(POM),可以通过一小段描述信息来管理项目的构建,报告和文档的软件项目管理工具。 Maven 除了以程序构建能力为特色之外,还提供高级项目管理工具。由于 Maven 的缺省构建规则有较高的可重用性,...
maven配置文件配置国内阿里云镜像
maven工具的使用 目 录 Maven 环境的配置 1. settings.xml存放路径 1 2. 设置Maven的环境变量 2 3. 配置 settings.xml 2 4. 安装Maven插件 2 5. 配置 STS-3.3.0.RELEASE中的maven环境 2 6. 创建MAVEN项目 4 7. ...
【Maven】Maven POM配置详解 - CSDN博客1
maven 配置环境变量,需要从官网下载本地程序包,设置电脑的环境变量,开发java project 项目使用maven 仓库,本地maven仓库
maven配置过程以及简单的helloworldmaven配置过程以及简单的helloworldmaven配置过程以及简单的helloworld
阿里云云效 是企业级一站式 DevOps 平台,覆盖产品从需求到运营的研发全生命周期,其中云效也提供了免费、可靠的Maven私有仓库 Packages 和代码管理仓库 Codeup,欢迎您体验使用。 云效制品仓库 Packages 致力于帮助...
在安装Maven构建工具后,Maven仓库镜像站点默认是国外的,因为网络原因,在构建...所以我们一定要把仓库镜像站点改为国内的才能顺利下载,通常比较常用得是阿里云镜像,已经配置好的settings.xml文件可以直接替换使用。