11-11-6 上午09时56分52秒: Build errors for pc-client; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.4.1:resources (default-resources) on project pc-client: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.4.1:resources failed: Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.1 or one of its dependencies could not be resolved: Missing:
----------
1) org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.codehaus.plexus -DartifactId=plexus-interactivity-api -Dversion=1.0-alpha-4 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.codehaus.plexus -DartifactId=plexus-interactivity-api -Dversion=1.0-alpha-4 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.4.1
2) org.apache.maven.shared:maven-filtering:jar:1.0-beta-3
3) org.apache.maven:maven-core:jar:2.0.6
4) org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4
----------
1 required artifact is missing.
for artifact:
org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.4.1
from the specified remote repositories:
central (http://repo1.maven.org/maven2, releases=true, snapshots=false)
今天电脑里装了myeclipse9.1,看里面自带maven插件,就把以前做的一个maven项目给布置进去了,尼玛,后台就打出了上述英文信息,似乎说maven读取资源信息插件安装没成功吧。运行项目,总是报空指针异常信息,至于项目中说空指针异常的信息也都是找不到文件路径。后台指向的错误地方,都是this.getClass().getClassLoader()
.getResourceAsStream("images/add.PNG")此类地方。
依本人看,估计确实是maven插件有问题,或者说myeclipse9.1中自带的maven插件不是完全的,没有查找资源文件路径信息的插件吧。不过我测试了一下,不用maven项目,直接一个普通的java项目中,this.getClass().getClassLoader().getResourceAsStream("images/add.PNG")都能够读取到相关的路径文件,那就算maven插件有问题,应该也不会造成读取不到路径下面的文件啊,在此我有些想不通。
现本想能不能重新安装一下maven插件,不使用9.1中自带的maven插件,找了个apache-maven-3.0.3版本的,配置了一下环境变量,在cmd命令行中敲入mvn -version也有了相关的信息。然后选择“window”->"preferences"->“MyEclipse”->"Maven4MyEclipse"->"Maven"->"Installations",此时在右端有个列表,列表右边有“Add”、“Edit”等三个按钮,选择“Add”,然后选择自己的maven的根目录,选择完后就点击“Apply”和“ok”。这一切搞定后,可是只要我引入之前的项目后台就老是输出上述英文信息,而新建一个新的maven项目也有此英文信息,可以肯定的不是我代码的问题
以上问题的解决办法,还望能有高手指点,在下感激不尽!
进行了如下操作,似乎还是没有用
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>mvn install:install-file -DgroupId=org.c
odehaus.plexus -DartifactId=plexus-interactivity-api -Dversion=1.0-alpha-4 -Dpac
kaging=jar -Dfile=/path/to/file
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install-file (default-cli) @ standalone-po
m ---
[INFO] Installing C:\path\to\file to C:\Documents and Settings\Administrator\.m2
\repository\org\codehaus\plexus\plexus-interactivity-api\1.0-alpha-4\plexus-inte
ractivity-api-1.0-alpha-4.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.984s
[INFO] Finished at: Mon Dec 05 19:00:49 CST 2011
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
C:\Documents and Settings\Administrator>mvn install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.219s
[INFO] Finished at: Mon Dec 05 19:01:13 CST 2011
[INFO] Final Memory: 1M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM
in this directory (C:\Documents and Settings\Administrator). Please verify you
invoked Maven from the correct directory. -> [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/MissingProject
Exception
C:\Documents and Settings\Administrator>mvn deploy:deploy-file -DgroupId=org.cod
ehaus.plexus -DartifactId=plexus-interactivity-api -Dversion=1.0-alpha-4 -Dpacka
ging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-deploy-plugin:2.5:deploy-file (default-cli) @ standalone-pom --
-
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.938s
[INFO] Finished at: Mon Dec 05 19:36:34 CST 2011
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:
deploy-file (default-cli) on project standalone-pom: C:\path\to\file not found.
-> [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/MojoExecutionE
xception
分享到:
相关推荐
apache-maven的插件包:apache-maven-3.3.9-bin.zip。。
现在eclipse的社区版都不内置maven插件了,站点在线安装实在是太痛苦了(我装了6个小时),于是急于寻找一种离线安装的办法,可是在网上又找不到对应的m2e包(我用的eclipse4.7),于是我决定将站点下的文件(很多)...
eclipse maven 离线插件
官网公布的 Eclipse 的 Maven2 插件,本插件版本是:m2e-0.12.0.20101115-1102,大小 11 MB。 关于安装 Maven2 插件到 Eclipse 的详细步骤,请参考博客《集成 Maven 2 插件到 eclipse 的过程》,博客地址:...
对于eclipse无法在线安装maven插件的解决办法。首先windows配置maven环境,然后在eclipse离线安装maven插件。具体方法可以在我的博客中看到
maven资源包maven资源包maven资源包maven资源包maven资源包maven资源包maven资源包maven资源包maven资源包maven资源包
教你如何给eclipse安装maven插件,废话不多说,有图有真相
4、在links中新建maven.txt文件,内容为插件地址,例如:path=D:\eclipse_gzds\myplugins\maven(注意这里斜杠,不是反斜杠) 5、将maven.txt扩展名改为maven.lin 6、在eclipse根目录下找到eclipse.ini并打开,在...
maven跟eclipse插件集成. 1,打开你本地的eclipse根目录,随便新建一个文件夹例如mavenPlugin,把maven离线插件包中两个文件夹复制到这个新建的这个文件夹里边. 2,找到eclipse根目录下的dropins文件夹,进去后,新建...
Eclipse离线安装Maven插件
maven-plantuml-plugin, 使用PlantUML语法生成UML图的Maven 插件 然而,这个项目不再被维护了。使用语法生成UML图表的一个 Maven 插件插件。重要说明如果你想使用PlantUML大于 8031的版本,你必须使用这个插件的版本...
IDEA在线安装Maven Helper插件有时候会很慢,这个是从官网下载的 ,下载速度比较稳定点
maven3插件
eclipse中Maven安装插件和maven方便大家的安装和下载使用
jetty 6 maven官方插件 ,在maven官网下载的
maven仓库插件稳定版!不稳定你打我~(解压密码:123)
maven的安装文档和myeclipse中maven的插件安装
ECLIPSE MAVEN3插件文件(eclipse-maven3-plugin工具)
apache-maven-3.5.2-bin.zip (maven的插件包,用于eclipse、myeclipse、IDEA) 配置参考博客:https://blog.csdn.net/chenchunlin526
包含了企业常用SVN插件,Maven插件等