On Sat, 17 Mar 2012 19:21:20 -0300, Chris Mylonas <ch...@opencsta.org> wrote:

Hi mate,

Hi, muchachos!

When I'm working on the web stuff I stick to running jetty from the command line because sometimes the tools within eclipse don't work as advertised and therefore I stick to the command line - mvn / jetty come to mind. The fact that it runs from the command line makes it point to an eclipse plugin problem rather than a tapestry problem.

This situation is really, really weird. I've never had this kind of problem, and I've had projects launching Jetty from Maven (command-line), Maven (m2eclipse and m2e plugins), JettyLauncher (years ago), RunJettyRun and through embedded Jetty instance (my favorite).

Here's my preferred way of launching Jetty: embedded, through code. I add Jetty 7 as a test dependency and this class in src/test/java:

package test;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;

public class Main {

        public static void main(String[] args) throws Exception {
                
                Server server = new Server(8080);
                
        WebAppContext context = new WebAppContext();
        context.setDescriptor("src/main/webapp/WEB-INF/web.xml");
        context.setResourceBase("src/main/webapp");
        context.setContextPath("/");
        context.setParentLoaderPriority(true);

        server.setHandler(context);

        server.start();
        server.join();

        }

}

Then I just run or debug this class inside Eclipse (or your IDE of choice). Couldn't be simpler. :)

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to