meven dos下构建项目失败
来源:互联网 发布:程序员的工作环境 编辑:程序博客网 时间:2024/06/16 13:20
初次学习使用meven,在官网上下载安装成功后,构建hello world级的项目,总是失败,说找不到插件archetype。
错误信息:
[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\kang.m2\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 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
因为构建的项目很简单,所有很容易猜到是网络的原因。
解决的方法有两种:一、设置一个稳定的代理,二、修改远程仓库
第一种方法我没找到合适的代理,这里我就先说一下第二种:
找到meven安装目录下的conf/settings.xml文件,找到mirrors标签,为它添加下面内容:
<mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror>
这个是来自阿里的meven仓库,速度快的飞起。
第一种方法也简单说下
修改安装用户下的.m2/settings.xml文件,如果没找到,那么把meven的安装目录下的conf/settings.xml复制过去,然后编辑该文件的proxies部分,如果被注释了打开注释
<proxies> <!-- proxy | Specification for one proxy, to be used in connecting to the network. | --> <proxy> <id>optional</id> <!-- 代理名称 --> <active>true</active> <!-- 代理是否激活 --> <protocol>http</protocol> <!-- 代理使用协议 --> <username>proxyuser</username> <!-- 如果代理需要验证配置用户名和密码,否则可以删除 --> <password>proxypass</password> <host>proxy.host.net</host> <!-- 代理主机 --> <port>80</port> <!-- 代理端口号 --> <nonProxyHosts>local.net|some.host.com</nonProxyHosts><!--某些地址不需要经过代理服务器,多个地址之间用|分隔,支持通配符,比如172.156.*--> </proxy> </proxies>
- meven dos下构建项目失败
- meven
- 构建maven项目失败解决办法
- Jenkins构建Python项目失败
- dos下登录fedora下的vsftp失败
- DOS命令行中用MAVEN构建 Java 和 Java Web 项目
- Window下Meven的安装与环境变量配置
- 项目打包,在dos下运行
- mvn 构建项目,脚本windows编译成功,linux执行失败
- Tomcat下部署两个项目启动失败
- maven下构建项目结构详解
- maven下构建项目结构详解
- maven下构建项目结构详解
- eclipse下利用gradle构建项目
- eclipse下构建spring与OSGI项目
- gradle eclipse下构建ssh2项目
- Maven下构建bootstrap+jfinal项目Demo
- 在eclipse下构建maven子项目
- TC358743XBG/TC358749XBG(\w Scaler):HDMI转MIPI CSI东芝转换芯片
- HDU 6058 Kanade's sum(思维)
- 浏览器兼容
- 浅谈CSRF攻击方式
- 正则表达式
- meven dos下构建项目失败
- 面试总结贴
- 互联网金融平台如何选?超级干货来啦~
- 简单比较版本名称大小,如1.8.1,2.10.0等
- 分布式事务处理总结
- Android零基础入门第57节:日期选择器DatePicker和时间选择器TimePicker
- JavaEE的13种核心技术
- 动态规划——单向 DSP
- S3FD:Single Shot Scale-invariant Face Detector