mjs
mjs

Reputation: 22357

Eclipse m2eclipse clean, build projects, build automatically commands, what are they?

What is the command that m2eclipse runs when you

highlight a project -> Menu Project -> Clean -> Select anything -> Ok ?

It then goes on to "Building Workspace".

What is the command that allows it to do so?

The reason I am asking is that I am trying to do this from outside Eclipse, from the command line. I am trying to automate all maven stuff in a Groovy script. I am on Windows xp.

EDIT: Also, the command update maven dependencies would be nice to have as well.

Thanks!

Upvotes: 1

Views: 2942

Answers (3)

deterb
deterb

Reputation: 4014

No commands are directly run. Instead, the m2e plugin uses the configuration in the pom to create equivalent configurations in eclipse.

For example, if you change the source directories it will update the eclipse source directories for the java builder. If you change the target directories for the source compilation, it'll ensure that when you do a Project -> Clean, the plugin knows which directories to clean.

If you are trying to do this though a scripting language, I would recommend just running commands on the command line. The alternative would be to add the maven libraries to the classpath and to use them.

Upvotes: 0

Alexander Pogrebnyak
Alexander Pogrebnyak

Reputation: 45576

For your purposes these will suffice for the command line build:

cd /to/where/pom.xml/is
mvn clean
mvn install

Upvotes: 1

Maven-invocations are put in the Run and Debug menus. Just building the workspace does not run maven - it just does all the work Eclipse needs to do to know your files.

Upvotes: 1

Related Questions