Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Autoformat pom.xml without using m2eclipse plugin

I don't use the Eclipse maven plugin while developing in Eclipse.

I generate my Eclipse classpath externally using the following command:

mvn eclipse:eclipse

This has worked fine for quite some time and I am not inclined to add a maven plugin.

However, I would like to be able to "autoformat" my pom.xml file.

My pom.xml is not showing up as a "Source" file and therefore the contextual "Source" menu doesn't show up.

Control-Shift-F doesn't work either.

Is there a way to do this without installing the m2eclipse plugin? Is there any other generic "XML Editor" plugin that can help with this?

like image 597
hashable Avatar asked Jun 11 '26 17:06

hashable


1 Answers

I may be missing something obvious but why don't you use Eclipse's built-in XML Editor which supports formatting (via the regular Shift+Ctrl+F)?

like image 187
Pascal Thivent Avatar answered Jun 14 '26 11:06

Pascal Thivent



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!