Skip to content

Reduce complexity in dependencies setup (restore)#15194

Merged
koppor merged 5 commits intomainfrom
reduce-complexity-in-dependencies-setup
Mar 3, 2026
Merged

Reduce complexity in dependencies setup (restore)#15194
koppor merged 5 commits intomainfrom
reduce-complexity-in-dependencies-setup

Conversation

@jjohannes
Copy link
Copy Markdown
Collaborator

@jjohannes jjohannes commented Feb 23, 2026

Related issues and pull requests

Restores and fixes #15169

PR Description

Steps to test

Checklist

  • I own the copyright of the code submitted and I license it under the MIT license
  • I manually tested my changes in running JabRef (always required)
  • [.] I added JUnit tests for changes (if applicable)
  • [.] I added screenshots in the PR description (if change is visible to the user)
  • [.] I added a screenshot in the PR description showing a library with a single entry with me as author and as title the issue number
  • [.] I described the change in CHANGELOG.md in a way that can be understood by the average user (if change is visible to the user)
  • [.] I checked the user documentation for up to dateness and submitted a pull request to our user documentation repository

@Siedlerchr Siedlerchr added the dev: binaries Binary builds should be uploaded to builds.jabref.org label Feb 23, 2026
@testlens-app

This comment has been minimized.

@jjohannes
Copy link
Copy Markdown
Collaborator Author

To address #15169 (comment) I did some more manually testing in the GUI. There are some code paths not covered by tests that we missed for which opens was missing.

Before this is merged again, I would appreciate one or two more people testing this manually. If some more issues like these are discovered, the fix is to add the opens that corresponds to what the error message says in org.jabref.gradle.base.dependency-rules.gradle.kts

@Siedlerchr
Copy link
Copy Markdown
Member

Thanks for the follow up, There now seems to be something not correct with the fetcher tests, I am worried about the NPE there and at least arxiv should normally be working

@jjohannes
Copy link
Copy Markdown
Collaborator Author

@Siedlerchr The info I got from @koppor is that these tests are unreliable and can be ignored. Which is of course in general not a good situation (but unrelated to the topic of this PR). The same failures appeared in the original PR.

But I am happy to look at the problem, if you can point out which test exactly should pass that is failing now.

@koppor
Copy link
Copy Markdown
Member

koppor commented Feb 23, 2026

But I am happy to look at the problem, if you can point out which test exactly should pass that is failing now.

Locally, it works:

grafik

Thus, treating it as "hick-up" :)

@koppor koppor marked this pull request as ready for review February 23, 2026 11:24
@koppor
Copy link
Copy Markdown
Member

koppor commented Feb 23, 2026

Launched using ./gradlew :jabgui:run on Windows. Entry editor and cleaup. Worked.

@qodo-free-for-open-source-projects
Copy link
Copy Markdown
Contributor

Review Summary by Qodo

Restore and refactor module dependencies with proper scopes and validation

✨ Enhancement 🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Restore and refactor module dependency declarations with proper scopes
• Mark runtime-only dependencies with /*runtime*/ comments in module-info
• Add missing opens statements and fix transitive dependency declarations
• Simplify build.gradle files by removing explicit dependency declarations
• Add new Gradle plugin for dependency scope validation and JavaFX metadata rules
Diagram
flowchart LR
  A["Module-Info Files"] -->|Add runtime markers| B["Runtime Dependencies"]
  A -->|Fix transitive| C["Transitive Dependencies"]
  A -->|Add opens| D["Package Exports"]
  E["Build Gradle Files"] -->|Remove duplicates| F["Simplified Config"]
  G["New Gradle Rules"] -->|Validate scopes| H["Dependency Checker"]
  G -->|Handle JavaFX| I["Platform Variants"]
Loading

Grey Divider

File Changes

1. jabgui/src/main/java/module-info.java ⚙️ Configuration changes +11/-9

Mark logging dependencies as runtime-only

jabgui/src/main/java/module-info.java


2. jabkit/src/main/java/module-info.java ⚙️ Configuration changes +4/-8

Remove unused dependencies and mark runtime-only

jabkit/src/main/java/module-info.java


3. jablib/src/main/java/module-info.java ⚙️ Configuration changes +37/-42

Refactor dependencies with transitive and runtime markers

jablib/src/main/java/module-info.java


View more (25)
4. jablib/src/main/java/org/jabref/logic/ai/chatting/chathistory/storages/MVStoreChatHistoryStorage.java 🐞 Bug fix +3/-4

Replace Kotlin IntRange with standard Java for loop

jablib/src/main/java/org/jabref/logic/ai/chatting/chathistory/storages/MVStoreChatHistoryStorage.java


5. jabls-cli/src/main/java/module-info.java ⚙️ Configuration changes +6/-2

Remove transitive markers and add runtime logging deps

jabls-cli/src/main/java/module-info.java


6. jabls/src/main/java/module-info.java ⚙️ Configuration changes +5/-5

