读书人

运用maven集成开发struts2

发布时间: 2013-02-24 17:58:57 作者: rapoo

使用maven集成开发struts2

使用maven集成开发struts2启动报错如下:

[ERROR] Failed to execute goal on project Prjssh:?Could not resolve dependencies for project com.fei.ssh:Prjssh:war:1.0-SNAPSHOT: Could not find artifact com.sun:tools:jar:1.5.0 at specified path C:\Program Files\Java\jre6/../lib/tools.jar ->?[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/DependencyResolutionException?

?

解决:

? ? ? ? ? ? 是因为java 运行环境(jre)的问题, 在java的安装目录下面有两个一样的jre, 但是eclipse启动的时候用的D:\Java\jdk1.6.0_21\jre, 而工程build path用的是D:\ava\jre6, 虽然他们一样,但是互相引用不到,? 把它们设置一至的就可以把问题解决。

注意区分 jdk 和 jre 。

读书人网 >软件架构设计

热点推荐