Eclipse Maven 引入报错 Missing artifact com.sun:tools:jar 1.8.0

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/yangzongzhuan/article/details/89811375

在pom.xml添加如下 配置文件

<dependency>
    <groupId>com.sun</groupId>
    <artifactId>tools</artifactId>
    <version>1.8.0</version>
    <scope>system</scope>
    <systemPath>F:/software/Java/jdk1.8.0_161/lib/tools.jar</systemPath>
 </dependency>

 

展开阅读全文

maven Missing artifact 异常

07-29

错误信息如下:rn12-7-29 上午11时44分06秒: Missing artifact mysql:mysqlconnectorjava:jar:5.1.19:compilernrn架构如下: parent 项目负责下载jar包, 配置如下:rnrn 4.0.0rn com.wjj.examplern example-parentrn pomrn 0.0.1-SNAPSHOTrn example-parentrn http://maven.apache.orgrn rn rn ../example-corern rn rnrn UTF8rn 3.1.1.RELEASErn rnrnrnrnrn $project.groupIdrn example-parentrn 0.0.1SNAPSHOTrn rnrn junitrn junitrn 4.10rn testrn rnrn org.springframeworkrn springtestrn $spring.versionrn rnrn org.springframeworkrn springormrn $spring.versionrn rnrn org.springframeworkrn springcorern $spring.versionrn rnrn org.springframeworkrn springaoprn $spring.versionrn rnrn org.springframeworkrn springbeansrn $spring.versionrn rnrn org.springframeworkrn springcontextrn $spring.versionrn rnrn org.springframeworkrn springwebmvcrn $spring.versionrn rnrnrn org.hibernate.javax.persistencern hibernatejpa2.0apirn 1.0.1.Finalrn rnrn org.hibernatern hibernatecorern 3.6.10.Finalrn rnrn org.slf4jrn slf4japirn 1.6.4rn rnrn javassistrn javassistrn 3.12.1.GArn rnrnrnrn mysqlrn mysqlconnectorjavarn 5.1.19rn rnrn commonsdbcprn commonsdbcprn 1.4rn rnrnrnrn com.kenai.nbpwrrn javaxinjectrn 1.0201002241208rn rnrn org.hibernatern hibernatevalidatorrn 4.2.0.Finalrnrnrn org.hibernatern hibernatecommonsannotationsrn rn rn rnrn javax.validationrn validationapirn 1.0.0.GArn rnrnrn org.aspectjrn aspectjweaverrn 1.6.11rn rnrnrn servletapirn servletapirn 2.4rn providedrn rnrn javax.servlet.jsprn jspapirn 2.2rn providedrn rnrn jstlrn jstlrn 1.2rn rnrn taglibsrn standardrn 1.1.1rn rnrn commonsiorn commonsiorn 2.3rn rnrn commonsloggingrn commonsloggingrn 1.1.1rn rnrn commonsfileuploadrn commonsfileuploadrn 1.2.2rn rnrn jsptagsrn pagertaglibrn 2.0rn rnrnrn org.codehaus.jacksonrn jacksoncoreaslrn 1.9.6rn rnrn org.codehaus.jacksonrn jacksonmapperaslrn 1.9.6rn rn rn rn rnrnrnrnrn org.apache.maven.pluginsrn mavencompilerpluginrn 2.3.2rnrn 1.6rn 1.6rn rn rnrn org.apache.maven.pluginsrn mavenresourcespluginrnrn UTF8rn rn rnrn org.mortbay.jettyrnrn jettymavenpluginrnrn 2000rnrnrn /sturn rnrnrnrn 8787rn 500000rn rn rn rn rn rn rn rnrnrnrnrn子模块配置如下:rnrn4.0.0rnrncom.wjj.examplernexample-parentrn0.0.1-SNAPSHOTrn../example-parent/pom.xmlrnrnrnrnrnexample-corern0.0.1-SNAPSHOTrnexample-corernhttp://maven.apache.orgrnrnrnjunitrnjunitrnrnrnmysqlrnmysqlconnectorjavarnrnrnrnrn就会报上面那个错误。 请教大家一下,解决方案谢谢。!!。 论坛

请问maven工程报Could not find artifact com.alibaba:tools:jar:1.8.0 怎么办?

09-29

