0

Error with gradle, using gluon mobile.

Hello everyone.

I was testing the gluon mobile plugin in eclipse and it was working normally, however, after trying to add a dependency, I came across the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':AppTesteApp:compileClasspath'.
> Could not download charm.jar (com.gluonhq:charm:4.4.1)
   > Could not get resource 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm/4.4.1/charm-4.4.1.jar'.
      > Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm/4.4.1/charm-4.4.1.jar'. Received status code 503 from server: Service Unavailable
> Could not download glisten-afterburner.jar (com.gluonhq:glisten-afterburner:1.2.1)
   > Could not get resource 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/glisten-afterburner/1.2.1/glisten-afterburner-1.2.1.jar'.
      > Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/glisten-afterburner/1.2.1/glisten-afterburner-1.2.1.jar'. Received status code 503 from server: Service Unavailable
> Could not download charm-glisten-connect-view.jar (com.gluonhq:charm-glisten-connect-view:4.4.1)
   > Could not get resource 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-glisten-connect-view/4.4.1/charm-glisten-connect-view-4.4.1.jar'.
      > Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-glisten-connect-view/4.4.1/charm-glisten-connect-view-4.4.1.jar'. Received status code 503 from server: Service Unavailable
> Could not download charm-glisten.jar (com.gluonhq:charm-glisten:4.4.1)
   > Could not get resource 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-glisten/4.4.1/charm-glisten-4.4.1.jar'.
      > Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-glisten/4.4.1/charm-glisten-4.4.1.jar'. Received status code 503 from server: Service Unavailable
> Could not download charm-cloudlink-client.jar (com.gluonhq:charm-cloudlink-client:4.4.4)
   > Could not get resource 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-cloudlink-client/4.4.4/charm-cloudlink-client-4.4.4.jar'.
      > Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-cloudlink-client/4.4.4/charm-cloudlink-client-4.4.4.jar'. Received status code 503 from server: Service Unavailable

* 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.

I changed IDE to try the same, and I came across the same error, and after this, it does not run.

Someone came across this error and corrected? any light?

I'm using InteliJ IDE and eclipse running on a fedora 26 with JDK 1.8, gradle 4.

My build.gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'org.javafxports:jfxmobile-plugin:1.3.10'
    }
}

apply plugin: 'org.javafxports.jfxmobile'

repositories {
    jcenter()
    maven {
        url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
    }
}

mainClassName = 'com.gluonapplication.GluonApplication'

dependencies {
    compile 'com.gluonhq:charm:4.4.1'
}

jfxmobile {
    downConfig {
        version = '3.6.0'
        // Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
        plugins 'display', 'lifecycle', 'statusbar', 'storage'
    }
    android {
        manifest = 'src/android/AndroidManifest.xml'
    }
    ios {
        infoPList = file('src/ios/Default-Info.plist')
        forceLinkClasses = [
                'com.gluonhq.**.*',
                'javax.annotations.**.*',
                'javax.inject.**.*',
                'javax.json.**.*',
                'org.glassfish.json.**.*'
        ]
    }
}

Console error:

12:26:52: Executing task 'build'...

:assemble UP-TO-DATE
:check UP-TO-DATE
:build UP-TO-DATE
:GluonMobile-MultiViewProjectApp:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':GluonMobile-MultiViewProjectApp:compileClasspath'.
> Could not download charm.jar (com.gluonhq:charm:4.4.1)
   > Could not get resource 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm/4.4.1/charm-4.4.1.jar'.
      > Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm/4.4.1/charm-4.4.1.jar'. Received status code 503 from server: Service Unavailable
> Could not download charm-glisten-connect-view.jar (com.gluonhq:charm-glisten-connect-view:4.4.1)
   > Could not get resource 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-glisten-connect-view/4.4.1/charm-glisten-connect-view-4.4.1.jar'.
      > Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-glisten-connect-view/4.4.1/charm-glisten-connect-view-4.4.1.jar'. Received status code 503 from server: Service Unavailable
> Could not download charm-glisten.jar (com.gluonhq:charm-glisten:4.4.1)
   > Could not get resource 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-glisten/4.4.1/charm-glisten-4.4.1.jar'.
      > Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-glisten/4.4.1/charm-glisten-4.4.1.jar'. Received status code 503 from server: Service Unavailable
