[
https://issues.apache.org/jira/browse/LUCENE-9438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17189096#comment-17189096
]
Adrien Grand commented on LUCENE-9438:
--------------------------------------
This worked well for me to get the project to compile, but running tests
doesn't work as resources are not on the classpath, so codecs are not loaded. I
had to do the following to make it work
{code}
diff --git a/gradle/ide/eclipse.gradle b/gradle/ide/eclipse.gradle
index e414112697a..12e1bdc95a6 100644
--- a/gradle/ide/eclipse.gradle
+++ b/gradle/ide/eclipse.gradle
@@ -47,6 +47,7 @@ configure(rootProject) {
projects.each { prj ->
prj.sourceSets.each { sourceSet ->
sources += sourceSet.java.srcDirs.findAll { dir -> dir.exists()
}.collect { dir -> relativize(dir) }
+ sources += sourceSet.resources.srcDirs.findAll { dir ->
dir.exists() }.collect { dir -> relativize(dir) }
}
// This is hacky - we take the resolved compile classpath and just
{code}
This might not be the best way to do this as I have very little Groovy/Gradle
knowledge.
> Add gradle workflow support for Eclipse IDE
> -------------------------------------------
>
> Key: LUCENE-9438
> URL: https://issues.apache.org/jira/browse/LUCENE-9438
> Project: Lucene - Core
> Issue Type: Sub-task
> Reporter: Dawid Weiss
> Assignee: Dawid Weiss
> Priority: Major
> Fix For: master (9.0)
>
> Attachments: capture-1.png
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Off the top of my head I've tried using the eclipse plugin (this should
> prepare "static" classpath entries pointing at local gradle caches). It
> almost works... almost because we have references between sub-atomic project
> elements (tests and main) that make Eclipse see these as circular (because
> Eclipse treats project sources and main classes as one).
> I pushed this code to jira/LUCENE-9438. Perhaps there are ways of making it
> work. I'm not a big fan of having a single "blob" project with all the
> sources and classpaths combined (the IDE won't help you figure out what's
> accessible from a given subproject then) but maybe it's the only way to make
> it work for Eclipse, don't know.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]