You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Laszlo Kishalmi (Jira)" <ji...@apache.org> on 2021/03/21 03:24:00 UTC

[jira] [Assigned] (NETBEANS-5432) ./gradlew in NETBEANS 12.2 Fails on Plugin:

     [ https://issues.apache.org/jira/browse/NETBEANS-5432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Laszlo Kishalmi reassigned NETBEANS-5432:
-----------------------------------------

    Assignee: Laszlo Kishalmi

> ./gradlew in NETBEANS 12.2 Fails on Plugin: 
> --------------------------------------------
>
>                 Key: NETBEANS-5432
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-5432
>             Project: NetBeans
>          Issue Type: Bug
>    Affects Versions: 12.2
>         Environment: {code}
> >System Info:
>   Product Version         = Apache NetBeans IDE 12.2
>   Operating System        = Mac OS X version 10.15.7 running on x86_64
>   Java; VM; Vendor        = 12.0.2; OpenJDK 64-Bit Server VM 12.0.2+10; Oracle Corporation
>   Runtime                 = OpenJDK Runtime Environment 12.0.2+10
>   Java Home               = /Library/Java/JavaVirtualMachines/openjdk-12.0.2.jdk/Contents/Home
>   System Locale; Encoding = en_US (nb); UTF-8
>   Home Directory          = /Users/eggmatters
>   Current Directory       = /
>   User Directory          = /Users/eggmatters/Library/Application Support/NetBeans/12.2
>   Cache Directory         = /Users/eggmatters/Library/Caches/NetBeans/12.2
>   Installation            = /Applications/NetBeans/Apache NetBeans 12.2.app/Contents/Resources/NetBeans/netbeans/nb
>                             /Applications/NetBeans/Apache NetBeans 12.2.app/Contents/Resources/NetBeans/netbeans/ergonomics
>                             /Applications/NetBeans/Apache NetBeans 12.2.app/Contents/Resources/NetBeans/netbeans/ide
>                             /Applications/NetBeans/Apache NetBeans 12.2.app/Contents/Resources/NetBeans/netbeans/extide
>                             /Applications/NetBeans/Apache NetBeans 12.2.app/Contents/Resources/NetBeans/netbeans/java
>                             /Applications/NetBeans/Apache NetBeans 12.2.app/Contents/Resources/NetBeans/netbeans/apisupport
>                             /Applications/NetBeans/Apache NetBeans 12.2.app/Contents/Resources/NetBeans/netbeans/webcommon
>                             /Applications/NetBeans/Apache NetBeans 12.2.app/Contents/Resources/NetBeans/netbeans/websvccommon
>                             /Applications/NetBeans/Apache NetBeans 12.2.app/Contents/Resources/NetBeans/netbeans/enterprise
>                             /Applications/NetBeans/Apache NetBeans 12.2.app/Contents/Resources/NetBeans/netbeans/profiler
>                             /Applications/NetBeans/Apache NetBeans 12.2.app/Contents/Resources/NetBeans/netbeans/php
>                             /Applications/NetBeans/Apache NetBeans 12.2.app/Contents/Resources/NetBeans/netbeans/harness
>                             /Applications/NetBeans/Apache NetBeans 12.2.app/Contents/Resources/NetBeans/netbeans/cpplite
>                             /Applications/NetBeans/Apache NetBeans 12.2.app/Contents/Resources/NetBeans/netbeans/groovy
>                             /Applications/NetBeans/Apache NetBeans 12.2.app/Contents/Resources/NetBeans/netbeans/javafx
>                             /Applications/NetBeans/Apache NetBeans 12.2.app/Contents/Resources/NetBeans/netbeans/platform
> {code}
>            Reporter: Matthew Eggers
>            Assignee: Laszlo Kishalmi
>            Priority: Major
>         Attachments: test-project.zip
>
>
> *Problem (expect / actual )*
> When building a Gradle project, running {{./gradlew clean build}} fails in Netbeans while running it natively builds. 
> *Repro Steps*
> UPDATE: The attached {{test-project.zip}} contains an empty scaffolded project from gradle5.3 which demonstrates the issue.
> * Unzip test-project
> * Open with NetBeans12.2
> Sample Gradle File:
> {code}
> plugins {
>     id "com.mkobit.jenkins.pipelines.shared-library" version "0.6.1"
> }
> apply plugin: 'groovy'
> repositories {
>     mavenCentral()
> }
> {code}
> Please see the Environment Above 
> Set JDK to 1.8 matching {{$JAVA_HOME}}
> Set Gradle to 5.3 (matching gradle properties)
> Set "Prefer to use gradle wrapper that comes with the project"
> Run "clean build"
> *Expected*
> Output should match what is run in a Bash shell
> *Actual*
> A couple of things happen here. Output of build command is:
> {code:java}
> cd /Users/eggmatters/project-to-build; ./gradlew clean build
> Parallel execution with configuration on demand is an incubating feature.
> FAILURE: Build failed with an exception.
> * What went wrong:
> Could not initialize class com.mkobit.jenkins.pipelines.CodegenTypesKt
>  {code}
> Stacktrace expands to:
> {code:java}
> * Exception is:
> java.lang.NoClassDefFoundError: Could not initialize class com.mkobit.jenkins.pipelines.CodegenTypesKt
> {code}
> *Additional Info*
>  A Notification pops up either on build or configuration change. It issues a low-level warning stating that it cannot load the project. It then gives some Gradle API paths ending in a {{.gradle}} installation for 6.7.:
> {code}
> org.gradle.api.file.ProjectLayout.directoryProperty(Lorg/gradle/api/provider/Provider;)Lorg/gradle/api/file/DirectoryProperty;<br/>org.gradle.api.file.ProjectLayout.directoryProperty(Lorg/gradle/api/provider/Provider;)Lorg/gradle/api/file/DirectoryProperty;<br/>Could not run build action using connection to Gradle installation '/Users/eggmatters/.gradle/wrapper/dists/gradle-6.7-bin/efvqh8uyq79v2n7rcncuhu9sv/gradle-6.7'.
> {code}
> Also, the Gradle Daemons launched are running under JDK12 (the default JDK) and not the project specified one:
> {code:java}
>  /Library/Java/JavaVirtualMachines/openjdk-12.0.2.jdk/Contents/Home/bin/java -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /Users/eggmatters/.gradle/wrapper/dists/gradle-4.9-all/491wbe0x5d54n9cojs2p0zv90/gradle-4.9/lib/gradle-launcher-4.9.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 4.9
> /Library/Java/JavaVirtualMachines/openjdk-12.0.2.jdk/Contents/Home/bin/java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /Users/eggmatters/.gradle/wrapper/dists/gradle-6.7-bin/efvqh8uyq79v2n7rcncuhu9sv/gradle-6.7/lib/gradle-launcher-6.7.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.7
> {code}
>  There is another similar project which does not rely on the "com.mkobit.jenkins.pipelines.shared-library" plugin which has the same`build.gradle` otherwise which compiles just fine. 
> *TL/DR*
> It appears that either Netbeans or Gradle Plugin is running builds in {{gradle-6.7}} regardless of gradle image selected in properties.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

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