eclipse-->run as-->maven install 报错解决方法

    最近在用eclipse+maven 框架做项目,更新maven时老是报maven插件有问题,具体信息如下:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO]                                                                        
[INFO] ------------------------------------------------------------------------
[INFO] Building cigna-local-web-app 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.110s
[INFO] Finished at: Sat Oct 19 14:27:59 CST 2013
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-dependency-plugin:2.8 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-dependency-plugin:jar:2.8: Could not transfer artifact org.apache.maven.plugins:maven-dependency-plugin:pom:2.8 from/to central (http://repo.maven.apache.org/maven2): java.net.ConnectException: connection timed out to http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-dependency-plugin/2.8/maven-dependency-plugin-2.8.pom -> [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

原因是缺少了maven插件的jar,而maven插件的jar是通过setting.xml配置的(具体的将是maven 的仓库),在eclipse中window-->preference-->maven--user Settings 配置

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
1. 安装Eclipse JEE 下载并安装Eclipse JEE版,可以从官网下载安装包:https://www.eclipse.org/downloads/packages/ 2. 安装Maven插件 在Eclipse中安装Maven插件,可以使用Eclipse自带的插件安装功能,打开Eclipse,依次点击“Help” -> “Eclipse Marketplace”,在搜索栏中输入“maven”,选择“Maven Integration for Eclipse”,点击“Install”进行安装。 3. 配置Maven 安装完Maven插件后,需要配置Maven,打开Eclipse,依次点击“Window” -> “Preferences”,在Preferences窗口中选择“Maven”,配置Maven的路径和设置本地仓库的路径。 4. 创建Maven项目 在Eclipse中创建Maven项目,依次点击“File” -> “New” -> “Other”,在弹出的窗口中选择“Maven” -> “Maven Project”,选择项目模板,填写项目信息,点击“Finish”创建项目。 5. 编写Maven配置文件 在Maven项目中,需要编写Maven配置文件pom.xml,该文件描述了项目的依赖关系、构建方式等信息。可以使用Eclipse自带的Maven插件来编辑pom.xml文件。 6. 构建Maven项目 在Eclipse中构建Maven项目,可以通过右键单击项目,选择“Run As” -> “Maven Build”来构建项目。在弹出的窗口中填写构建目标和其他配置信息,点击“Run”开始构建。 7. 运行Maven项目 在Eclipse中运行Maven项目,可以通过右键单击项目,选择“Run As” -> “Maven Build”,在弹出的窗口中填写“tomcat7:run”作为构建目标,点击“Run”启动Tomcat服务器并运行项目。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值