jbosstools / m2e-polyglot-poc

M2E Polyglot Support Experiment
Eclipse Public License 1.0
15 stars 8 forks source link

works badge

Proof of Concept POM Polyglot support for Eclipse M2E.

Maven 3.3.1 introduced the possibility of using other formats than xml to represent the project object model (POM).

In the Eclipse IDE though, M2E currently requires a pom.xml file to be able to work.

This experimental plugin will allow you to edit any pom.<groovy|scala|rb|yaml|atom> and a pom.xml file will automatically be (re)generated (and marked as derived), allowing M2E to pick up your changes.

If errors occur during the translation (due to a malformed pom for instance), the pom.xml will not be updated, so the project stays in a buildable form within Eclipse (else you'd get a blank pom.xml file).

You can now convert an existing Maven project to Polyglot Maven via right-click on a project and Configure > Convert to Maven Polyglot...

There are a few caveats though :

Now projects without a polyglot pom should not be impacted. Also, you can always disable the plugin under Preferences > Maven > Polyglot Support (Experimental).

Now that you've been warned, please read http://takari.io/2015/03/21/polyglot-maven.html to understand how to convert your existing pom.xml files to pom.<whatever>.

This screencast shows you how to do it from within Eclipse directly : http://screencast.com/t/ls1In7Uq (without sound)

So if still want to have fun while loosing your original pom.xml files, you can install M2E Polyglot Support Experiment from this p2 update site : http://dl.bintray.com/jbosstools/m2e-polyglot-poc/

This feature requires Java 1.8. If needed, you can edit your eclipse.ini (or the equivalent .ini configuration of your Eclipse based product) and add the -vm parameter, pointing at a JDK 1.8. See https://wiki.eclipse.org/Eclipse.ini#Specifying_the_JVM