Problem when removing module from `extraJavaModuleInfo`
Closed this issue · 1 comments
Shawoll commented
Hi, great work, love this plugin!
Although, I have an issue when I've modified/removed the module from the extraJavaModuleInfo
in my build.gradle.kts
.
I was using this plugin, to use old jdom
dependency:
dependencies {
// https://mvnrepository.com/artifact/jdom/jdom
implementation("jdom:jdom:1.0")
}
and
extraJavaModuleInfo {
module("jdom-1.0.jar", "org.jdom", "1.0"){
exports("org.jdom.xpath")
exports("org.jdom.transform")
exports("org.jdom.output")
exports("org.jdom.input")
exports("org.jdom.filter")
exports("org.jdom.adapters")
exports("org.jdom")
}
}
I've found a newer version of jdom
, updated the version and I've decided to remove it, but when I do, I recieve :
Execution failed for task 'my-project:compileJava'.
> Could not resolve all files for configuration ':my-project:compileClasspath'.
> Failed to transform jdom-1.0.jar (jdom:jdom:1.0) to match attributes {artifactType=jar, javaModule=true, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
> Execution failed for ExtraModuleInfoTransform: C:\Users\Z0047FFS\.gradle\caches\modules-2\files-2.1\jdom\jdom\1.0\a2ac1cd690ab4c80defe7f9bce14d35934c35cec\jdom-1.0.jar.
> Not a module and no mapping defined: jdom-1.0.jar
It looks like it's still there somewhere. Things I've tried :
- removed
.gradle
andbuild
in mybuildSrc
folder - removed
.gradle\caches\modules-2\files-2.1\jdom
- removed
.gradle\*
- restart IDE
IDEA IntelliJ
& invalidate caches - removed
.gradle
from the root of my project
My setup is :
extra-java-module-info:0.10
- Gradle 7.3
- java 17.0.1
- IntelliJ IDEA
Any advice would be much appreciated. Thanks in advance.
Edit: When I remove the implementation(...
from dependencies
, and keep the module(...
in extraJavaModuleInfo {
, then It works, even though I removed it.
Shawoll commented
Resolved : It was transitive dependency coming from implementation("com.intellij:forms_rt:7.0.3")
.