zoukankan      html  css  js  c++  java
  • Missing artifact com.sun:tools:jar 1.5.0 终极解决方法

    在使用m2eclipse插件时,在pom.xml中添加struts2-core.jar包后,需要依赖java运行时的tools.jar进行依赖。但是,此时eclipse无法读取tools包,出现如下错误:

    Missing artifact com.sun:tools:jar 1.5.0

    解决办法一:

    手动配置pom.xml,添加一个dependency如下:

    <dependency>
    <groupId>com.sun</groupId>
    <artifactId>tools</artifactId>
    <scope>system</scope>
    <systemPath>${JAVA_HOME}/../lib/tools.jar</systemPath>
    </dependency>

    即可!

    如果办法不能解决,试用第二种方法。

    解决办法二:

    首先,查看错误列表windows->Show View->Problems,在有以上问题的同时,还会出现该错误。
    The container 'Maven Dependencies' references non existing library 'C:Documents and SettingsDELL.m2 epositorycomsun ools1.5.0 ools-1.5.0.jar'
    大致说:找不到该tools-1.5.0.jar。

    所以将C:Program FilesJavajdk1.6.0_10lib目录下的tools.jar拷贝到C:Documents and SettingsDELL.m2 epositorycomsun ools1.5.0目录下,并将tools.jar改名为tools-1.5.0.jar,并在pom.xml中作如下配置:

    <dependency>
    <groupId>com.sun</groupId>
    <artifactId>tools</artifactId>
    <version>1.5.0</version>
    </dependency>

  • 相关阅读:
    delphi内存管理
    Dbgrid导出为word
    indy传输文件
    TMethod
    http状态码详解
    如何严格设置php中session过期时间
    http和https的优缺点,区别与工作原理
    session的生命周期
    Mysql分库分表方案,如何分,怎样分?
    【观点】程序员应知——循序渐进 狼人:
  • 原文地址:https://www.cnblogs.com/fatfatdachao/p/4580342.html
Copyright © 2011-2022 走看看