TheBoegl / gradle-launch4j

A gradle-plugin to create windows executables with launch4j
Apache License 2.0
298 stars 40 forks source link

Gradle tries to download launch4j 3.0.3 plugin from jcenter #156

Closed csteuer closed 11 months ago

csteuer commented 11 months ago

Hi,

Today I tried to build one of my projects which uses launch4j with github workflows and got this error:

> Could not resolve all files for configuration ':classpath'.
   > Could not resolve net.sf.launch4j:launch4j:3.50.
     Required by:
         project : > edu.sc.seis.launch4j:edu.sc.seis.launch4j.gradle.plugin:3.0.3 > edu.sc.seis.launch4j:launch4j:3.0.3
      > Could not resolve net.sf.launch4j:launch4j:3.50.
         > Could not get resource 'https://plugins.gradle.org/m2/net/sf/launch4j/launch4j/3.50/launch4j-3.50.pom'.
            > Could not HEAD 'https://jcenter.bintray.com/net/sf/launch4j/launch4j/3.50/launch4j-3.50.pom'. Received status code 502 from server: Bad Gateway

Here are the relevant contents of the gradle file:

plugins {
    id 'application'
    id 'edu.sc.seis.launch4j' version '3.0.3'
}

repositories {
    mavenCentral()
}

I could build the project a week ago, the configuration has not changed since then.

As far as I know, jcenter has not been available for a long time. I have no idea why gradle suddenly tries to download launch4j from there. Any ideas what I can do to fix the build?

thc202 commented 11 months ago

I'd expect this to work again in some hours, but for workaround see https://docs.gradle.org/current/userguide/plugins.html#sec:custom_plugin_repositories You'll have to specify first mavenCentral() and then gradlePluginPortal().

TheBoegl commented 11 months ago

@csteuer, is this still not working for you?

csteuer commented 11 months ago

@TheBoegl Yes, it's working again. Seems like this was a temporary issue, like @thc202 suggested.

I tried adding gradlePluginPortal() as the last repository when it was not working, but still got the same issue. Adding another repository that I found via https://mvnrepository.com/ solved the issue for me:

repositories {
    mavenCentral()
    maven {
        url "https://maven.xillio.com/artifactory/libs-release"
    }
}

However, everything is back to normal now and I could remove the workaround.

Thanks for your help and quick responses.