score:131

Accepted answer

in the eclipse preferences for the maven plugin, there is a check box for open xml page in the pom editor by default. its exact location varies by plugin version.

juno/kepler/luna/mars (4.x)

in these versions of eclipse:

  1. click window → preferences
  2. expand maven
  3. click user interface
  4. check open xml page in the pom editor by default
  5. click apply and close

poms will open in source view by default.

helios/indigo (3.x)

in these versions of eclipse:

maven > pom editor

score:1

checking the check box "open xml page in the pom editor by default" will open the pom editor but this will not automatically select the second tab - "source". you still have to click at the bottom on the "source" tab. by default, the pom editor opens the first tab - "design". the pom editor will remember the last tab you clicked, so if you clicked on source the second time you open it it will show the source tab.

eclipse version: oxygen.3a release (4.7.3a) build id: 20180405-1200 , ubuntu 16.04

score:4

in eclipse indigo preferences>maven>user interface there is a check box for open xml page in the pom editor by default". uncheck it. (the feature can be broken as it is on my eclipse)

score:7

eclipse juno / mars:

go to window > preferences > maven > user interface

check open xml page in the pom editor by default

score:19

like damien suspected, mywindow>preferences>maven>user interface option to open poms in the maven pom editor automatically was indeed broken. here's how i fixed it (juno):

open window>preferences>general>editors>file associations. in the upper right area click add..., type "pom.xml", then ok.

then click on the new entry pom.xml in the upper list, and in the lower list click on maven pom editor, then click the default button on the right.

click ok and then double click your pom.xml file in project explorer and it should open in the maven pom editor.

bonus: the ctrl+shift+f formatting does a sweet job of formatting poms in the maven editor. the default xml editor's formatting is pretty bad for poms, which have attribute-free tags.


Related Query

More Query from same tag