Add custom BeforeRunTask to SpringApplicaitonRunconfiguration when it create
Answered
is it possible to add my own BeforeRunTask like bulid task do in springApplicationRunConfiguration.
Please sign in to leave a comment.
com.intellij.execution.impl.RunManagerImpl#setBeforeRunTasks to add , but still don't find how to add default like build
or just let the custom task show on the menu after clilck '+'
com.intellij.execution.RunManager#getConfigurationTemplate
with
SpringBootApplicationConfigurationTypeBase.getInstance().getDefaultConfigurationFactory()
thank you so much, yann ! so nice of you ^ _ ^
1. gradle add springboot
2. plugin.xml
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.
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?
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
gradle-intellij-plugin version is latest 1.2.0
use version '2021.2 ', build failed with cannot find builtin plugin 'com.intellij.spring.boot' for IDE
com.intellij.spring.boot is correct plugin ID. Are you sure you're pointing to Ultimate Installation?
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 !
You must specify IDE type https://github.com/JetBrains/gradle-intellij-plugin/#intellij-platform-properties
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
Please always post the "intellij" block configuration you're using. It's impossible to diagnose errors without seeing what possibly caused them.
This should work. Please try reimporting Gradle project and/or remove artifacts from Gradle cache.
it doesn't work , use intellij-sdk-code-samples/action_basics for test .
build.gradle
plugin.xml
code to use SpringBootApplicationConfigurationTypeBase
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)
We'll investigate this and update the thread
anything you found please let me know, thank you very much!
https://youtrack.jetbrains.com/issue/IDEA-272959 found this issue, it's fixed starting from build verison 213.762 !