Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

add new maven run configuration to menu in Eclipse

Tags:

eclipse

maven

Is there some way to add to the existing maven configurations in the "run configuration menu", available in "Run -> Run as" in Eclipse? I'd like to add my commonly used goals, like "integration-test", to the existing ones, like "maven build" etc.

I used the variable "${project_loc}" for base directory, but how can I place the new configuration in the maven run configuration menu? I don't see the option in the preferences or anywhere.

like image 586
MiB Avatar asked May 08 '12 18:05

MiB


People also ask

How do I create a custom Maven build configuration in Eclipse?

I am using Maven inside Eclipse to build and deploy code. When choosing {Context Menu} > Run As, several Maven goals appear as follows: I understand that if I want to create a custom build configuration, I would click "Run Configurations..." to create a custom configuration.

How to configure Maven goals in Eclipse run configuration?

Configuration of goals in eclipse Run Configuration is necessary because it helps for fast development. So let's see how to do Run Configuration for maven Goals. 1. Write click on pom.xml and go to Run Configuration. 2. Click on Maven build in left panel and you will see the below screen. 3. Configure Name, Base directory, Goals etc.

How do I change the default configuration in Maven?

Right-click the pom.xml file in your Maven project, and select Run As>Run Configurations. Either create a new configuration as shown in Section 2, or duplicate an existing configuration to avoid re-entering the same settings. Click Select, to select a goal that requires additional parameters.

What is Maven option in Eclipse?

If you can find maven option (as stated in pics)in eclipse means your IDE is configured with the maven. In next tutorial we will learn to create new project in eclipse using maven and some deep insight about maven.


1 Answers

Short answer is you can't. Eclipse generally encouraging to not clutter context menus.

However when using m2eclipse you can use Run As... / Maven Build... menu to create launch configurations for your Maven builds. After that you can use Run As... / Maven Build (or Alt-Shift-X, M shortcut) to invoke previously created configurations, so if there is more then one been created you'll see a selection dialog.

like image 181
Eugene Kuleshov Avatar answered Nov 10 '22 03:11

Eugene Kuleshov