views:

16

answers:

1

I often work in Eclipse, but recently switched to TextMate, which is, in my opinion, the best text editor out there, barring perhaps VIM or something like that (but I find the learning curve too steep to jump into that quite yet).

The disadvantage is I don't really know how to run Maven & Jetty w/out using Eclipse. The engineers at work here set up Java projects that have POM files, etc. And it all runs fine in Eclipse, but I thought I heard somewhere that TextMate actually had a bundle somewhere to use Maven with, and I wondered if such a thing might include Jetty too.

I'm a UI guy, so please, keep the technical jargon down just a tad. (In other words, I don't do Java, though I understand some of it.)

A: 

You don't need anything fancy to run a Mavenized webapp on Jetty. Simply add the following snippet to your pom.xml (assuming your project has a packaging of type war as illustrated below):

<project>
  ...
  <packaging>war</packaging> <!-- this is the packaging for a webapp -->
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>maven-jetty-plugin</artifactId>
        <version>6.1.22</version>
      </plugin>
      ...
    </plugins>
    ...
  </build>
</project>

And just run the following command in a console:

mvn jetty:run

Just in case, there is a Maven bundle for TextMate allowing to invoke Maven from TextMate. You can check this mail for details.

Pascal Thivent