How to add profiles to default maven goals in Eclipse?

13,971
  1. Select "Maven build..." from the menu and create the configuration

Create configuration

  1. Add it to the favourites for later use / launch the build

Add it to favourites for later use

Share:
13,971
jedatu
Author by

jedatu

Updated on June 04, 2022

Comments

  • jedatu
    jedatu about 2 years

    I am using Maven inside Eclipse to build and deploy code.

    When choosing {Context Menu} > Run As, several Maven goals appear as follows:

    Eclipse Run As Context Menu

    I understand that if I want to create a custom build configuration, I would click "Run Configurations..." to create a custom configuration.

    However, there seems to be no way to modify the configurations that appear conveniently on the menu. For instance, you can't add a profile to #7 "Maven install". The result is tedious, because you have click about 5 times to launch the build.

    Is there any way to add profiles or additional goals to #7 "Maven install" build or add custom configurations to the context menu?

    Is there a way to launch a specific build configuration with a keyboard combination?

    I have tried IntelliJ and NetBeans and the Maven integration in all of them seems confusing trying to differentiate between basic Maven goals and the more realistic custom combination of goals and profiles.

  • Keith Tyler
    Keith Tyler over 5 years
    That only affects the drop down from the top nav, but not the submenu on the context menu from a POM file.