Add transitive markers and remove unused dependencies

jabls/src/main/java/module-info.java


7. jabsrv-cli/src/main/java/module-info.java ⚙️ Configuration changes +3/-24

Simplify module dependencies and remove duplicates

jabsrv-cli/src/main/java/module-info.java


8. jabsrv/src/main/java/module-info.java ⚙️ Configuration changes +16/-19

Refactor with transitive and runtime-only markers

jabsrv/src/main/java/module-info.java


9. test-support/src/main/java/module-info.java ⚙️ Configuration changes +9/-5

Reorganize test dependencies with transitive markers

test-support/src/main/java/module-info.java


10. .github/actions/setup-gradle/action.yml Dependencies +1/-1

Update TestLens setup action to v1.7.0

.github/actions/setup-gradle/action.yml


11. .github/workflows/tests-code.yml ✨ Enhancement +13/-0

Add dependency scopes validation workflow job

.github/workflows/tests-code.yml


12. build-logic/src/main/kotlin/JDKjsobjectDependencyMetadataRule.kt ✨ Enhancement +55/-0

New rule for JavaFX jsobject platform variants

build-logic/src/main/kotlin/JDKjsobjectDependencyMetadataRule.kt


13. build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts ✨ Enhancement +79/-127

Refactor JavaFX metadata patching and add helper functions

build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts


14. build-logic/src/main/kotlin/org.jabref.gradle.base.targets.gradle.kts ✨ Enhancement +25/-3

Add JDK version attributes to target configurations

build-logic/src/main/kotlin/org.jabref.gradle.base.targets.gradle.kts


15. build-logic/src/main/kotlin/org.jabref.gradle.check.checkstyle.gradle.kts Formatting +2/-2

Update Checkstyle configuration syntax

build-logic/src/main/kotlin/org.jabref.gradle.check.checkstyle.gradle.kts


16. build-logic/src/main/kotlin/org.jabref.gradle.check.dependencies.gradle.kts ✨ Enhancement +3/-0

New plugin for dependency analysis

build-logic/src/main/kotlin/org.jabref.gradle.check.dependencies.gradle.kts


17. build-logic/src/main/kotlin/org.jabref.gradle.feature.test.gradle.kts ✨ Enhancement +20/-0

Configure JUnit and Mockito agent for tests

build-logic/src/main/kotlin/org.jabref.gradle.feature.test.gradle.kts


18. build-logic/src/main/kotlin/org.jabref.gradle.module.gradle.kts ✨ Enhancement +1/-0

Add dependency analysis plugin to module config

build-logic/src/main/kotlin/org.jabref.gradle.module.gradle.kts


19. gradle/modules.properties ⚙️ Configuration changes +19/-0

New file mapping module names to Maven coordinates

gradle/modules.properties


20. jabgui/build.gradle.kts ✨ Enhancement +14/-144

Remove explicit dependencies, use module-info instead

jabgui/build.gradle.kts


21. jabkit/build.gradle.kts ✨ Enhancement +9/-73

Remove explicit dependencies and simplify config

jabkit/build.gradle.kts


22. jablib/build.gradle.kts ✨ Enhancement +57/-240

Move dependencies to module-info and testModuleInfo

jablib/build.gradle.kts


23. jabls-cli/build.gradle.kts ✨ Enhancement +5/-33

Add mainModuleInfo and remove explicit dependencies

jabls-cli/build.gradle.kts


24. jabls/build.gradle.kts ✨ Enhancement +4/-18

Move dependencies to module-info declarations

jabls/build.gradle.kts


25. jabsrv-cli/build.gradle.kts ✨ Enhancement +5/-86

Add mainModuleInfo and remove explicit dependencies

jabsrv-cli/build.gradle.kts


26. jabsrv/build.gradle.kts ✨ Enhancement +9/-65

Move dependencies to module-info declarations

jabsrv/build.gradle.kts


27. test-support/build.gradle.kts ✨ Enhancement +0/-27

Remove all explicit dependencies from build file

test-support/build.gradle.kts


28. versions/build.gradle.kts ✨ Enhancement +4/-23

Remove explicit dependency declarations from BOM

versions/build.gradle.kts


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects
Copy link
Copy Markdown
Contributor

qodo-free-for-open-source-projects bot commented Feb 23, 2026

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (4) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Lucene requires commented out📘 Rule violation ✓ Correctness
Description
The PR replaces active uses/requires declarations with commented-out lines in
module-info.java, leaving dead/disabled code in the module descriptor. This violates the
requirement to remove commented-out code and can obscure actual runtime/compile-time module
dependencies.
Code

jabgui/src/main/java/module-info.java[R166-170]

+    // uses org.apache.lucene.codecs.lucene103.Lucene103Codec;
+    // requires org.apache.lucene.analysis.common;
+    // requires org.apache.lucene.core;
+    // requires org.apache.lucene.highlighter;
+    // requires org.apache.lucene.queryparser;
Evidence
Compliance ID 16 forbids commented-out code in changed files; the PR introduces commented-out
uses/requires entries for Lucene in jabgui's module-info.java.

AGENTS.md
jabgui/src/main/java/module-info.java[166-170]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Commented-out Lucene `uses`/`requires` directives were introduced in `jabgui`'s `module-info.java`, which violates the no-commented-out-code rule and can hide real module dependency requirements.
## Issue Context
These lines appear in the Lucene section and were changed from active directives to commented code.
## Fix Focus Areas
- jabgui/src/main/java/module-info.java[166-170]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. New dependency-analysis plugin added 📘 Rule violation ⛯ Reliability
Description
The PR introduces the com.autonomousapps.dependency-analysis Gradle plugin, which is a new
dependency/tooling addition. Adding new dependencies without clear necessity/justification violates
the dependency-minimization requirement.
Code

build-logic/src/main/kotlin/org.jabref.gradle.check.dependencies.gradle.kts[R1-3]

+plugins {
+    id("com.autonomousapps.dependency-analysis")
+}
Evidence
Compliance ID 44 requires avoiding new dependencies unless clearly necessary; the PR adds a new
Gradle plugin via a new build-logic plugin script.

AGENTS.md
build-logic/src/main/kotlin/org.jabref.gradle.check.dependencies.gradle.kts[1-3]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A new Gradle plugin dependency (`com.autonomousapps.dependency-analysis`) was added, which violates the rule to avoid new dependencies without clear justification.
## Issue Context
This was introduced as a new build-logic plugin script.
## Fix Focus Areas
- build-logic/src/main/kotlin/org.jabref.gradle.check.dependencies.gradle.kts[1-3]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Invalid task property assignment 🐞 Bug ✓ Correctness
Description
JoinNonCommentedLines declares inputFile/outputFile as abstract val ...Property, but the
task is configured using inputFile = ... / outputFile = .... In Kotlin this attempts to reassign
a val of type RegularFileProperty with a RegularFile, and should fail build script
compilation.
Code

jablib/build.gradle.kts[R162-163]

+    inputFile = layout.projectDirectory.file("../MAINTAINERS")
+    outputFile = layout.buildDirectory.file("maintainers.txt")
Evidence
The task properties are declared as read-only Gradle properties (abstract val ...Property), so
they must be configured via .set(...) on the property, not reassigned. The current code uses
direct assignment in the configuration block.

jablib/build.gradle.kts[142-164]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`JoinNonCommentedLines.inputFile` and `.outputFile` are declared as `abstract val ...Property`. The task configuration currently uses `inputFile = ...` / `outputFile = ...`, which attempts to reassign a read-only property and should fail Gradle Kotlin DSL compilation.
### Issue Context
These properties must be configured by calling `.set(...)` on the `RegularFileProperty`.
### Fix Focus Areas
- jablib/build.gradle.kts[162-163]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

4. Workflow job id misspelled 📘 Rule violation ✓ Correctness
Description
The new GitHub Actions job identifier dependencyscopes is misspelled, reducing clarity and
discoverability in CI configuration. This violates the requirement for correct, meaningful naming.
Code

.github/workflows/tests-code.yml[R58-60]

+  dependencyscopes:
+    name: Dependency Scopes
+    runs-on: ubuntu-latest
Evidence
Compliance ID 12 requires correctly spelled, meaningful identifiers; the PR introduces the job id
dependencyscopes, which is a misspelling of "dependency scopes".

AGENTS.md
.github/workflows/tests-code.yml[58-60]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The workflow job id `dependencyscopes` is misspelled, reducing clarity and consistency.
## Issue Context
This is the YAML key used as the job identifier.
## Fix Focus Areas
- .github/workflows/tests-code.yml[58-60]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. Typo decared in comment 📘 Rule violation ✓ Correctness
Description
A new/modified comment contains a typographical error (decared), which reduces professionalism and
clarity. This violates the requirement to fix typos in modified documentation/comments.
Code

build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[100]

+        // metadata decared these as runtime only, but they are 'requires transitive' in module-info
Evidence
Compliance ID 45 requires modified comments/documentation to be free of obvious typos; the PR
adds/keeps the misspelling decared in a new comment line.

build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[100-100]
Best Practice: Learned patterns

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A modified comment contains a typo (`decared`), violating the requirement to fix typos in changed text.
## Issue Context
The comment documents metadata vs module-info dependency semantics.
## Fix Focus Areas
- build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[100-100]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


6. Unpinned jsobject version 🐞 Bug ⛯ Reliability
Description
The new JDKjsobjectDependencyMetadataRule adds org.openjfx:jdk-jsobject without specifying a
version. This can result in jdk-jsobject resolving to a different version than the JavaFX
component being patched (e.g., javafx-web), defeating the intent of platform+JDK-specific metadata
shaping and potentially causing runtime/packaging inconsistencies.
Code

build-logic/src/main/kotlin/JDKjsobjectDependencyMetadataRule.kt[R38-44]

+            withDependencies {
+                if (minJavaVersion >= 26) {
+                    add("org.openjfx:jdk-jsobject")
+                } else {
+                    removeIf { it.name == "jdk-jsobject" }
+                }
+            }
Evidence
The rule captures the current component version (details.id.version) but does not use it when
adding the jdk-jsobject dependency. The rule is explicitly applied to org.openjfx:javafx-web via
dependencies.components.withModule, so version skew here is directly relevant.

build-logic/src/main/kotlin/JDKjsobjectDependencyMetadataRule.kt[27-45]
build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[39-48]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`JDKjsobjectDependencyMetadataRule` adds `org.openjfx:jdk-jsobject` without a version even though the patched component version is available (`details.id.version`). This risks resolving a `jdk-jsobject` version that differs from the JavaFX artifacts.
### Issue Context
The rule is applied to `org.openjfx:javafx-web` and creates additional variants; keeping versions aligned is important for predictable resolution.
### Fix Focus Areas
- build-logic/src/main/kotlin/JDKjsobjectDependencyMetadataRule.kt[27-45]
- build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts[39-48]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Comment on lines +1 to +3
plugins {
id("com.autonomousapps.dependency-analysis")
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. New dependency-analysis plugin added 📘 Rule violation ⛯ Reliability

The PR introduces the com.autonomousapps.dependency-analysis Gradle plugin, which is a new
dependency/tooling addition. Adding new dependencies without clear necessity/justification violates
the dependency-minimization requirement.
Agent Prompt
## Issue description
A new Gradle plugin dependency (`com.autonomousapps.dependency-analysis`) was added, which violates the rule to avoid new dependencies without clear justification.

## Issue Context
This was introduced as a new build-logic plugin script.

## Fix Focus Areas
- build-logic/src/main/kotlin/org.jabref.gradle.check.dependencies.gradle.kts[1-3]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@koppor koppor added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Feb 23, 2026
@Siedlerchr
Copy link
Copy Markdown
Member

did you run the tests via gradle?

@koppor
Copy link
Copy Markdown
Member

koppor commented Feb 23, 2026

Locally:

grafik

Seems to be different.

@github-actions github-actions bot added status: changes-required Pull requests that are not yet complete and removed status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Feb 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Your pull request conflicts with the target branch.

Please merge with your code. For a step-by-step guide to resolve merge conflicts, see https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line.

@testlens-app

This comment has been minimized.

@jjohannes jjohannes force-pushed the reduce-complexity-in-dependencies-setup branch from 29b4850 to f94052a Compare February 25, 2026 15:12
@testlens-app

This comment has been minimized.

@testlens-app
Copy link
Copy Markdown

testlens-app bot commented Mar 3, 2026

🚨 TestLens detected 46 failed tests 🚨

Here is what you can do:

  1. Inspect the test failures carefully.
  2. If you are convinced that some of the tests are flaky, you can mute them below.
  3. Finally, trigger a rerun by checking the rerun checkbox.

Test Summary

Check Project/Task Test Runs
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > abstractIsCleanedUp()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > findFullTextByDOI()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > findFullTextByTitle()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > findFullTextByTitleWithCurlyBracket()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > findFullTextByTitleWithCurlyBracketAndPartOfAuthor()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > searchEntryByOldId()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > searchEntryByPartOfTitle()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > searchEntryByPartOfTitleWithAcuteAccent()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ArXivFetcherTest > supportsPhraseSearch()
Fetcher Tests / Fetcher tests :jablib:fetcherTest CompositeIdFetcherTest > performSearchByIdReturnsCorrectEntryForIdentifier(String, BibEntry, String) > 1 "performSearchByIdReturnsCorrectEntryForArXivId"
Fetcher Tests / Fetcher tests :jablib:fetcherTest CrawlerTest > whetherAllFilesAreCreated()
Fetcher Tests / Fetcher tests :jablib:fetcherTest CrossRefTest > acceptTitleUnderThreshold()
Fetcher Tests / Fetcher tests :jablib:fetcherTest CrossRefTest > findByAuthors()
Fetcher Tests / Fetcher tests :jablib:fetcherTest CrossRefTest > findWithSubtitle()
Fetcher Tests / Fetcher tests :jablib:fetcherTest CrossRefTest > findWrongAuthor()
Fetcher Tests / Fetcher tests :jablib:fetcherTest CrossRefTest > performSearchByIdFindsPaperWithoutTitle()
Fetcher Tests / Fetcher tests :jablib:fetcherTest DBLPFetcherTest > findSingleEntryUsingComplexOperators()
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidPlainCitationParserTest > grobidPerformSearchCorrectResultTest(String, BibEntry, String) > "example1"
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidPlainCitationParserTest > grobidPerformSearchCorrectResultTest(String, BibEntry, String) > "example2"
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidPlainCitationParserTest > grobidPerformSearchCorrectResultTest(String, BibEntry, String) > "example3"
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidPlainCitationParserTest > grobidPerformSearchCorrectResultTest(String, BibEntry, String) > "example4"
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidPlainCitationParserTest > grobidPerformSearchWithEmptyStringTest()
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidServiceTest > extractsReferencesFromPdf()
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidServiceTest > processEmptyStringTest()
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidServiceTest > processPdfTest()
Fetcher Tests / Fetcher tests :jablib:fetcherTest GrobidServiceTest > processValidCitationTest()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ISIDOREFetcherTest > author()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ISIDOREFetcherTest > checkThesis()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ISIDOREFetcherTest > noResults()
Fetcher Tests / Fetcher tests :jablib:fetcherTest LOBIDIsbnFetcherTest > searchByIdSuccessfulWithLongISBN()
Fetcher Tests / Fetcher tests :jablib:fetcherTest LOBIDIsbnFetcherTest > searchByIdSuccessfulWithShortISBN()
Fetcher Tests / Fetcher tests :jablib:fetcherTest LibraryOfCongressTest > performSearchById()
Fetcher Tests / Fetcher tests :jablib:fetcherTest MedlineFetcherTest > searchByIDSari()
Fetcher Tests / Fetcher tests :jablib:fetcherTest OpenAlexFetcherTest > getURLForQueryBuildsSearchUrl()
Fetcher Tests / Fetcher tests :jablib:fetcherTest OpenAlexFetcherTest > getURLForQueryWithLucene()
Fetcher Tests / Fetcher tests :jablib:fetcherTest OpenAlexFetcherTest > parserParsesResultsArray()
Fetcher Tests / Fetcher tests :jablib:fetcherTest OpenAlexFetcherTest > parserParsesSingleWorkObject()
Fetcher Tests / Fetcher tests :jablib:fetcherTest OpenAlexFetcherTest > searchByQueryFindsEntry()
Fetcher Tests / Fetcher tests :jablib:fetcherTest OpenAlexFetcherTest > searchByQuotedQueryFindsEntry()
Fetcher Tests / Fetcher tests :jablib:fetcherTest PdfMergeMetadataImporterTest > fetchArxivInformationForPdfWithArxivId()
Fetcher Tests / Fetcher tests :jablib:fetcherTest PdfMergeMetadataImporterTest > importRelativizesFilePath()
Fetcher Tests / Fetcher tests :jablib:fetcherTest PdfMergeMetadataImporterTest > pdfMetadataExtractedFrom2024SPLCBecker()
Fetcher Tests / Fetcher tests :jablib:fetcherTest SemanticScholarTest > getDocument()
Fetcher Tests / Fetcher tests :jablib:fetcherTest URLDownloadTest > test429ErrorThrowsFetcherClientException()
Fetcher Tests / Fetcher tests :jablib:fetcherTest URLDownloadTest > test503ErrorThrowsFetcherServerException() 🔇
Fetcher Tests / Fetcher tests :jablib:fetcherTest ZbMATHTest > searchByEntryFindsEntry()
Fetcher Tests / Fetcher tests :jablib:fetcherTest ZbMATHTest > searchByIdInEntryFindsEntry()
Source Code Tests / Database tests :jablib:databaseTest URLDownloadTest > test503ErrorThrowsFetcherServerException() 🔇
Source Code Tests / Unit tests – jablib :jablib:test URLDownloadTest > test503ErrorThrowsFetcherServerException() 🔇

🏷️ Commit: 6858c69
▶️ Tests: 8691 executed | 3 muted
⚪️ Checks: 58/58 completed

Test Failures (first 5 of 46)

ArXivFetcherTest > abstractIsCleanedUp() (:jablib:fetcherTest in Fetcher Tests / Fetcher tests)
org.jabref.logic.importer.FetcherException: arXiv API request failed
URL: https://export.arxiv.org/api/query?id_list=2407.02238&start=0&max_results=1
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.callApi(ArXivFetcher.java:535)
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.queryApi(ArXivFetcher.java:477)
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.searchForEntryById(ArXivFetcher.java:417)
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.performSearchById(ArXivFetcher.java:609)
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.lambda$asyncPerformSearchById$0(ArXivFetcher.java:600)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1789)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1781)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:511)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1450)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2019)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
Caused by: java.io.IOException: Server returned HTTP response code: 429 for URL: https://export.arxiv.org/api/query?id_list=2407.02238&start=0&max_results=1
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:483)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1751)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1321)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1302)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:223)
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.callApi(ArXivFetcher.java:532)
	... 10 more
