Matthew Eggers created NETBEANS-5432:
----------------------------------------
Summary: ./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:
MAC_OSX
Darwin APXQLVDQ4E0621 19.6.0 Darwin Kernel Version 19.6.0: Tue Jan 12 22:13:05
PST 2021; root:xnu-6153.141.16~1/RELEASE_X86_64 x86_64
Java:
$JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
Gradle:
v4.9 & 5.3
{code}
{{build.gradle}}
{code}
plugins {
id "com.mkobit.jenkins.pipelines.shared-library" version "0.6.0"
}
apply plugin: 'groovy'
apply plugin: 'jacoco'
repositories {
mavenCentral()
}
{code}
Reporter: Matthew Eggers
*Problem (expect / actual )*
When building a Gradle project, running {{./gradlew clean build}} fails in
Netbeans while running it natively builds.
*Repro Steps*
Please see the Environment Below
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. (There doesn't
appear to be a way to copy these messages.)
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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists