[ https://issues.apache.org/jira/browse/LUCENE-10304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17457107#comment-17457107 ]
Dawid Weiss commented on LUCENE-10304: -------------------------------------- I have a workaround that is ugly but works, for the moment. {code} diff --git a/gradle/java/modules.gradle b/gradle/java/modules.gradle index b1eb3816b96..228c1644f45 100644 --- a/gradle/java/modules.gradle +++ b/gradle/java/modules.gradle @@ -129,14 +129,18 @@ allprojects { return extraArgs }) - // Modify the default classpath by removing anything already placed on module path. - // This could be done in a fancier way but a set difference is just fine for us here. Use a lazy - // provider to delay computation of the actual path. - task.classpath = files({ -> - def trimmedClasspath = sourceSet.compileClasspath - compileModulePathConfiguration - task.logger.info("Class path for ${task.path}:\n " + trimmedClasspath.files.sort().join("\n ")) - return trimmedClasspath - }) + // LUCENE-10304: if we modify the classpath here, IntelliJ no longer sees the dependencies as compile-time + // dependencies, don't know why. + if (!rootProject.ext.isIdea) { + // Modify the default classpath by removing anything already placed on module path. + // This could be done in a fancier way but a set difference is just fine for us here. Use a lazy + // provider to delay computation of the actual path. + task.classpath = files({ -> + def trimmedClasspath = sourceSet.compileClasspath - compileModulePathConfiguration + task.logger.info("Class path for ${task.path}:\n " + trimmedClasspath.files.sort().join("\n ")) + return trimmedClasspath + }) + } }) } {code} > Make sure IDEs are usable after modules are introduced > ------------------------------------------------------ > > Key: LUCENE-10304 > URL: https://issues.apache.org/jira/browse/LUCENE-10304 > Project: Lucene - Core > Issue Type: Sub-task > Reporter: Dawid Weiss > Priority: Major > > IntelliJ IDEA imports everything in 'runtime' scope after jms PR. I didn't > look inside but intellij seems to look at (or parse?) the classpath from > javaCompile - if it doesn't see a module/jar there, it considers it a runtime > dependency. -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org