各位大神,菜鸟我搭建了自己的第一个maven项目,今天跑起来聚合工程的时候报Could not find artifact com.alibaba:tools:jar:1.8.0 at specified path C:\Java\jdk1.7.0_80\jre/../lib/tools.jar -> [Help 1]错误rnrn具体如下:rn[INFO] Scanning for projects...rn[INFO] ------------------------------------------------------------------------rn[INFO] Reactor Build Order:rn[INFO] rn[INFO] hougong-managerrn[INFO] hougong-manager-pojorn[INFO] hougong-manager-mapperrn[INFO] hougong-manager-servicern[INFO] hougong-manager-webrn[INFO] rn[INFO] ------------------------------------------------------------------------rn[INFO] Building hougong-manager 0.0.1-SNAPSHOTrn[INFO] ------------------------------------------------------------------------rn[INFO] rn[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ hougong-manager ---rn[INFO] rn[INFO] >>> tomcat7-maven-plugin:2.2:run (default-cli) > process-classes @ hougong-manager >>>rn[INFO] rn[INFO] <<< tomcat7-maven-plugin:2.2:run (default-cli) < process-classes @ hougong-manager <<>> tomcat7-maven-plugin:2.2:run (default-cli) > process-classes @ hougong-manager-pojo >>>rn[INFO] rn[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ hougong-manager-pojo ---rn[INFO] Using 'UTF-8' encoding to copy filtered resources.rn[INFO] Copying 0 resourcern[INFO] rn[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ hougong-manager-pojo ---rn[INFO] Nothing to compile - all classes are up to datern[INFO] rn[INFO] <<< tomcat7-maven-plugin:2.2:run (default-cli) < process-classes @ hougong-manager-pojo << [Help 1][/color]rn[ERROR] rn[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.rn[ERROR] Re-run Maven using the -X switch to enable full debug logging.rn[ERROR] rn[ERROR] For more information about the errors and possible solutions, please read the following articles:rn[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionExceptionrn[ERROR] rn[ERROR] After correcting the problems, you can resume the build with the commandrn[ERROR] mvn -rf :hougong-manager-mapperrnrn请问这个要怎么解决啊?找了好多办法都没解决好,已经快崩溃了,哪位大神能救救我啊[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/5.gif][/img]谢谢各位大神了!新人积分不多,还请见谅[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/monkey/42.gif][/img]rnrnrn 论坛

Missing artifact jdk.tools:jdk.tools:jar:1.8

01-10

环境:win10 jdk1.8rnrn![图片说明](https://img-ask.csdn.net/upload/201901/10/1547089206_936456.jpg)rn这个是eclipse里报的错!我想解决这个问题rn**首先说明:我要解决的方法并不是要你告诉我在pom.xml文件里加依赖**,rn因为我是在编译别人的代码时出现的这个问题,已确定代码无问题且无法修改rnrn我认为应该是我jdk或者eclipse哪里配置的问题,希望能修复这个问题。下面贴出我的一些配置,希望有大佬能指点解决这个问题。rn![图片说明](https://img-ask.csdn.net/upload/201901/10/1547089551_52494.jpg)rnrn这个是classpath的配置,不知道有没有问题,但是现在在cmd里输入java和javac是正常的。rnrn![图片说明](https://img-ask.csdn.net/upload/201901/10/1547089627_490273.jpg)rnrn![图片说明](https://img-ask.csdn.net/upload/201901/10/1547089674_17282.jpg)rnrneclipse里jdk的配置。rnrn![图片说明](https://img-ask.csdn.net/upload/201901/10/1547089702_982955.jpg)rnrnjdk安装的时候有分开安装,应该是不会有啥覆盖的情况。rnrn![图片说明](https://img-ask.csdn.net/upload/201901/10/1547110354_479874.jpg)![图片说明](https://img-ask.csdn.net/upload/201901/10/1547110362_826936.jpg)rnrn这里我清楚我的maven仓库里并没有这个jdk.tools,我可以在cmd里mvn导入,但我这里希望就是能不能通过设置一下哪里,让他能贼自动找到jdk/lib/tools.jar这个东西。因为我需要让一个我无法修改的项目也能够找到这个tools.jar,所以我希望能做出全局的修改。rnrn如果我加系统依赖的话会出现rnrn![图片说明](https://img-ask.csdn.net/upload/201901/10/1547112744_290270.jpg)rnrn我只前有说过,我在cmd里输出java和javac都是可以正常反应的,环境变量不知道有没有问题。rn上面图片的异常是Project build error: 'dependencies.dependency.systemPath' for jdk.tools:jdk.tools:jar must specify an absolute path but is $JAVA_HOME/lib/tools.jarrnrn希望有大佬能指点解决这个问题,万分感谢! 问答

没有更多推荐了,返回首页