compile在gradle-8.5中无法依赖问题解决方案

compile发现gradle总是不能依赖到testCompile、compile的包,提示找不到类定义

具体的解决方式,将testCompile、compile调整为implementation即可,具体如下图所示:

manifest {
		attributes 'Main-Class': 'com.redpill.server.EsbServer'
//		attributes 'Main-Class': 'com.redpill.test.ProducerTest'
		attributes "Class-Path": configurations.compile.collect { "lib/${it.name}" }.join(' ')
	}

在attributes "Class-Path": configurations.compile.collect { "lib/${it.name}" }.join(' ')

调整为

attributes "Class-Path": configurations.runtimeClasspath.files.collect { "mlib/${it.name}" }.join(' ')

最后重新构建一下即可解决问题。

相关推荐

  1. Android 解决Gradle 三方依赖冲突方法

    2023-12-30 20:32:08       44 阅读
  2. UI自动化元素无法定位问题解决方法

    2023-12-30 20:32:08       33 阅读
  3. 解决Gradle依赖冲突:排除特定版本依赖

    2023-12-30 20:32:08       13 阅读
  4. IDEA SpringBoot + Gradle无法运行测试问题

    2023-12-30 20:32:08       18 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-30 20:32:08       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-30 20:32:08       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-30 20:32:08       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-30 20:32:08       20 阅读

热门阅读

  1. 从jdbc到spring-boot-starter-jdbc

    2023-12-30 20:32:08       40 阅读
  2. C++程序设计实践报告【格式】

    2023-12-30 20:32:08       32 阅读
  3. 工具--Git详解

    2023-12-30 20:32:08       36 阅读
  4. springboot+mybatis项目

    2023-12-30 20:32:08       43 阅读
  5. MySQL函数

    2023-12-30 20:32:08       44 阅读
  6. C#常用类

    2023-12-30 20:32:08       30 阅读
  7. 前端八股文(CSS篇)

    2023-12-30 20:32:08       30 阅读
  8. 【PHP】使用Redis对API进行限流

    2023-12-30 20:32:08       31 阅读
  9. IIS主机头名的用法--一个IP建多个Web站点

    2023-12-30 20:32:08       32 阅读
  10. Linux分割合并文件

    2023-12-30 20:32:08       37 阅读
  11. 【ctype.h】全部函数的介绍与代码示例

    2023-12-30 20:32:08       42 阅读
  12. ubuntu下的磁盘管理

    2023-12-30 20:32:08       41 阅读
  13. 11、可扩展的Mysql

    2023-12-30 20:32:08       33 阅读
  14. python自动合计各部周销

    2023-12-30 20:32:08       33 阅读