[alibaba/druid]gradle 依赖问题 1.2.6

2025-11-11 354 views
2

错误信息: 'dependencies.dependency.systemPath' for com.sun:tools:jar must specify an absolute path but is ${project.basedir}/lib/openjdk-1.8-tools.jar in com.alibaba:druid:1.2.6

修改pom 删除以下下依赖,因为在profile中已经指定了

com.sun tools 1.8 system ${project.basedir}/lib/openjdk-1.8-tools.jar
    <dependency>
        <groupId>com.sun</groupId>
        <artifactId>jconsole</artifactId>
        <version>1.8</version>
        <scope>system</scope>
        <systemPath>${project.basedir}/lib/openjdk-1.8-jconsole.jar</systemPath>
    </dependency>

回答

6

1.1.21也有这个问题

4

好烦,1.2.6不能正常用啊,这种bug都有

8

我这边1.2.6也遇到类似问题,回退到1.2.5没有问题。我这边是运行mvn package有如下错误提示:

Could not resolve dependencies for project com.ruoyi:ruoyi-framework:jar:3.6.0: The following artifacts could not be resolved: com.sun:tools:jar:1.8, com.sun:jconsole:jar:1.8: Could not find artifact com.sun:tools:jar:1.8 at specified path /home/mj/.m2/repository/com/alibaba/druid/1.2.6/lib/openjdk-1.8-tools.jar 

运行环境:

maven版本:3.8.2 java版本:1.8.0_302
8

同问

0

同问+1

2

这啥问题啊

5

把那两个包排除掉就ok了

<exclusions>
                <exclusion>
                    <groupId>com.sun</groupId>
                    <artifactId>tools</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun</groupId>
                    <artifactId>jconsole</artifactId>
                </exclusion>
 </exclusions>
1

把那两个包排除掉就ok了

<exclusions>
                <exclusion>
                    <groupId>com.sun</groupId>
                    <artifactId>tools</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun</groupId>
                    <artifactId>jconsole</artifactId>
                </exclusion>
 </exclusions>

关键是这个问题之前就有 然后又几个版本没有了 现在又来 ?