UnderMybrella / EternalJukebox

The internal workings for the Eternal Jukebox, a rehosting of the Infinite Jukebox
https://eternalbox.dev
MIT License
792 stars 149 forks source link

Docker build failing due to Gradle deprecation error #179

Open caesarakalaeii opened 1 year ago

caesarakalaeii commented 1 year ago

Before

Description

After using docker-compose up -d, the build fails due to an deprecation error.

Console Logs

0 21.61 0 21.61 FAILURE: Build failed with an exception. 0 21.61 0 21.61 What went wrong: 0 21.61 org.gradle.api.artifacts.dsl.DependencyHandler.registerTransform(Lorg/gradle/api/Action;)V 0 21.61 0 21.61 Try: 0 21.61 > Run with --stacktrace option to get the stack trace. 0 21.61 > Run with --info or --debug option to get more log output. 0 21.61 > Run with --scan to get full insights. 0 21.61 > Get more help at https://help.gradle.org. 0 21.61 0 21.61 Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. 0 21.61 0 21.61 You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. 0 21.61 0 21.61 For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. 0 21.61 0 21.61 BUILD FAILED in 21s failed to solve: executor failed running [/bin/sh -c cd EternalJukebox && gradle clean shadowJar --no-daemon]: exit code: 1

Additional Information

I've checked the other Issues regarding deprecation and gradle, however was unable to find the Error * What went wrong: 0 21.61 org.gradle.api.artifacts.dsl.DependencyHandler.registerTransform(Lorg/gradle/api/Action;)V

nicjohnston commented 1 year ago

Have you found a solution to this? I ran into the same problem trying to run locally since the mirror I was sent is broken. https://www.eternalboxmirror.xyz/jukebox_go.html?id=1zwMYTA5nlNjZxYrvBB2pV

D-Molohon commented 1 year ago

In the build.gradle file, I was able to change the some versions for Kotlin and Shadow to bypass this error and complete the build, I'm definitely not an expert here and was taking my shot in the dark.

plugins {
    id 'java'
    id 'application'
    id 'org.jetbrains.kotlin.jvm' version '1.6.0'
    id 'com.github.johnrengelman.shadow' version '8.1.1'
}

apply plugin: 'kotlin'

mainClassName = "org.abimon.eternalJukebox.EternalJukebox"

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
    mavenCentral()
    jcenter()
    maven { url 'https://jitpack.io' }
    maven { url 'https://maven.brella.dev' }
}

ext {
    kotlin_version = '1.6.0'
    vertx_version = '3.9.0'
    jackson_version = '2.9.2'
}
nicjohnston commented 1 year ago

@D-Molohon Cool, thanks. I'll try this fix over the weekend

Jarmahent commented 5 months ago

@D-Molohon Error is still occurring for me even with the version provided above

D-Molohon commented 5 months ago

@D-Molohon Error is still occurring for me even with the version provided above

It may now be a newer version than when I had tested it, I’m certainly no expert in maintaining this. Feel free to test with newer version numbers than I have listed where I made changes.

I also know there are some hosted versions out there that are currently working! I can’t remember them off the top of my head, sadly.

Good luck and Godspeed in your endeavors, friend!

Ok2dot0 commented 1 month ago

Now there appeared a new part in the error message about some dependencies:

The log: https://pastebin.com/uZg31DCt

pi@dell:~/asd/EternalJukebox$ sudo docker-compose up -d
WARN[0000] /home/pi/asd/EternalJukebox/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
[+] Running 1/1
 ! main Warning pull access denied for eternaljukebox, repository does not exist or may require 'docker login': denied: requested access to the resource is denied                     1.4s
