maven missing tool.jar解决办法

来源:互联网 发布:新浪股票复权数据接口 编辑:程序博客网 时间:2024/06/07 01:34

Description Resource Path Location Type
The container 'Maven Dependencies' references non existing library '..\apache-maven-repository\com\sun\tools\1.5.0\tools-1.5.0.jar'
第一种情况,直接添加本地tool.jar依赖

<dependency>   
          <groupId>com.sun</groupId>   
          <artifactId>tools</artifactId>   
          <version>1.6.0</version>   
          <scope>system</scope>   
          <systemPath>C:\jdk1.6.0_10\lib\tools.jar</systemPath>  
</dependency> 


第二种情况,在相应的地方排除jar依赖(需要判断可能是某一个dependency会依赖tool.jar)
<exclusions>
        <exclusion>
             <groupId>com.sun</groupId>
             <artifactId>tools</artifactId>
        </exclusion>
</exclusions>


原创粉丝点击