在Pom.xml 引用 struts2-core提示找不到 tools的解决方法

来源:互联网 发布:全景效果图制作软件 编辑:程序博客网 时间:2024/06/05 06:45

Eclipse 错误提示(Pom.xml文件)

Missing artifact com.sun:tools:jar:1.5.0:system

The container 'Maven Dependencies' references non existing library 'C:\Program Files\Java\lib\tools.jar'


解决方法

<dependency>
        <groupId>org.apache.struts</groupId>
        <artifactId>struts2-core</artifactId>
        <version>2.1.8.1</version>
        <exclusions>
            <exclusion>
                <artifactId>tools</artifactId>
                <groupId>com.sun</groupId>
            </exclusion>
        </exclusions>

    </dependency>