当我在Roo中运行“执行日食”时,我得到:
roo> perform eclipse
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building bugzter
[INFO] task-segment: [eclipse:clean, eclipse:eclipse]
[INFO] ------------------------------------------------------------------------
[INFO] [eclipse:clean {execution: default-cli}]
[INFO] Deleting file: .project
[INFO] Deleting file: .classpath
[INFO] Deleting file: .wtpmodules
[INFO] Deleting file: .component
[INFO] Deleting file: org.eclipse.wst.common.component
[INFO] Deleting file: org.eclipse.wst.common.project.facet.core.xml
[INFO] Deleting file: org.eclipse.jdt.core.prefs
[INFO] Deleting file: org.eclipse.ajdt.ui.prefs
[INFO] Preparing eclipse:eclipse
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) com.sun:tools:jar:1.4.2
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.sun -DartifactId=tools -Dversion=1.4.2 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=com.sun -DartifactId=tools -Dversion=1.4.2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) org.codehaus.mojo:aspectj-maven-plugin:maven-plugin:1.0
2) com.sun:tools:jar:1.4.2
----------
1 required artifact is missing.
for artifact:
org.codehaus.mojo:aspectj-maven-plugin:maven-plugin:1.0
from the specified remote repositories:
com.springsource.repository.bundles.release (http://repository.springsource.com/maven/bundles/release),
com.springsource.repository.bundles.external (http://repository.springsource.com/maven/bundles/external),
central (http://repo1.maven.org/maven2),
codehaus.org (http://repository.codehaus.org),
com.springsource.repository.bundles.milestone (http://repository.springsource.com/maven/bundles/milestone),
com.springsource.repository.bundles.snapshot (http://repository.springsource.com/maven/bundles/snapshot),
snapshots (http://snapshots.repository.codehaus.org)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Wed Jul 28 20:57:52 CEST 2010
[INFO] Final Memory: 30M/298M
[INFO] ------------------------------------------------------------------------
尝试下载工具-1.4.2.jar并运行mvn install:install-file -DgroupId = com.sun -DartifactId = tools -Dversion = 1.4.2 -Dpackaging = jar -Dfile = / path / to / file但它没有解决问题 .
运行ubuntu 10.04和maven 2.2
有什么建议?
5 回答
将系统环境参数JAVA_HOME重新指向JDK(1.5)目录而不是JRE .
根据Spring Source Roo and missing com.sun:tools:jar:1.4.2:
1)com.sun:tools:jar:1.4.2
尝试从项目网站手动下载文件 .
然后,使用以下命令安装它:
mvn install:install-file -DgroupId = com.sun -DartifactId = tools -Dversion = 1.4.2 -Dpackaging = jar -Dfile = / path / to / file
或者,如果您拥有自己的存储库,则可以在那里部署文件:
mvn deploy:deploy-file -DgroupId = com.sun -DartifactId = tools -Dversion = 1.4.2 -Dpackaging = jar -Dfile = / path / to / file -Durl = [url] -DrepositoryId = [id]
缺少1个必需的工件 .
要更正此错误,请安装其他x86 JDK,将JAVA_HOME和PATH重新指向新JDK并重新启动mvn进程
我以为我把java_home设置为jdk,但我想在slackware中jre和jdk都安装在同一个文件夹中 . 两个安装都导致了这个问题 . 我卸载了两个,并重新安装了jdk(为了安全)并修复了它 .
在pom.xml文件中添加此依赖项 .
在
<systemPath>
属性中,您必须编写JDK lib路径 .我也有类似的问题,并通过以下方式修复 .
在命令提示符下转到JDK安装路径的lib目录 . 执行以下命令安装以安装tools.jar . $ mvn install:install-file -DgroupId = sun.jdk -DartifactId = tools -Dpackaging = jar -Dversion = 1.6 -Dfile = tools.jar
http://parameshk.blogspot.in