Skip to content
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

./gradlew distZip not working properly #36

Closed
stefanoconiglio opened this issue Feb 18, 2022 · 4 comments
Closed

./gradlew distZip not working properly #36

stefanoconiglio opened this issue Feb 18, 2022 · 4 comments

Comments

@stefanoconiglio
Copy link

stefanoconiglio commented Feb 18, 2022

Here's a trace of the error:

./gradlew distZip
> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not download jai_core-1.1.3.jar (javax.media:jai_core:1.1.3)
      > Could not get resource 'http://maven.geotoolkit.org/javax/media/jai_core/1.1.3/jai_core-1.1.3.jar'.
         > Tag mismatch!

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 14s
1 actionable task: 1 executed

Should I use a version of Gradle < 7.0?

@cleydyr
Copy link
Collaborator

cleydyr commented Feb 21, 2022

Hey, @stefanoconiglio .

I couldn't reproduce the issue using the Gradle wrapper included with the repo. It looks like a temporary issue. When I perform a request to the resource URL (http://maven.geotoolkit.org/javax/media/jai_core/1.1.3/jai_core-1.1.3.jar), the server responds with a 301 HTTP code redirecting to https://nexus.geomatys.com/repository/geotoolkit/javax/media/jai_core/1.1.3/jai_core-1.1.3.jar.

Can you try running ./gradlew distZip again?

@mbaeuerle
Copy link
Owner

I also couldn't reproduce the issue using JDK 11 and the provided gradlew. It then will use gradle 6.3 as defined in the gradle/wrapper/gradle-wrapper.properties. Using gradle 7 however doesn't seem to work yet and needs some adaptation, but at least in my case it doesn't seem to fail with the same error you provided.

@cleydyr
Copy link
Collaborator

cleydyr commented Mar 7, 2022

In Gradle 7.x compile configurations were removed. Also, the build.gradle repositories will cause the build to fail due to the use of insecure http URLs. Here's a build.gradle that worked for me:


plugins {
    id 'org.openjfx.javafxplugin' version '0.0.8'
    id 'java'
    id 'application'
}

mainClassName = 'at.laborg.briss.Briss'
applicationDefaultJvmArgs = ["-Xms128m", "-Xmx1024m"]
def javaFxVersion = '11'

repositories {
    maven { url "https://clojars.org/repo" } // For jpedal
    maven { url "https://maven.geotoolkit.org/" } // For jpedal transitive dependencies
    mavenCentral()
}

dependencies {
    implementation 'com.itextpdf:itextpdf:5.5.10'
    implementation 'org.jpedal:jpedal-lgpl:4.74b27'

    runtimeOnly "org.openjfx:javafx-controls:$javaFxVersion:win"
    runtimeOnly "org.openjfx:javafx-controls:$javaFxVersion:linux"
    runtimeOnly "org.openjfx:javafx-controls:$javaFxVersion:mac"
    runtimeOnly "org.openjfx:javafx-base:$javaFxVersion:win"
    runtimeOnly "org.openjfx:javafx-base:$javaFxVersion:linux"
    runtimeOnly "org.openjfx:javafx-base:$javaFxVersion:mac"
    runtimeOnly "org.openjfx:javafx-swing:$javaFxVersion:win"
    runtimeOnly "org.openjfx:javafx-swing:$javaFxVersion:linux"
    runtimeOnly "org.openjfx:javafx-swing:$javaFxVersion:mac"
}

javafx {
    version = javaFxVersion
    modules = [ 'javafx.controls', 'javafx.base', 'javafx.swing' ]
}
------------------------------------------------------------
Gradle 7.4
------------------------------------------------------------

Build time:   2022-02-08 09:58:38 UTC
Revision:     f0d9291c04b90b59445041eaa75b2ee744162586

Kotlin:       1.5.31
Groovy:       3.0.9
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          11.0.14 (Azul Systems, Inc. 11.0.14+9-LTS)
OS:           Mac OS X 12.2.1 aarch64

@mbaeuerle
Copy link
Owner

@stefanoconiglio gradle was now updated to version 7.4.
I will close this issue for now, let us know if you still experience issues.

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

3 participants