Hi Thomas,

This is a known issue that is already being worked on by the Gradle module developers:
    https://github.com/apache/netbeans/pull/5022

Unfortunately it didn't make it into the upcoming v16 release, but from what I understand there is likely to be an update release which should resolve this. I'm also affected by this issue as I use Gradle extensively, so for now I'm continuing to use Netbeans 15, Gradle 7.5.1, and JDK 18, which all work together nicely (as they should also with JDK 11).

Stan

On 02/12/2022 07:10, Thomas Kellerer wrote:
Hello,

our project switch from Gradle 6.9.x to 7.5.1 and now it doesn't work with NetBeans 16 
any more (the most recent "voting candidate")
Everything was working fine with Gradle 6.9.x even with the various NetBeans 16 
RC versions

In case this is important: the gradle plugin versions are reported as:

        org.netbeans.modules.libs.gradle/7 [7.6 
16-321935444b183aea1c4ff255d8d2ab8d50c60606]
        org.netbeans.modules.gradle/2 [2.29 
16-321935444b183aea1c4ff255d8d2ab8d50c60606]
        org.netbeans.modules.gradle.java [1.20.0.1 
16-321935444b183aea1c4ff255d8d2ab8d50c60606]
        org.netbeans.modules.gradle.test [1.14 
16-321935444b183aea1c4ff255d8d2ab8d50c60606]
        org.netbeans.modules.gradle.spring [1.14 
16-321935444b183aea1c4ff255d8d2ab8d50c60606]
        org.netbeans.modules.gradle.persistence [1.14 
16-321935444b183aea1c4ff255d8d2ab8d50c60606]
        org.netbeans.modules.gradle.editor [1.0 
16-321935444b183aea1c4ff255d8d2ab8d50c60606]
        org.netbeans.modules.gradle.dists [1.6 
16-321935444b183aea1c4ff255d8d2ab8d50c60606]
        org.netbeans.modules.gradle.java.coverage [1.11 
16-321935444b183aea1c4ff255d8d2ab8d50c60606]
        org.netbeans.modules.gradle.kit [1.14 
16-321935444b183aea1c4ff255d8d2ab8d50c60606]
        org.netbeans.modules.gradle.javaee [1.13 
16-321935444b183aea1c4ff255d8d2ab8d50c60606]
        org.netbeans.modules.gradle.htmlui [1.13 
16-321935444b183aea1c4ff255d8d2ab8d50c60606]
        org.netbeans.modules.gradle.groovy [1.7 
16-321935444b183aea1c4ff255d8d2ab8d50c60606]

Whenever I open the project, NetBeans shows the project is unloadable with this 
message

    Reason: java.io.NotSerializableException: [extensions.propertyValues]


The log file only shows:

    Failed to retrieve project information for: C:\Projects\*******\server
    Reason: java.io.NotSerializableException: [extensions.propertyValues]

NetBeans is running with Java 11 and the project is using Java 11 as well.

I tried different settings for the Gradle integration.

* "Use Standard Gradle Version" then select 7.5.1 in the drop down.
* Specify an externally installed Gradle
* Enabled/Disabled the "Prefer to use Gradle Wrapper that comes with the 
project"

I also tried with a completely empty

nothing helped.

The build.gradle looks like this (I have removed references to internal 
projects or libraries as we are under a NDA here)

     import com.bmuschko.gradle.docker.tasks.image.*

     plugins {
       id "java"
       id "org.springframework.boot" version "${springBootVersion}"
       id "io.spring.dependency-management" version 
"${dependencyManagementVersion}"
       id 'com.adarshr.test-logger' version "${testLoggerPluginVersion}"
     }

     dependencies {

       implementation 
"org.springframework.boot:spring-boot-starter-web:${springBootVersion}"
       annotationProcessor 
"org.springframework.boot:spring-boot-configuration-processor:${springBootVersion}"

       // reference to an internal library
       implementation platform(".....")

       // about 30 dependencies on internal libraries
       implementation("....")
       .....


       implementation ("org.jsoup:jsoup:${jsoupVersion}")

       implementation project(":project-module-one")
       implementation project(":commons:project-module-two")
       implementation project(":commons:project-module-three")
       implementation project(":commons:project-module-four")

       implementation "com.sun.xml.ws:jaxws-rt:2.3.1"
       implementation "javax.xml.ws:jaxws-api:2.3.1"
       implementation "javax.jws:javax.jws-api:1.1"
       implementation "javax.xml.bind:jaxb-api:2.3.1"
       implementation "xml-apis:xml-apis:1.4.01"
       implementation "com.sun.xml.messaging.saaj:saaj-impl:1.5.3"
       implementation "org.glassfish.jaxb:jaxb-runtime:2.3.4"
       implementation 
"org.springframework.boot:spring-boot-starter-cache:${springBootVersion}"
       implementation 'com.github.ben-manes.caffeine:caffeine:3.0.2'
       implementation "org.springframework.ws:spring-ws-core:${springVersionWS}"
       implementation 
"org.springframework.ws:spring-ws-support:${springVersionWS}"
       implementation 
"org.springframework.ws:spring-ws-security:${springVersionWS}"

       implementation 
"com.fasterxml.jackson.core:jackson-core:${jacksonVersion}"
       implementation 
"com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
       implementation 
"com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}"
       implementation 
"com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jacksonVersion}"

       implementation "com.auth0:java-jwt:${auth0JwtVersion}"


       testImplementation 
"org.springframework.boot:spring-boot-starter-test:${springBootVersion}"
       testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
       testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
     }

     test {
       useJUnitPlatform()
     }

     springBoot {
       mainClass = "com.MainClass"
     }
     configurations {
         all*.exclude group: 'xml-apis'
     }
     tasks.register("start") {
       dependsOn bootRun
     }

     artifacts {
       archives bootJar
     }

     publishing {
       publications {
         serverBootJar(MavenPublication) {
           groupId = rootProject.group
           artifactId = "server"
           version = rootProject.version

           artifact bootJar
         }
       }
     }

     // Docker builds
     String serverName = "server"
     String serverTagShort = calculateShortTag(serverName)
     String serverTagFull = calculateFullTag(serverName)

     tasks.register("buildImages", DockerBuildImage) {
       group = "docker"
       dependsOn bootJar

       images.add(serverTagShort)
       images.add(serverTagFull)
       inputDir.set(file("."))
       dockerFile.set(file("Dockerfile"))
       dockerRegistryCredentialsForRead
     }

     tasks.register("pushImages", DockerPushImage) {
       group = "docker"
       dependsOn buildImages

       images.add(serverTagFull)
     }

     tasks.register("removeTagShort", DockerRemoveImage) {
       group = "docker"
       targetImageId serverTagShort
       force = true
       onError { exception -> println("Could not find image") }
     }

     tasks.register("removeTagFull", DockerRemoveImage) {
       group = "docker"
       targetImageId serverTagFull
       force = true
       onError { exception -> println("Could not find image") }
     }

     tasks.register("cleanImages") {
       group = "docker"
       dependsOn removeTagShort
       dependsOn removeTagFull
     }

     publish.dependsOn assemble


Any ideas?
Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to