"Run Anything" action doesn't work for maven commands - maven

While the "Run anything" works fine for other commands It does nothing for the maven ones, literally, It does nothing! For instance, I want to run a mvn clean install using "Run anything" action:
Hitting enter does not show the Run tool window, nor does it show an error message. Again, It does nothing. Note that other commands are working fine.
I am used to running maven commands using this strategy. Can someone help me fix this issue?

I was not able to reproduce the described problem in IntelliJ IDEA 2019.3.4 release and in 2020.1 RC versions.
If the issue persists for you in these versions, please share idea.log file, there must be some exception logged which may help to understand why it doesn't work for you. Most likely, updating the IDE and running with the default settings/plugins per this document will solve the issue.
Also make sure you have a valid Maven project with the JDK and Maven properly configured in the IDE settings.

Related

Why Intellij IDEA skips Maven test

I use IntelliJ IDEA version 13 on MacOS. I have a maven project, the project is stored in Git. Everything worked well.
Yesterday my Macbook crashed, then I reinstalled MacOS as well as IntelliJ IDEA. After that I checked out my project from Git and open the project in IDEA again. But now In Maven Project's Lifecycle, test is disabled, there a dash across test. I can still package my project, but "Tests are skipped".
Since my project code has no any change, I'm guessing I might miss configured something in IntelliJ IDEA. Any idea?
There's a skip test toggle in Maven Projects tool window.
To enable the maven Test, these are two steps need to complete
Step-1: Go to the settings tab, then go to Build, Execution, Deployment
Step-2: Then select the testing, and uncheck the Enable test runs.......

Intellij debug configuration with only an external tool

I am coding bukkit plugins on my Mac laptop, and to test I want to launch a jar file within the Intellij debug system (current version). If you dont know what bukkit is, all that really matters is that I am trying to execute
"java -jar craftbukkit.jar" in a certain directory.
I have figured out how to do this using a Maven configuration. Basically I created a new Maven configuration, then just ignored everything about Maven and added an external tool to the "Before Launch" section. Everything works, but there is this somewhat annoying notification whenever I close the server session. (Bukkit is the name of the configuration).
Error running Bukkit: No valid Maven installation found. Either set the home directory in the configuration dialog or set the M2_HOME environment variable on your system.
Basically I am wondering if
I could somehow prevent this warning from showing up as a bubble/in the event log
I could configure the Maven settings somehow such that it wouldnt do anything Maven related.
I could use another configuration method to just use the external tool I wish.
Also, for the record, I have tried setting the home directory and setting the maven directory, but while it does fix the errors, it causes the logger to try to run a maven session which quits out with another error. Basically if I try to fix the pop up the obvious way, it only leads to another error since I am not actually trying to use Maven.
Finally, you may say "its just a little balloon, who cares". True, its not a huge inconvenience, but to me it is worth at least doing some research before giving up on.

maven user prompt works from windows cmd, not from cygwin

I recently reinstalled cygwin from fresh, and am now seeing an issue with Maven builds.
A specific maven plugin I am attempting to use pops up an interactive prompt...
From the windows cmd, the user can enter their info:
What is the feature branch name? foo
From cygwin, it appears that maven keeps recieving some form of newline, because I see:
What is the feature branch name? What is the feature branch name?
What is the feature branch name? What is the feature branch name? etc...
Has anyone else seen this, know how to fix this?
Has anyone else seen this, know how to fix this?
Yes, and there are several developers who seem to have a fix for it. Look in Jira for the Maven and Mojo projects and search for cygwin. You'll see equivalent issues and a lot of them have been fixed.

Missing Maven goals when using m2e from Eclipse(Juno)

I am having a problem with selecting Maven goals after a clean install of Eclipse (Juno) and m2Eclipse on a Windows 7 machine. M2Eclipse was installed via the Eclipse marketplace.
I've generated a very simple application via the Eclipse wizards. I have selected the Run as.../Maven build... option from the context menu then clicked on
Select to obtain a list of goals. However, the list is empty.
I then followed the instructions in this post which described my problem exactly:
Empty maven goals list
Unfortunately this does not work for me: the list is still empty.
If anyone has any ideas as to what else I can check I'd be obliged.
Many thanks
That's normal behavior ... just type in the goals you want to run. EX., clean package
According to the m2e developers, it is supposedly a feature that wasn't implemented fully. A lot of users are suggesting the button just be removed. I would just ignore it and enter them manually, pretending the button doesn't exist.
See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=344997

IntelliJ forcing me to restart my app on every code change

I am on Grails 1.3.5 and IntelliJ 9.0.4 on a Mac with the latest JDK
I have the simplest of Grails projects: a helloworld that simply renders a string directly from a controller. I created it through the New Project wizard in IntelliJ. That went fine and IntelliJ picks up the correct grails SDK.
The problem is that IntelliJ makes me restart the app to see any changes I make to my code, (e.g. changing the "hello world" string.
If I edit the same controller with a text editor (eg TextMate) and run the app from the command line with grails run-app I do get hot code replacement, which is obviously what I want...
Anyone got a clue?
Some points:
I strongly recommend using the latest IntelliJ X EAP (http://confluence.jetbrains.net/display/IDEADEV/IDEA+X+EAP) since Grails support has been improved a lot since 9.0.x
If your IntelliJ config files got messed up, you can easily recreate them with 'grails integrate-with --intellij'. N.B. this recreates the config files in and old format and IntelliJ suggest to upgrade them - follow this procedure
Make sure your run configuration has uses at least the same memory settings than Grails uses when run from the command line, I'm fine with setting the 'VM parameters' field to '-XX:MaxPermSize=256m -Xmx1G'
If build problems occur (in rare cases the IntelliJ's internal compiler is more strict than plain Groovy), disable the 'Make' checkbox in the run config dialog.
If the problem persists, paste a screenshot of the run configuration you're using.

Resources