Skip to content

Replace JCenter with Maven Central to fix build failure#468

Open
killerdevildog wants to merge 1 commit intojava-decompiler:masterfrom
killerdevildog:fix-issue-462
Open

Replace JCenter with Maven Central to fix build failure#468
killerdevildog wants to merge 1 commit intojava-decompiler:masterfrom
killerdevildog:fix-issue-462

Conversation

@killerdevildog
Copy link

  • Replace jcenter() with mavenCentral() in buildscript and allprojects repositories
  • Add gradlePluginPortal() for plugin dependencies not available in Maven Central
  • Add JitPack repository for dependencies hosted on GitHub
  • Update jd-core dependency to use GitHub via JitPack (com.github.java-decompiler:jd-core)
  • Update launch4j plugin to use correct group ID for Gradle Plugin Portal

Fixes #462: JCenter repository was shut down in 2021, causing build failures when resolving dependencies. All dependencies now resolve successfully from active Maven repositories.

- Replace jcenter() with mavenCentral() in buildscript and allprojects repositories
- Add gradlePluginPortal() for plugin dependencies not available in Maven Central
- Add JitPack repository for dependencies hosted on GitHub
- Update jd-core dependency to use GitHub via JitPack (com.github.java-decompiler:jd-core)
- Update launch4j plugin to use correct group ID for Gradle Plugin Portal

Fixes java-decompiler#462: JCenter repository was shut down in 2021, causing build failures
when resolving dependencies. All dependencies now resolve successfully from
active Maven repositories.
@Boat2017
Copy link

Boat2017 commented Aug 4, 2025 via email

@StevenJack666
Copy link

StevenJack666 commented Aug 4, 2025 via email

@niansa
Copy link

niansa commented Aug 4, 2025

Don't waste your time, this user is just posting a whole bunch of AI slop on GitHub to up the PR counter in his resume.

@enimiste
Copy link

Doesn't work.
check the working solution here #470

@killerdevildog
Copy link
Author

Hi all, wanted to address a couple of things here.

@enimiste — The claim that this "doesn't work" isn't accurate. Here are step-by-step instructions anyone can follow to verify:

# 1. Clone the repo and checkout this PR
git clone https://github.com/java-decompiler/jd-gui.git
cd jd-gui
gh pr checkout 468

# 2. Verify you're using Java 8 (which this project targets)
java -version
# Should show 1.8.x — if not, set JAVA_HOME:
# export JAVA_HOME=/path/to/java-8

# 3. Build the entire project
./gradlew clean build

# 4. Verify all artifacts were produced
ls build/libs/          # jd-gui-1.6.6.jar and jd-gui-1.6.6-min.jar
ls build/distributions/  # .deb, .rpm, osx .tar/.zip, windows .tar/.zip
ls build/launch4j/       # jd-gui.exe

# 5. Run the application
java -jar build/libs/jd-gui-1.6.6.jar

The build completes successfully with all 24 tasks — JAR, minified JAR, Windows EXE, DEB, RPM, and OSX distributions are all produced. The test suite passes including a dedicated test that verifies jd-core resolves correctly from JitPack and the decompiler functions properly (decompiling classes and producing valid Java source output).

If the build fails for you, it's likely because you're running a JDK newer than 8. Gradle 5.2.1 doesn't support Java 9+. That's a separate issue from the JCenter migration and would affect #470 equally since it also uses Gradle 5.2.1.

Regarding #470, with respect, that PR vendors 4 binary JAR files directly into the git repository, bumps the launch4j plugin version from 2.4.4 to 2.4.6 (unrelated to the issue), adds xstream as an explicit dependency (it's a transitive dep of launch4j), and modifies launch4j configuration syntax to accommodate the unnecessary version bump. Committing binaries into git permanently inflates the repository size, bypasses dependency checksum verification, and turns future dependency updates into a manual download-and-commit process. This PR instead solves the root cause: pointing to repositories that are still online, with the same library versions and zero binary files.

@niansa — I appreciate the skepticism, but this PR is a focused, minimal fix for a real build-breaking issue (#462). It changes exactly two things: the repository URLs (since JCenter shut down in 2021) and the jd-core artifact coordinates (since it was never published to Maven Central, only JCenter). I've since added a test that verifies jd-core resolves correctly and the decompiler is fully functional. If anything, #470 — which vendors unverified binary JARs, bundles unnecessary version bumps, and includes unrelated configuration changes — is closer to the kind of unfocused approach you were concerned about.

I'm happy to discuss any specific technical concerns about this PR.

@enimiste
Copy link

Hi @killerdevildog

Thank you for your replay
I will follow these steps and then share with you my feedback.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

failure to build

5 participants