Caused by: java.io.IOException: Server returned HTTP response code: 429 for URL: https://export.arxiv.org/api/query?id_list=2407.02238&start=0&max_results=1
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1700)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1302)
	at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:493)
	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:307)
	at org.jabref.logic.importer.fetcher.ArXivFetcher$ArXiv.callApi(ArXivFetcher.java:528)
	... 10 more
ArXivFetcherTest > findFullTextByDOI() (:jablib:fetcherTest in Fetcher Tests / Fetcher tests)
org.opentest4j.AssertionFailedError: expected: <Optional[https://arxiv.org/pdf/cond-mat/0406246v1]> but was: <Optional.empty>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:158)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:139)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:201)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:184)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:179)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1188)
	at org.jabref.logic.importer.fetcher.ArXivFetcherTest.findFullTextByDOI(ArXivFetcherTest.java:202)
expected actual
Optional~[https://arxiv~.org/pdf/cond-mat/0406246v1] Optional.empty
ArXivFetcherTest > findFullTextByTitle() (:jablib:fetcherTest in Fetcher Tests / Fetcher tests)
org.opentest4j.AssertionFailedError: expected: <Optional[https://arxiv.org/pdf/cond-mat/0406246v1]> but was: <Optional.empty>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:158)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:139)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:201)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:184)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:179)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1188)
	at org.jabref.logic.importer.fetcher.ArXivFetcherTest.findFullTextByTitle(ArXivFetcherTest.java:229)
expected actual
Optional~[https://arxiv~.org/pdf/cond-mat/0406246v1] Optional.empty
ArXivFetcherTest > findFullTextByTitleWithCurlyBracket() (:jablib:fetcherTest in Fetcher Tests / Fetcher tests)
org.opentest4j.AssertionFailedError: expected: <Optional[https://arxiv.org/pdf/2010.15942v3]> but was: <Optional.empty>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:158)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:139)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:201)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:184)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:179)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1188)
	at org.jabref.logic.importer.fetcher.ArXivFetcherTest.findFullTextByTitleWithCurlyBracket(ArXivFetcherTest.java:236)
expected actual
Optional~[https://arxiv~.org/pdf/2010.15942v3] Optional.empty
ArXivFetcherTest > findFullTextByTitleWithCurlyBracketAndPartOfAuthor() (:jablib:fetcherTest in Fetcher Tests / Fetcher tests)
org.opentest4j.AssertionFailedError: expected: <Optional[https://arxiv.org/pdf/2010.15942v3]> but was: <Optional.empty>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:158)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:139)
	at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:201)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:184)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:179)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1188)
	at org.jabref.logic.importer.fetcher.ArXivFetcherTest.findFullTextByTitleWithCurlyBracketAndPartOfAuthor(ArXivFetcherTest.java:268)
expected actual
Optional~[https://arxiv~.org/pdf/2010.15942v3] Optional.empty

Muted Tests

Select tests to mute in this pull request:

  • ArXivFetcherTest > abstractIsCleanedUp()
  • ArXivFetcherTest > findFullTextByDOI()
  • ArXivFetcherTest > findFullTextByTitle()
  • ArXivFetcherTest > findFullTextByTitleWithCurlyBracket()
  • ArXivFetcherTest > findFullTextByTitleWithCurlyBracketAndPartOfAuthor()
  • ArXivFetcherTest > searchEntryByOldId()
  • ArXivFetcherTest > searchEntryByPartOfTitle()
  • ArXivFetcherTest > searchEntryByPartOfTitleWithAcuteAccent()
  • ArXivFetcherTest > supportsPhraseSearch()
  • CompositeIdFetcherTest > performSearchByIdReturnsCorrectEntryForIdentifier(String, BibEntry, String)
  • CrawlerTest > whetherAllFilesAreCreated()
  • CrossRefTest > acceptTitleUnderThreshold()
  • CrossRefTest > findByAuthors()
  • CrossRefTest > findWithSubtitle()
  • CrossRefTest > findWrongAuthor()
  • CrossRefTest > performSearchByIdFindsPaperWithoutTitle()
  • DBLPFetcherTest > findSingleEntryUsingComplexOperators()
  • GrobidPlainCitationParserTest > grobidPerformSearchCorrectResultTest(String, BibEntry, String)
  • GrobidPlainCitationParserTest > grobidPerformSearchWithEmptyStringTest()
  • GrobidServiceTest > extractsReferencesFromPdf()
  • GrobidServiceTest > processEmptyStringTest()
  • GrobidServiceTest > processPdfTest()
  • GrobidServiceTest > processValidCitationTest()
  • ISIDOREFetcherTest > author()
  • ISIDOREFetcherTest > checkThesis()
  • ISIDOREFetcherTest > noResults()
  • LOBIDIsbnFetcherTest > searchByIdSuccessfulWithLongISBN()
  • LOBIDIsbnFetcherTest > searchByIdSuccessfulWithShortISBN()
  • LibraryOfCongressTest > performSearchById()
  • MedlineFetcherTest > searchByIDSari()
  • OpenAlexFetcherTest > getURLForQueryBuildsSearchUrl()
  • OpenAlexFetcherTest > getURLForQueryWithLucene()
  • OpenAlexFetcherTest > parserParsesResultsArray()
  • OpenAlexFetcherTest > parserParsesSingleWorkObject()
  • OpenAlexFetcherTest > searchByQueryFindsEntry()
  • OpenAlexFetcherTest > searchByQuotedQueryFindsEntry()
  • PdfMergeMetadataImporterTest > fetchArxivInformationForPdfWithArxivId()
  • PdfMergeMetadataImporterTest > importRelativizesFilePath()
  • PdfMergeMetadataImporterTest > pdfMetadataExtractedFrom2024SPLCBecker()
  • SemanticScholarTest > getDocument()
  • URLDownloadTest > test429ErrorThrowsFetcherClientException()
  • URLDownloadTest > test503ErrorThrowsFetcherServerException()
  • ZbMATHTest > searchByEntryFindsEntry()
  • ZbMATHTest > searchByIdInEntryFindsEntry()

Reuse successful test results:

  • ♻️ Only rerun the tests that failed or were muted before

Click the checkbox to trigger a rerun:

  • Rerun jobs

Learn more about TestLens at testlens.app.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

The build of this PR is available at https://builds.jabref.org/pull-15194/.

@koppor koppor enabled auto-merge March 3, 2026 09:03
Copy link
Copy Markdown
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Fetcher tests: I checked arXiv - runs locally. So some strange CI behavior
  • JabKitLauncher: We need to check as soon as jablib-SNAPSHOT is on maven central.

io.github.darvil.terminal.textformatter=io.github.darvil82:terminal-text-formatter
io.github.eadr=io.github.adr:e-adr
jul.to.slf4j=org.slf4j:jul-to-slf4j
mslinks=com.github.vatbub:mslinks
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Future: org.jabref:mslinks - can I simply replace this or do I need to take care more?

Refs DmitriiShamrikov/mslinks#29

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to change the coordinates for mslink you need to change it here and here for the version:

api("com.github.vatbub:mslinks:1.0.6.2")

Explanation: For the version, we use the coordinates and not the module name (which we could, the plugin supports that) so that Dependabot can understand the versions/build.gradle.kts file. Hence the two places.

@koppor koppor removed the status: changes-required Pull requests that are not yet complete label Mar 3, 2026
@koppor koppor disabled auto-merge March 3, 2026 09:09
@koppor koppor merged commit 30df54f into main Mar 3, 2026
55 of 59 checks passed
@koppor koppor deleted the reduce-complexity-in-dependencies-setup branch March 3, 2026 09:09
priyanshu16095 pushed a commit to priyanshu16095/jabref that referenced this pull request Mar 3, 2026
@koppor
Copy link
Copy Markdown
Member

koppor commented Mar 4, 2026

@jjohannes I would need some small howto how to add a new dependency. I was used to dependencies, but this is gone now ^^.

@jjohannes
Copy link
Copy Markdown
Collaborator Author

@koppor good point. I have something here that I can reusr and adjust for JabRef I believe.

https://github.com/hiero-ledger/hiero-gradle-conventions?tab=readme-ov-file#defining-modules-and-dependencies-in-a-project-that-uses-these-plugins

Where would be a good place for this?

@koppor
Copy link
Copy Markdown
Member

koppor commented Mar 4, 2026

@koppor good point. I have something here that I can reusr and adjust for JabRef I believe.

Nice!

Where would be a good place for this?

https://github.com/JabRef/jabref/tree/main/docs/code-howtos --> new file dependency-management.md.

Proposal:

---
parent: Code Howtos
---
# Dependency management

## Adding a dependency

@jjohannes
Copy link
Copy Markdown
Collaborator Author

Proposal for docs: #15278

Siedlerchr added a commit that referenced this pull request Mar 5, 2026
…rg.openrewrite.recipe-rewrite-recipe-bom-3.25.0

* upstream/main: (35 commits)
  Chore: add dependency-management.md (#15278)
  Chore(deps): Bump dev.langchain4j:langchain4j-bom in /versions (#15277)
  New Crowdin updates (#15274)
  Chore(deps): Bump actions/upload-artifact from 6 to 7 (#15271)
  Chore(deps): Bump actions/download-artifact from 7 to 8 (#15270)
  Chore(deps): Bump docker/login-action from 3 to 4 (#15268)
  Fix threading issues in citations relations tab (#15233)
  Fix: Citavi XML importer now preserves citation keys (#14658) (#15257)
  Preserve no break spaces in Latex to Unicode conversion (#15174)
  Fix: open javafx.scene.control.skin to controlsfx (#15260)
  Reduce complexity in dependencies setup (restore) (#15194)
  New translations jabref_en.properties (French) (#15256)
  Fix: exception dialog shows up when moving sidepanel down/up (#15248)
  Implement reset for Name Display Preferences (#15136)
  Chore(deps): Bump net.bytebuddy:byte-buddy in /versions (#15252)
  Chore(deps): Bump io.zonky.test.postgres:embedded-postgres-binaries-bom (#15253)
  Chore(deps): Bump io.zonky.test:embedded-postgres in /versions (#15254)
  Chore(deps): Bump net.ltgt.errorprone from 5.0.0 to 5.1.0 in /jablib (#15251)
  New Crowdin updates (#15247)
  Refined the "Select files to import" page in "Search for unlinked local files" dialog (#15110)
  ...
f0restron07 pushed a commit to f0restron07/jabref that referenced this pull request Mar 12, 2026
@koppor
Copy link
Copy Markdown
Member

koppor commented Mar 17, 2026

I think, this broke my Docker image optimization

RUN ./gradlew --no-daemon :build-logic:jar

Maybe, I just need one more copy statement...


#32 [build 21/23] RUN ./gradlew --no-daemon :build-logic:jar
#32 0.751 To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.5.0-20260305230000+0000/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
#32 1.750 Daemon will be stopped at the end of the build 
#32 2.150 Parallel Configuration Cache is an incubating feature.
#32 3.150 Calculating task graph as no cached configuration is available for tasks: :build-logic:jar
#32 32.05 > Task :build-logic:checkKotlinGradlePluginConfigurationErrors SKIPPED
#32 34.35 > Task :build-logic:generateExternalPluginSpecBuilders
#32 34.35 > Task :build-logic:extractPrecompiledScriptPluginPlugins
#32 41.85 > Task :build-logic:generateScriptPluginAdapters
#32 41.85 > Task :build-logic:pluginDescriptors
#32 41.95 > Task :build-logic:processResources
#32 48.35 > Task :build-logic:compilePluginsBlocks
#32 62.75 > Task :build-logic:generatePrecompiledScriptPluginAccessors
#32 78.35 > Task :build-logic:compileKotlin
#32 78.35 > Task :build-logic:compileJava NO-SOURCE
#32 78.36 > Task :build-logic:classes
#32 78.55 > Task :build-logic:jar
#32 88.95 
#32 88.95 FAILURE: Build failed with an exception.
#32 88.95 
#32 88.95 * Where:
#32 88.95 Build file '/build/test-support/build.gradle.kts' line: 1

@jjohannes
Copy link
Copy Markdown
Collaborator Author

@koppor what is the exception? I think it is missing from the message above.

You can also run ./gradlew help. I don't know if that is "better", but it also builds the build-logic, because build-logic is required to configure any build. Also a simple help.

I don't know your full setup, so I am not sure if this is the right advice. In general, you can do something like this:

In general, something more you can do is running ./gradlew assemble --dry-run and then make sure the Gradle User Home – ~/.gradle by default – is preserved/copied. It contains the caches with the downloaded dependencies and the patched/transformed Jar files.

@jjohannes
Copy link
Copy Markdown
Collaborator Author

I checked your logs. This is the problem your are facing, right?

#32 94.73 > Failed to apply plugin 'org.jabref.gradle.base.dependency-rules'.
#32 94.73    > Project with path ':jabgui' could not be found.

IIUC it is caused, because you only do a partial copy of the project. The current setup is build around the src/main/java/module-info.java files. If you copy these files as well for all JabRef modules, it probably works again.

Alternatively, we could adjust org.jabref.gradle.base.dependency-rules to not expect the projects to be always present. By putting checks around each of these lines: https://github.com/JabRef/jabref/blob/main/build-logic/src/main/kotlin/org.jabref.gradle.base.dependency-rules.gradle.kts#L17-L20
But this may lead to a different version selection in the "reduced" project. I think the solution above (copying module-info files) is better if it works.

@koppor
Copy link
Copy Markdown
Member

koppor commented Mar 17, 2026

Thank you for the quik reaction - f2b7b14 (#15357)

@koppor koppor mentioned this pull request Mar 17, 2026
3 tasks
Comment on lines +37 to +44
// depending on the JDK version, 'jsobject' is pulled in as extra dependency or not
withDependencies {
if (minJavaVersion >= 26) {
add("org.openjfx:jdk-jsobject")
} else {
removeIf { it.name == "jdk-jsobject" }
}
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't work for JabLib

Image

Refs adoptium/temurin-build#2883 (comment)


Not 100% sure how to fix - just adding as hard dependency? Some monkey patching at jvmDependencyConflicts.patch ? But this is not transported downstream I suppose.

@jjohannes

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should work if you run via Gradle.
Can you remind me how the dependencies are found by the jbang command?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It creates a pom and then uses maven AFAIK

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did it work, before the change in this PR?

Can you please explain, which pom.xml files jbang picks up from where? Do you first run the Gradle build and then publish the Jars/POMs somewhere? I would like to understand the complete flow to suggest a proper fix. Feel free to point me at the places in corresponding places in the GH pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev: binaries Binary builds should be uploaded to builds.jabref.org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants