Unable to run project with multiple plugins

已完成

I have a project which contains three multiple modules, each one compiles as a plugin. The plugin number 3 depends on plugins 1 and 2. I created a Gradle run configuration with runIde task, but when I try to run it, it complains that plugin 3 was disabled because plugins 1 and 2 dependencies are not found. I do have a "plugins" in my build.gradle, e.g.

plugins = ["maven", "Groovy", 'properties', project(':plugin1'), project(':plugin2')]

 but it doesn't help. I even can see that there are plugin1, plugin2 and plugin3 directories in my build/idea-sandbox/plugins/ and they contain all necessary jars and yet the plugins are not loaded when I run or debug it. I'm totally lost, and have no idea what else can I look into. Please advise.

Many thanks!

 

E.

0

Hi!

Could you share the screenshot of created run configuration please and entire output of it?

0
Avatar
Permanently deleted user

Hi Alex, sure, here's the screenshot:

and the output is:

 

12:08:37 PM: Executing task 'runIde'...

The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
intellij.publish.username property is deprecated. Use `publishPlugin { username 'username' }` instead.
intellij.publish.password property is deprecated. Use `publishPlugin { password 'password' }` instead.
intellij.publish.channel property is deprecated. Use `publishPlugin { channel 'channel' }` instead.
intellij.publish.channels property is deprecated. Use `publishPlugin { channels 'channels' }` instead.
intellij.publish.username property is deprecated. Use `publishPlugin { username 'username' }` instead.
intellij.publish.password property is deprecated. Use `publishPlugin { password 'password' }` instead.
intellij.publish.channel property is deprecated. Use `publishPlugin { channel 'channel' }` instead.
intellij.publish.channels property is deprecated. Use `publishPlugin { channels 'channels' }` instead.
intellij.publish.username property is deprecated. Use `publishPlugin { username 'username' }` instead.
intellij.publish.password property is deprecated. Use `publishPlugin { password 'password' }` instead.
intellij.publish.channel property is deprecated. Use `publishPlugin { channel 'channel' }` instead.
intellij.publish.channels property is deprecated. Use `publishPlugin { channels 'channels' }` instead.
intellij.publish.pluginId property is deprecated. Tag 'id' from plugin.xml will be used for uploading.
intellij.publish.pluginId property is deprecated. Tag 'id' from plugin.xml will be used for uploading.
intellij.publish.pluginId property is deprecated. Tag 'id' from plugin.xml will be used for uploading.
:data-weave-plugin:compileJava UP-TO-DATE
:data-weave-plugin:patchPluginXml UP-TO-DATE
:data-weave-plugin:processResources UP-TO-DATE
:data-weave-plugin:classes UP-TO-DATE
:data-weave-plugin:instrumentCode UP-TO-DATE
:data-weave-plugin:postInstrumentCode
:data-weave-plugin:jar UP-TO-DATE
:data-weave-plugin:prepareSandbox
:raml-plugin:compileJava UP-TO-DATE
:raml-plugin:patchPluginXml UP-TO-DATE
:raml-plugin:processResources UP-TO-DATE
:raml-plugin:classes UP-TO-DATE
:raml-plugin:instrumentCode UP-TO-DATE
:raml-plugin:postInstrumentCode
:raml-plugin:jar UP-TO-DATE
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:mule-esb-plugin:compileJava
:mule-esb-plugin:patchPluginXml UP-TO-DATE
:mule-esb-plugin:processResources
:mule-esb-plugin:classes
:mule-esb-plugin:instrumentCode
:mule-esb-plugin:postInstrumentCode
:mule-esb-plugin:jar
:mule-esb-plugin:prepareSandbox
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=250m; support was removed in 8.0

 

The source code repository with all the gradle files is at https://github.com/javaduke/mule-intellij-plugins/tree/Mule-4-Support

I'm clearly missing something here, I went through al the comments and issues in your plugin source code repository on GitHub and I couldn't find anything related to my issue except your example which I assume should work correctly. My setup is slightly different so I'm wondering if your Gradle plugin would support it.

 

0

Take a look at the logs (system/log/idea.log). Looks like raml-plugin cannot be read for some reason: 

```

2018-05-22 23:01:37,419 [ 3233] INFO - llij.ide.plugins.PluginManager - Cannot load /Users/zolotov/tmp/mule-intellij-plugins/build/idea-sandbox/plugins/raml-plugin/lib/jackson-m
odule-jsonSchema-2.9.0.jar
java.util.zip.ZipException: zip file is empty
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:219)
at java.util.zip.ZipFile.<init>(ZipFile.java:149)
at java.util.zip.ZipFile.<init>(ZipFile.java:163)
at com.intellij.ide.plugins.PluginManagerCore.loadDescriptorFromJar(PluginManagerCore.java:687)
at com.intellij.ide.plugins.PluginManagerCore.loadDescriptor(PluginManagerCore.java:756)
at com.intellij.ide.plugins.PluginManagerCore.loadDescriptor(PluginManagerCore.java:713)

```

 

Btw, it's handy to configure logs right in run configuration: https://github.com/JetBrains/gradle-intellij-plugin/blob/master/FAQ.md#how-to-configure-logging

0
Avatar
Permanently deleted user

Thanks, Alex, and yes, you are absolutely right about the empty files. Here's what's happening: it only creates two out of three necessary plugins in the build/idea-sandbox/plugins and one of them has dependency files which are empty - i.e. the names are correct but the size is 0. I have no idea why is it happening. Wondering if this is an issue with the Gradle plugin or with my configuration.

 

0
Avatar
Permanently deleted user

It almost seems like prepareSandbox of each module is called and deletes the previous sandbox. Is there any way to debug or trace it?

 

0

Indeed, it is replaced by each prepareSandbox task because you set the very same sandbox directory for every subproject:

 

```

subprojects {

  intellij {

      sandboxDirectory = ...

  }

}

```

 

After removing this line, raml plugin works as expected. Not sure why dataweave plugin is not loaded yet.

0
Avatar
Permanently deleted user

And you are right again! I removed this line and now everything works as expected, I see all three plugins loaded and resolved correctly. Thank you very much for all your help!

 

E.

 

0

You're welcome!

One more hint: upgrade to gradle-intellij-plugin 0.3.1, it will use JetBrains java runtime property.

0
Avatar
Permanently deleted user

Yep, I'm already on 0.3.1! Thanks again!

 

 

0

请先登录再写评论。