[+] Building 50.7s (17/21)                                                                                                                                                   docker:default
 => [main internal] load build definition from Dockerfile                                                                                                                              0.0s
 => => transferring dockerfile: 1.52kB                                                                                                                                                 0.0s
 => [main internal] load .dockerignore                                                                                                                                                 0.0s
 => => transferring context: 128B                                                                                                                                                      0.0s
 => [main internal] load metadata for docker.io/jekyll/jekyll:stable                                                                                                                   0.7s
 => [main internal] load metadata for docker.io/library/adoptopenjdk:8-jdk-hotspot                                                                                                     0.7s
 => [main internal] load metadata for docker.io/library/gradle:jdk8                                                                                                                    0.7s
 => [main internal] load build context                                                                                                                                                 0.0s
 => => transferring context: 13.88kB                                                                                                                                                   0.0s
 => [main deps 1/3] FROM docker.io/library/adoptopenjdk:8-jdk-hotspot@sha256:b573593b66c9b8e3d53a3686561e4d2416ae999c9137323a4962cf8ff3fcce4d                                          0.0s
 => [main jekyll-build 1/4] FROM docker.io/jekyll/jekyll:stable@sha256:400b8d1569f118bca8a3a09a25f32803b00a55d1ea241feaf5f904d66ca9c625                                                0.0s
 => [main gradle-build 1/6] FROM docker.io/library/gradle:jdk8@sha256:10caffc0ec6c3d7639ac16e72533c0d89e366f9bbe661fe474a1dac1dac3a8a8                                                 0.0s
 => CACHED [main jekyll-build 2/4] WORKDIR /EternalJukebox                                                                                                                             0.0s
 => CACHED [main deps 2/3] WORKDIR /EternalJukebox                                                                                                                                     0.0s
 => CANCELED [main deps 3/3] RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp     && chmod a+rx /usr/local/bin/yt-dlp     && ap  49.9s
 => CACHED [main gradle-build 2/6] WORKDIR /home/gradle/project                                                                                                                        0.0s
 => [main gradle-build 3/6] COPY build.gradle gradle.propertie* settings.gradle ./EternalJukebox/                                                                                      0.0s
 => [main gradle-build 4/6] RUN gradle clean shadowJar --no-daemon > /dev/null 2>&1 || true                                                                                            2.2s
 => [main gradle-build 5/6] COPY . ./EternalJukebox                                                                                                                                    0.0s
 => ERROR [main gradle-build 6/6] RUN  cd EternalJukebox     && gradle clean shadowJar --no-daemon                                                                                    47.4s
------
 > [main gradle-build 6/6] RUN  cd EternalJukebox     && gradle clean shadowJar --no-daemon:
1.034 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/8.10.1/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
1.833 Daemon will be stopped at the end of the build
46.83
46.83 FAILURE: Build failed with an exception.
46.83
46.83 * What went wrong:
46.83 Could not determine the dependencies of task ':shadowJar'.
46.83 > Could not resolve all dependencies for configuration ':runtimeClasspath'.
46.83    > Could not resolve org.abimon:Visi:34.
46.83      Required by:
46.83          root project :
46.83       > Could not resolve org.abimon:Visi:34.
46.83          > Could not get resource 'https://maven.brella.dev/org/abimon/Visi/34/Visi-34.pom'.
46.83             > Could not GET 'https://maven.brella.dev/org/abimon/Visi/34/Visi-34.pom'. Received status code 522 from server:
46.83    > Could not resolve org.abimon:UnitsKeptSimple:2.
46.83      Required by:
46.84          root project :
46.84       > Could not resolve org.abimon:UnitsKeptSimple:2.
46.84          > Could not get resource 'https://maven.brella.dev/org/abimon/UnitsKeptSimple/2/UnitsKeptSimple-2.pom'.
46.84             > Could not GET 'https://maven.brella.dev/org/abimon/UnitsKeptSimple/2/UnitsKeptSimple-2.pom'. Received status code 522 from server:
46.84
46.84 * Try:
46.84 > Run with --stacktrace option to get the stack trace.
46.84 > Run with --info or --debug option to get more log output.
46.84 > Run with --scan to get full insights.
46.84 > Get more help at https://help.gradle.org.
46.84
46.84 Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
46.84
46.84 You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
46.84
46.84 For more on this, please refer to https://docs.gradle.org/8.10.1/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
46.84
46.84 BUILD FAILED in 46s
------
failed to solve: process "/bin/sh -c cd EternalJukebox     && gradle clean shadowJar --no-daemon" did not complete successfully: exit code: 1
floriegl commented 1 month ago

The Maven server from UnderMybrella (https://maven.brella.dev) is down since some months and is most likely not coming back. The two projects which where the dependency can't get resolved are:

But they are available under JitPack at https://jitpack.io/#undermybrella/UnitsKeptSimple/master-SNAPSHOT and https://jitpack.io/#undermybrella/Visi/master-SNAPSHOT. Just replace the

    implementation 'org.abimon:Visi:34'
    implementation 'org.abimon:UnitsKeptSimple:2'

with

    implementation 'com.github.undermybrella:Visi:master-SNAPSHOT'
    implementation 'com.github.undermybrella:UnitsKeptSimple:master-SNAPSHOT'

in the build.gradle file and I would also suggest removing the maven { url 'https://maven.brella.dev' } line.

But as this repository isn't really maintained anymore, I would actually recommend using my fork under https://github.com/floriegl/EternalJukebox, as I fixed this issue there, cleaned up a lot of the code and added some new features. The README isn't really updated, but running it with docker compose should just work (please check out the comment in the docker-compose.yml file). My fork is also currently running under https://eternalbox.floriegl.tech and https://eternalboxmirror.xyz.