How can you import M2E Maven projects into Eclipse from the command line?

I'm working on writing a script that will checkout multiple Maven projects that all have modules. I want to import all the modules into Eclipse Mars as M2E projects. Now I've scoured other questions and answers about this and only see Eclipse CDT based solutions (eclipse.exe -base workspace -importAll {someURI}). However this doesn't convert your projects into M2E projects in eclipse. They are just plain-Jane java projects.

Does anyone know how I can, from a Windows Batch Script, import Maven projects as M2E faceted projects in Eclipse Mars?

I'm using Eclipse Mars.1, Java 7, Maven 3.3.

ADDED: Ultimately what I really want is a reliable way to build up a complex workspace of M2E projects. There are hierarchical dependencies between them so if it's not done right it's very confusing for more Junior developers.

Upvotes: 1

Views: 620

Answers (1)

JUAN CALVOPINA M
JUAN CALVOPINA M

Reputation: 3974

You can try to use:

mvn eclipse:eclipse

This will generate eclipse configuration files, after of that you can import into eclipse:

eclipse.exe -base workspace -importAll {someURI}

Upvotes: 1

Related Questions