Skip to content

Conversation

@koppor
Copy link
Member

@koppor koppor commented Jan 21, 2026

User description

This continuos downloading introduced many issues.

We just mirror it at https://github.com/JabRef/ltwa

Steps to test

See JabRef compiling

Mandatory checks


PR Type

Enhancement


Description

  • Replace continuous LTWA file downloads with Git submodule

  • Remove download plugin dependency from build configuration

  • Update build task to use submodule LTWA CSV file

  • Simplify build process by eliminating external download step


Diagram Walkthrough

flowchart LR
  A["LTWA Download Task"] -->|removed| B["Build Process"]
  C["Git Submodule ltwa"] -->|added| D["Build Resources"]
  E["Download Plugin"] -->|removed| F["Build Configuration"]
  D -->|provides| G["ltwa_20210702.csv"]
  G -->|input to| H["generateLtwaListMV Task"]
Loading

File Walkthrough

Relevant files
Configuration changes
.gitmodules
Add LTWA Git submodule configuration                                         

.gitmodules

  • Added new Git submodule entry for LTWA resources
  • Points to https://github.com/JabRef/ltwa.git repository
  • Configured at path jablib/src/main/resources/ltwa
+3/-0     
build.gradle.kts
Remove download task, use submodule LTWA file                       

jablib/build.gradle.kts

  • Removed org.jabref.gradle.feature.download plugin dependency
  • Deleted downloadLtwaFile Gradle task that fetched LTWA from external
    URL
  • Updated generateLtwaListMV task to read LTWA CSV from submodule path
  • Removed onlyIf condition from generateLtwaListMV task
+1/-12   
Dependencies
ltwa
Add LTWA submodule reference                                                         

jablib/src/main/resources/ltwa

  • New Git submodule entry pointing to LTWA repository
  • Contains LTWA CSV file for journal abbreviation generation
+1/-0     

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

qodo-free-for-open-source-projects bot commented Jan 21, 2026

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
Submodule integrity risk

Description: The submodule URL uses HTTPS without commit hash pinning, allowing potential supply chain
attacks if the upstream repository is compromised or modified.
.gitmodules [16-18]

Referred Code
[submodule "jablib/src/main/resources/ltwa"]
  path = jablib/src/main/resources/ltwa
  url = https://github.com/JabRef/ltwa.git
Unverified submodule dependency

Description: The build process now relies on a relative path
(../src/main/resources/ltwa/ltwa_20210702.csv) to access submodule content without
verifying file integrity or existence, which could lead to build failures or use of
tampered data if the submodule is not properly initialized.
build.gradle.kts [286-286]

Referred Code
inputs.file(layout.buildDirectory.file("../src/main/resources/ltwa/ltwa_20210702.csv"))
val ltwaListMv = layout.buildDirectory.file("generated/resources/journals/ltwa-list.mv")
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
Missing file validation: The task no longer validates if the LTWA CSV file exists before processing, which could
lead to build failures without clear error messages.

Referred Code
inputs.file(layout.buildDirectory.file("../src/main/resources/ltwa/ltwa_20210702.csv"))
val ltwaListMv = layout.buildDirectory.file("generated/resources/journals/ltwa-list.mv")

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status:
Submodule integrity validation: The build now relies on a Git submodule without validating the integrity or authenticity
of the LTWA CSV file content.

Referred Code
inputs.file(layout.buildDirectory.file("../src/main/resources/ltwa/ltwa_20210702.csv"))
val ltwaListMv = layout.buildDirectory.file("generated/resources/journals/ltwa-list.mv")

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

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

qodo-free-for-open-source-projects bot commented Jan 21, 2026

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Configure submodule for performance and consistency

Add shallow = true and ignore = all to the new submodule configuration for
consistency with other submodules and for performance benefits.

.gitmodules [16-18]

 [submodule "jablib/src/main/resources/ltwa"]
   path = jablib/src/main/resources/ltwa
   url = https://github.com/JabRef/ltwa.git
+  ignore = all
+  shallow = true
  • Apply / Chat
Suggestion importance[1-10]: 5

__

Why: The suggestion correctly identifies an inconsistency with other submodules and proposes adding shallow = true and ignore = all for better performance and to prevent accidental commits, which is a valid improvement.

Low
Use a more robust file path

Replace the relative file path starting from the buildDirectory with a more
robust path anchored to the projectDirectory.

jablib/build.gradle.kts [286]

-inputs.file(layout.buildDirectory.file("../src/main/resources/ltwa/ltwa_20210702.csv"))
+inputs.file(layout.projectDirectory.file("src/main/resources/ltwa/ltwa_20210702.csv"))
  • Apply / Chat
Suggestion importance[1-10]: 4

__

Why: The suggestion correctly identifies that using a relative path with ../ from the build directory is brittle and proposes a more robust solution using layout.projectDirectory, which is a good practice.

Low
  • Update

@koppor koppor added the automerge PR is tagged with that label will be merged if workflows are green label Jan 21, 2026
jabref-machine
jabref-machine previously approved these changes Jan 21, 2026
@koppor koppor enabled auto-merge January 21, 2026 21:07
@koppor koppor added this pull request to the merge queue Jan 21, 2026
Merged via the queue into main with commit d1c97d6 Jan 21, 2026
54 checks passed
@koppor koppor deleted the ltwa-submodule branch January 21, 2026 22:09
Siedlerchr added a commit that referenced this pull request Jan 21, 2026
* upstream/just-jdk25:
  Use LTWA file from mirror (#14892)
  Re-enable JavaDoc formatting (#14860)
Siedlerchr added a commit that referenced this pull request Jan 22, 2026
…ging-at-installation

* upstream/main:
  Use LTWA file from mirror (#14892)
  Re-enable JavaDoc formatting (#14860)
  chore(deps): update dependency org.glassfish.grizzly:grizzly-http-server to v5 (#14882)
  chore(deps): update dependency org.glassfish.grizzly:grizzly-framework to v5 (#14881)
  Chore(deps): Bump jablib/src/main/resources/csl-styles (#14864)
  chore(deps): update dependency com.konghq:unirest-modules-gson to v4.7.4 (#14880)
@koppor koppor mentioned this pull request Jan 24, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge PR is tagged with that label will be merged if workflows are green Review effort 2/5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants