Add custom BeforeRunTask to SpringApplicaitonRunconfiguration when it create

Answered

is it possible to  add my own BeforeRunTask  like bulid task do  in springApplicationRunConfiguration. 

1
20 comments

com.intellij.execution.impl.RunManagerImpl#setBeforeRunTasks  to add ,   but still don't find how to add default like build 

0

or just let the custom task show on the menu after clilck '+'



0

com.intellij.execution.RunManager#getConfigurationTemplate

with

SpringBootApplicationConfigurationTypeBase.getInstance().getDefaultConfigurationFactory()

0

thank you so much, yann !  so nice of you  ^ _ ^

0

1. gradle add  springboot

2. plugin.xml

<depends>com.intellij.spring.boot</depends>

 

when run plugin  get runtime exception :

java.lang.RuntimeException: com.intellij.diagnostic.PluginException: Class com.intellij.spring.boot.run.SpringBootApplicationConfigurationTypeBase must be not requested from main classloader of com.intellij.spring.boot plugin.

0

In Gradle, don't use folder names but real plugin IDs.

Please avoid using localPath. What is your target IDE version? Are you using latest gradle-intellij-plugin version 1.2.0?

0

so slow to get dowload ideaIC ** SNAPSHOT .  any way to make it fatser? 

I  replace folder name with real plugin ID. seems it doesn't work.  target IDE version  is  2020.2.2 UI ,  build #IU-212.5284.40

0

gradle-intellij-plugin version is latest 1.2.0

0

use version '2021.2 ',  build failed with   cannot find builtin plugin 'com.intellij.spring.boot' for IDE 

0

com.intellij.spring.boot is correct plugin ID. Are you sure you're pointing to Ultimate Installation?

0

build failed
Cannot find builtin plugin 'com.intellij.spring.boot' for IDE: /opt/gradle/repo/caches/modules-2/files-2.1/com.jetbrains.intellij.idea/ideaIC/LATEST-EAP-SNAPSHOT/e7ececfdccc99d7d34a6a0f22f08ad5fb12cd109/ideaIC-LATEST-EAP-SNAPSHOT

and no matter how I change the value of version, it is always use ideaIC-LATEST-EAP-SNAPSHOT !

0

got the same exception,  version IU - 2021.2 , gradle-intellij-plugin version 1.2.0 , get the same exception.

when build

get org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.MetaDataParseException: inconsistent module metadata found. Descriptor: com.jetbrains:ideaIU:2021.2 Errors: bad group: expected='com.jetbrains.intellij.idea' found='com.jetbrains'

but the sandbox still success run 

0

Please always post the "intellij" block configuration you're using. It's impossible to diagnose errors without seeing what possibly caused them.

 

0

This should work. Please try reimporting Gradle project and/or remove artifacts from Gradle cache.

0

it doesn't work , use intellij-sdk-code-samples/action_basics for test .

build.gradle

plugin.xml 

code to use   SpringBootApplicationConfigurationTypeBase

ConfigurationFactory springConfigTypeBase
=
SpringBootApplicationConfigurationTypeBase.getInstance().getDefaultConfigurationFactory();

same exception like this 

com.intellij.diagnostic.PluginException: Class com.intellij.spring.boot.run.SpringBootApplicationConfigurationTypeBase must be not requested from main classloader of com.intellij.spring.boot plugin [Plugin: org.intellij.sdk.action]
at com.intellij.ide.plugins.cl.PluginClassLoader.tryLoadingClass(PluginClassLoader.java:300)

 

0

We'll investigate this and update the thread

0

anything you found please let me know, thank you very much!

0

https://youtrack.jetbrains.com/issue/IDEA-272959  found this issue,   it's fixed starting from  build verison 213.762 !

0

Please sign in to leave a comment.