IntelliJ + Execute Maven Goal: How to delete from recent?

Viewed 894

Small question on how to delete an entry from Intellij -> Execute Maven Goal tab please.

So in Intellij, there is a Maven tab. There is a Maven command "Execute Maven Goal".

In it, a "Run Anything", "Recent" and "Maven Goals".

After inputting a maven command in "Run Anything", it will go to "Recent" (and stay there kinda forever).

However, how to remove it from there, please?

Thank you

enter image description here

3 Answers

The entries from Execute Maven Goal tab are stored in your project folder, in .idea/workspace.xml file, under <component name="RunAnythingCache"> section. An example from my project below.

The history entries:

enter image description here

are stored as:

<component name="RunAnythingCache">
    <option name="myCommands">
      <command value="mvn clean package" />
      <command value="mvn package" />
    </option>
</component>

In order to delete an entry, manually edit workspace.xml file. I needed to close my IntelliJ project and edit it in external text editor, to avoid that the file is constantly overwritten by IDE.

In intellij 2021.1,the configuration move to "/Library/Application Support/JetBrains/IntelliJIdea2021.1/options/mavenRunHelper.xml". The configuration shows like this:

<application>
  <component name="MavenRunHelper">
    <option name="goals">
      <Goals>
        <option name="goals">
          <list>
            <Goal>
              <option name="commandLine" value="clean" />
            </Goal>
            <Goal>
              <option name="commandLine" value="validate" />
            </Goal>
            <Goal>
              <option name="commandLine" value="compile" />
            </Goal>
            <Goal>
              <option name="commandLine" value="test" />
            </Goal>
            <Goal>
              <option name="commandLine" value="package" />
            </Goal>
            <Goal>
              <option name="commandLine" value="verify" />
            </Goal>
            <Goal>
              <option name="commandLine" value="install" />
            </Goal>
            <Goal>
              <option name="commandLine" value="deploy" />
            </Goal>
            <Goal>
              <option name="commandLine" value="site" />
            </Goal>
            <Goal>
              <option name="commandLine" value="clean install" />
            </Goal>
          </list>
        </option>
      </Goals>
    </option>
  </component>
</application>

In IntelliJ 2021.3 on Linux, the file is in ~/.config/JetBrains/IdeaIC2021.3/settingsRepository/repository/mavenRunHelper.xml

Related