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.
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With