> Could not download charm-cloudlink-client.jar (com.gluonhq:charm-cloudlink-client:4.4.4)
   > Could not get resource 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-cloudlink-client/4.4.4/charm-cloudlink-client-4.4.4.jar'.
      > Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm-cloudlink-client/4.4.4/charm-cloudlink-client-4.4.4.jar'. Received status code 503 from server: Service Unavailable

* 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 4s
1 actionable task: 1 executed
Could not GET 'http://nexus.gluonhq.com/nexus/content/repositories/releases/com/gluonhq/charm/4.4.1/charm-4.4.1.jar'. Received status code 503 from server: Service Unavailable
12:26:56: Task execution finished 'build'.

enter image description here

enter image description here

José Pereda
  • 44,311
  • 7
  • 104
  • 132
  • Post your `build.gradle` file. The error `Received status code 503 from server: Service Unavailable` could mean that the nexus server was down, but it works for me now. Can you check again? – José Pereda Dec 27 '17 at 14:33
  • Hi José =D my build.gradle `buildscript { dependencies { classpath 'org.javafxports:jfxmobile-plugin:1.1.0' } } repositories { jcenter() maven { url 'http://nexus.gluonhq.com/nexus/content/repositories/releases' } } dependencies { compile 'com.gluonhq:charm:4.0.0' } jfxmobile { downConfig { version = '3.0.0' plugins 'display', 'lifecycle', 'statusbar', 'storage' } android { manifest = 'src/android/AndroidManifest.xml' } } ` – João Junior Dec 27 '17 at 14:42
  • I saw that you answered this, and changed my gradle, but the error persists. [https://stackoverflow.com/questions/41519348/gluon-4-x-x-artifacts-not-in-the-nexus-repo?rq=1] – João Junior Dec 27 '17 at 14:43
  • Your dependencies are really outdated. So far, the jfxmobile version is 1.3.10, `charm` uses 4.4.1 and `downConfig` uses 3.6.0. Maybe you can update them, and run `./gradlew clean build` again? – José Pereda Dec 27 '17 at 14:47
  • The same error occurred: `* What went wrong: Could not resolve all files for configuration ':GluonMobile-MultiViewProjectApp:compileClasspath'.` I did a new project for testing, and still the same problem. – João Junior Dec 27 '17 at 15:00
  • Edit your question, and post the full `build.gradle` file. Run `./gradlew --info clean build`, and see the console for a possible exception – José Pereda Dec 27 '17 at 15:22
  • OK! Added, Is it possible that my environment control is wrong? – João Junior Dec 27 '17 at 15:34
  • Can you access this link? http://nexus.gluonhq.com/nexus/content/repositories/releases/ – José Pereda Dec 27 '17 at 15:39
  • Yes, I can see the contents of each directory. – João Junior Dec 27 '17 at 15:40
  • From command line, go to the root `GluonMobile-MultiViewProject`, and run `./gradlew --info :GluonMobile-MultiViewProjectApp:clean`, and see if that works? – José Pereda Dec 27 '17 at 15:43
  • appeared p following error: `Exception in thread "main" java.util.zip.zipException: error in opening zip file` – João Junior Dec 27 '17 at 16:07
  • Hard to say if you don't post the stacktrace. You can try to clear your .gradle/wrapper/dists cache for the gradle version you have (2.14.1-all) – José Pereda Dec 27 '17 at 16:17
  • Sorry, I was trying to post, but a connection crashed. I will try to make your last recommendation = D – João Junior Dec 27 '17 at 16:27
  • I changed the gradle version and received the same error posted below. – João Junior Dec 27 '17 at 16:48
  • Don't post it as an answer. You can edit your question and post it there. Your last pic shows you were using gradle 4-4-1, but the error you've posted using 2.14.1-bin seems to be the same? – José Pereda Dec 27 '17 at 19:37

1 Answers1

0

The error was solved, I downloaded the Gradle IdePack 3.8.x + 1.0.x plugin and succeeded in executing. I am very grateful for all the support.