marioosh
marioosh

Reputation: 28576

How to get access to (embedded in) Maven console in Eclipse?

Is possible to access Maven (embedded) console in Eclipse like in shell (linux shell, windows cmd.exe) to run custom maven commands (mvn archetype:create.... etc) ? I'm using m2e, but can run Maven commands only by GUI.

Upvotes: 11

Views: 21094

Answers (4)

kitaev
kitaev

Reputation: 71

maybe you can use "external tools" function to do it.

see:

  1. In Eclipse, choose “Run -> External Tools -> External Tools Configurations
  2. In "Program", click “New Launch Configuration”
  3. Config your console name, location, working directory
  4. "run"

sorry for no images, because my reputation is below 10.

Upvotes: 5

Diego
Diego

Reputation: 4433

Sadly I don't know about any Eclipse plugin to do that :(

A long time ago (in the Maven 1 era) there was a Maven goal called "console" that allowed you to execute goals in a pre-loaded maven instance. But that feature was discontinued in Maven 2.

For new versions of Maven (Maven 3), the folks at Sonatype made a Maven Shell which I think will do what you want: http://shell.sonatype.org/index.html

Upvotes: 0

Piotr Nowicki
Piotr Nowicki

Reputation: 18224

You can run custom maven commands directly from Eclipse by doing:

 Run -> Run Configurations... -> Maven Build

You'll need just some Maven plugin for Eclipse like m2e.

Upvotes: 6

Mateusz Chromiński
Mateusz Chromiński

Reputation: 2832

I highly recommend shell plugin for Eclipse: Wicked shell (http://www.wickedshell.net/)

Upvotes: 1

Related Questions