我正在尝试安装spring的温室项目,我遇到了一些错误。
这是我正在处理的网站:greenhouse
我能够下载eclipse git插件并安装项目,但它没有构建。
我的日志是
4/7/11 7:54:44 AM MST: Maven Builder: FULL_BUILD
4/7/11 7:54:44 AM MST: [WARN]
4/7/11 7:54:44 AM MST: [WARN] Some problems were encountered while building the effective model for com.springsource:greenhouse:war:1.0.0-BUILD-SNAPSHOT
4/7/11 7:54:44 AM MST: [WARN] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 418, column 12
4/7/11 7:54:44 AM MST: [WARN] 'distributionManagement.snapshotRepository.id' must not be 'local', this identifier is reserved for the local repository, using it for other repositories will corrupt your repository metadata. @ line 575, column 8
4/7/11 7:54:44 AM MST: [WARN]
4/7/11 7:54:44 AM MST: [WARN] It is highly recommended to fix these problems because they threaten the stability of your build.
4/7/11 7:54:44 AM MST: [WARN]
4/7/11 7:54:44 AM MST: [WARN] For this reason, future Maven versions might no longer support building such malformed projects.
4/7/11 7:54:44 AM MST: [WARN]
4/7/11 7:54:44 AM MST: [WARN] The POM for joda-time:joda-time-jsptags:jar:1.0.2 is missing, no dependency information available
4/7/11 7:54:45 AM MST: [WARN] The requested profile "greenhouse-embedded" could not be activated because it does not exist.
4/7/11 7:54:45 AM MST: Build errors for greenhouse; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compile (default) on project greenhouse: Execution default of goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compile failed: Plugin org.codehaus.mojo:aspectj-maven-plugin:1.2 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:1.4.2 at specified path C:\Program Files\Java\jre6/../lib/tools.jar
我想关注他们的移动教程,但我被困在这里。
任何帮助或指示都将不胜感激。
谢谢
答案 0 :(得分:6)
你需要一个JDK,一个JRE并不需要。
您可能需要更改环境变量(JAVA_HOME,PATH),它们指向JDK而不是JRE。
无法找到工件com.sun:tools:jar:1.4.2在指定路径C:\ Program Files \ Java \ jre6 /../ lib / tools.jar
tools.jar
位于jdk\lib
目录中,但不在jre6\lib
或jdk\jre\lib
中!
答案 1 :(得分:5)
我也有这个问题(“无法找到工件com.sun:tools:jar:1.4.2在指定的路径C:\ Program Files \ Java \ jre6 /../ lib / tools.jar”)。以下是我最终在Eclipse Indigo中构建我的Greenhouse示例所采取的所有步骤。
现在一切都很好,并且示例在Eclipse中的Jetty服务器上执行。
可能上面的一些步骤不是必需的,但至少它对我有用
答案 2 :(得分:0)
步骤号2在Abdull的回答为我解决了它,不需要做其他步骤。
带有SpringSource和m2e的Helios:Window - >偏好 - > Java - >已安装的JRE。
我指向c:\ program files \ Java \ jre7,将其更改为c:\ program files \ Java \ jdk1.7.0_13解决了问题。