jarFiles is not set for PluginDescriptor

已回答

I just started testing my plugin under the 2021.3 EAP, and when I run my tests I now get the following error:

ERROR: jarFiles is not set for PluginDescriptor(name=Grazie, id=tanvd.grazi, descriptorPath=plugin.xml, path=~/dev/cursive/sdks/213.3714.440-EAP-SNAPSHOT/plugins/grazie/lib/grazie.jar, version=213.3714.440, package=com.intellij.grazie, isBundled=true)

This worked fine under 2021.2. I searched around and found some related YouTrack issues, which seem to have been resolved in this commit: https://github.com/JetBrains/intellij-community/commit/03b7fb1472e4cf789dd777ed4f03a51b6db332eb. However I don't understand what that fix is doing, or what the implication is for me. Is there any way I can diagnose this further?

I run my tests using a test runner which just uses my IntelliJ project classpath.

2

Please set VM property idea.force.use.core.classloader=true

2

Thanks, that works for me! For reference, adding this to build.gradle.kts works:

tasks.test {
systemProperty("idea.force.use.core.classloader", "true")
}
0

Please upgrade to Gradle IntelliJ plugin 1.2.0 or later which fixes this automatically

1

I'm now at:

id("org.jetbrains.intellij") version "1.3.0"

but still got this error.

0

Junpeng Tang Could you please link to your plugin repository sources? Thanks

 

0

Junpeng Tang Hi, I managed to resolve a similar issue with 1.3.0.

Gradle IntelliJ plugin indeed sets 

idea.force.use.core.classloader

automatically for all run configurations, that are managed by gradle tasks. According to your screenshot, your run configuration is not Gradle based, it is directly JUnit. The same test could be launched using any of these two run configurations (see screenshot)

So you have 2 options:

1) Fix your JUnit run configuration settings and add VM option: `-Didea.force.use.core.classloader=true`. You could change this in `Edit configuration templates..` dialog to apply the fix to all JUnit run confugrations that you will create later using a context menu.


2) Or change IDEA settings to create new configurations using Gradle test runner:


1

请先登录再写评论。