Skip to content

failure to build #462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wzydhek opened this issue Oct 27, 2024 · 6 comments
Open

failure to build #462

wzydhek opened this issue Oct 27, 2024 · 6 comments

Comments

@wzydhek
Copy link

wzydhek commented Oct 27, 2024

I am trying to build jd-gui on my window system. I followed the snippet on the readme "How to build JD-GUI ?"

git clone https://github.com/java-decompiler/jd-gui.git
cd jd-gui
./gradlew build

and it gives me an error:

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project 'jd-gui'.

Could not resolve all artifacts for configuration ':classpath'.
Could not find edu.sc.seis.gradle:launch4j:2.4.4.
Searched in the following locations:
- https://jcenter.bintray.com/edu/sc/seis/gradle/launch4j/2.4.6/launch4j-2.4.6.pom
- https://jcenter.bintray.com/edu/sc/seis/gradle/launch4j/2.4.6/launch4j-2.4.6.jar
Required by:
project :

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2s

how can I correct this problem. I am new to gradle

@Harshil783
Copy link

flutter/flutter#23553 (comment)

Try the steps in this issue and see it helps

@wzydhek
Copy link
Author

wzydhek commented Nov 6, 2024

ok again, I am new to gradle, but managed to get it to pull the dependency for launch4j. Having problems getting it to pull the dependency jd-core-1.1.3. the link maven's repository has leads to file not found

@Harshil783
Copy link

List the steps it would help me know what you might have done wrong.

The issue I have referenced talks about the same thing you are facing at least to an extent, implement them and give the error here.

@wzydhek
Copy link
Author

wzydhek commented Nov 10, 2024

I did the steps mentioned iin the readme.

git clone https://github.com/java-decompiler/jd-gui.git
cd jd-gui
./gradlew build

It appears that jd-gui is using out-of-date libraries or something, as those libraries can no longer be found automatically from designated sources.

@darkwaves-ofc
Copy link

This error is happening because the build is trying to download dependencies from jcenter, which was deprecated and eventually shut down. The repository URL it's trying to use (https://jcenter.bintray.com) is no longer available.

Here's how to fix it:

  1. Navigate to the root project directory of jd-gui
  2. Open the file build.gradle in a text editor
  3. Look for any repositories section that references jcenter()
  4. Replace jcenter() with mavenCentral() or make sure mavenCentral() is included alongside it

You'll likely need to edit the repositories section to look something like this:

repositories {
    mavenCentral()
    // Remove or comment out jcenter() if present
}

If there are multiple build.gradle files, make this change in all of them. The main issue is that the build is trying to find the launch4j plugin from the now-defunct jcenter repository.

Alternatively, you could try a more recent version of the project if available, as newer commits might have already addressed this repository issue.

After making these changes, run the build command again:

./gradlew build

If you're on Windows and using the command prompt rather than Git Bash, you would use:

gradlew.bat build

This should help resolve the dependency resolution issue by pointing Gradle to the Maven Central repository instead of the defunct jcenter.

@VoidNullWarp
Copy link

Hmm, it doesn't seem to work, looks like both packages that i had a error with, jd-core and the edu.sc, don't exist on both repo's. out of desperation, i had removed the edu.sc package and it worked... until it hit another error, and couldn't resolve jd-core.

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

No branches or pull requests

4 participants