Lets say I have run-config1 and run-config2 setup for my project in IntelliJ.
I know there are ways of adding custom shell code to be perfomed before/after a build run, but that's not what I want to do.
Is there a way of calling them from the embedded terminal?
As of IntelliJ IDEA 14 there is no such way. You can write a plugin for IntelliJ IDEA that will handle a command like "idea.sh run configuration-name" and start the run configuration in the existing instance, but this is fairly non-trivial.
Related
I have running intellij with cucumber scenarios.
Now I want to start a specific scenario from outside intellij.
Is there a possibility e.g. from a shell or a java programm to excecute something in intellij?
Is there a possibility to use a currently running intellij instance for that?
Thanks
Jochen
you did not provide many info, but I bet if you use Maven you can run from a terminal / git bash etc your tests outside IDE, e.g.:
mvn test
See more info here: Run Cucucmber from terminal
I need some help getting started making a specific IntelliJ plugin.
I want to make an IntelliJ plugin that makes it so you can launch intelliJ actions from CLI (or from a web service if it's easier).
For example, I'm done building my project with a gradle script... but i want to get it ready in intelliJ too. Right now I have to do this manually with a point-and-clicks.
Instead I want to have this the ability to externally trigger some IntelliJ commands. In my example I would want to fire off these requests from my gradle script:
run-intellij-command {project-path} --action refresh-gradle
run-intellij-command {project-path} --action build-project
run-intellij-command {project-path} --action start-debugging --configurationName={configuration-name}
Does anyone have an example of how I can get started with this?
Really hoping there is an intellij plugin project that already does something similar like reacting to cli commands or hosts a web service that can be called?
Thanks!
Also created this https://youtrack.jetbrains.com/issue/IDEA-184885
hoping to see this feature become a reality some day
You can use the ApplicationStarterEx interface to implement that. Provide a class implementing the interface, and register it in your plugin.xml as the <appStarter> extension point.
To execute your code, use Tools | Create Command-line Launcher, and then run idea <startername> <arguments> from the command line, where startername is what you return from ApplicationStarter.getCommandName().
I'm not aware of any existing open-source plugins that implement similar functionality.
Does anyone know how I can skip JUnit tests in IntelliJ when doing a Gradle build like the following command line version? I have searched extensively for a solution but can't find one. I am in the process of converting an existing project to Gradle and need to support many developers that are not familiar with Gradle, some UX, some front end, and some Java. There are many broken Junit tests in the myriad modules and long-term we will fix them. Short term I need all other developers to use the tools they are familiar with to be able to do their job easily.
./gradlew build -x test
The Gradle-Android Compiler settings allow for command-line options but not non-android projects as shown in the IntelliJ settings dialog shown below.
You should be able to run a standard clean build from intellij if it's a gradle project (aka gradle integration in intellij). Then edit the configuration and add at the script parameters : -x test which will run the clean build (or any other task) without running tests.
I am using Intellij IDEA 2019.3 (Community Edition).
You can skip test using following settings.
You can get to this via Gradle panel located at right top corner.
Select task -> Run Configuration -> Right click -> Edit Run Configuration..
From intellij 2021.2 onwards, type the argument directly in Run text
I am developing with IntelliJ. In this project, I need to run 3 servers.
Is there a way to create a shortcut to :
Stop all those servers in one click or keyboard shortcut
Optionally, restart them.
Thanks.
There doesn't seem to be a direct method to do this in IntelliJ, but if you can stop each one from a script, then you could just write a script and run it from IntelliJ. Personally, I'd just go to the terminal and run the script rather than configuring it directly in IntelliJ (which also has an embedded terminal, btw).
I've got a project using Maven 2 as the build tool. Now I am using Netbeans 6 as my IDE and really want to be able to use the profiler. Is there any way I can get this to work?
I thought this might be more complicated. It wasn't. To use the Netbeans profiler with your Maven 2 project you simply need to add a single pair of parameters when running your java app. Call up the project's Properties dialogue, select the "Run" tab and add something like the following to the jvm args:
-agentpath:"C:\Program Files\NetBeans 6.0\profiler2\lib\deployed\jdk15\windows\profilerinterface.dll=\"C:\\\"Program Files\"\\\"NetBeans 6.0\"\\profiler2\\lib\\"",5140
This meant that now when I ran my app (F6) execution would wait for me to attach the profiler. Cue real time graphy goodness. Sweet.