views:

283

answers:

1

So I created a simple web app using maven, the pom.xml is setup in Eclipse just fine. I added apache commons, spring 3.0 as a dependancy.

I created a test controller using annotations, and a jsp file.

In eclipse, I only see a Run option, and no build option. With maven2 pom.xml setup etc., is just clicking on Run enough to build the project?

+1  A: 

If you have m2eclipse installed and if your project is recognized as a "Maven project", then you should have more entries in the Run As... and Debug As... menus allowing to run a Maven build within Eclipse:

alt text

And if you don't have m2eclipse installed, either install it(!) or launch Maven as External Tools (but this won't provide "real" integration).

Pascal Thivent
hmm..I have m2eclipse installed since I created a project via the Maven wizards. But my Run As only has 1 option to 'run on server' I do have a maven option like you have in the menu below the 'validate' option.
Blankman
ok the 'Run' main menu option isn't showing all those options, but I see it when I right-click on the project and go to RunAs
Blankman
@Blankman You didn't mention m2eclipse nor that you used the wizards to create a Maven project, readers can't guess it you know. You should add these kind of context details to your question next time. Also, when asking a maven question (even if this one is more m2eclipse related), it is often handy to provide your POM so that people can reproduce the problem (if any). Anyway, glad to know that you found your way.
Pascal Thivent