apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.59k stars 1.01k forks source link

Eclipse - one or more cycles were detected #13676

Closed plutext closed 2 weeks ago

plutext commented 3 weeks ago

Description

I followed the instructions at https://github.com/apache/lucene/blob/main/help/IDEs.txt#L7 to set up Eclipse project files:

./gradlew eclipse

and then imported the project into Eclipse.

Following this, I have 77 errors:

The container 'Project and External Dependencies' references non existing library '/home/jharrop/git/lucene/lucene/analysis.tests/build/libs/lucene-analysis.tests-10.0.0-SNAPSHOT-test.jar'

Regarding missing lucene-analysis-morfologik.tests-10.0.0-SNAPSHOT-test.jar, following ./gradlew assemble I have lucene-analysis-morfologik.tests-10.0.0-SNAPSHOT.jar but not SNAPSHOT-test.jar.

I'm not sure how /lucene-analysis.tests-10.0.0-SNAPSHOT-test.jar gets to be on the build path, or how to remove it (the usual approach in the Eclipse IDE does not work).

The container 'Project and External Dependencies' references non existing library 'lucene/analysis.tests/build/libs/lucene-analysis.tests-10.0.0-SNAPSHOT-test.jar'

The container 'Project and External Dependencies' references non existing library 'lucene/core.tests/build/libs/lucene-core.tests-10.0.0-SNAPSHOT-test.jar'

Similar comments to above

Eclipse 2024-06 (4.32.0) Java 21

Version and environment details

No response

dweiss commented 3 weeks ago

How did you import the project into Eclipse? It should be "Import as an existing project" or something like this. When I run gradlew eclipse, the .classpath file doesn't mention those circular dependencies.

plutext commented 2 weeks ago

Yes, I imported as an existing project (Import > General > Existing Projects into Workspace) rather than Gradle > Existing Gradle Project.

Here is one set of projects affected (Eclipse - Problems - Description) :-

One or more cycles were detected in the build path of project 'analysis.tests'. The paths towards the cycle and cycle are: analysis.tests->{core, test-framework} analysis.tests->{core, test-framework, codecs} analysis.tests, core->{test-framework, codecs}

One or more cycles were detected in the build path of project 'codecs'. The paths towards the cycle and cycle are: ->{core, test-framework, codecs} ->{test-framework, codecs} ->{core, codecs}

One or more cycles were detected in the build path of project 'core'. The paths towards the cycle and cycle are: ->{core, test-framework} ->{core, test-framework, codecs} core->{test-framework, codecs} ->{core, codecs}

One or more cycles were detected in the build path of project 'test-framework'. The paths towards the cycle and cycle are: ->{core, test-framework} ->{core, test-framework, codecs} ->{test-framework, codecs}

dweiss commented 2 weeks ago

There should be only one top-level project. Try git clean -xfd . (or a fresh checkout), then import again. Something is wrong.

dweiss commented 2 weeks ago

I just tried and it imports and builds fine for me? image