views:

1214

answers:

2

I'm trying to work through the Tapestry tutorial.

I think I got everything set up right and so far so good but I get to the part where the tut rather glibly states:

Change into the newly created directory, and execute the command:

mvn jetty:run

Again, the first time, there's a dizzying number of downloads, but before you know it, the Jetty servlet container is up and running.

I wish! that only results in the following error.

The plugin 'org.apache.maven.plugins:maven-jetty-plugin' does not exist or no valid version could be found

I have maven-2.2.0, Jetty-5.1.9

The only thing I did different to what the tutorial stated was I used archetype:generate instead of archetype:create as create failed and noted it was deprecated and suggested generate instead.

+4  A: 

Unfortunately the tapestry 5 tutorial is not always in sync with the latest tapestry release or maven for that matter.

Take a look at this page instead.

I tested this using maven 2.2.0 and a clean repository, no need to download jetty separately especially if you are going to be using Run-Jetty-Run eclipse plugin (successor to jetty launcher).

Be warned when they say a lot of downloads, they mean a lot.

A: 

It can't find it because it's not in the default org.apache.maven.plugins or org.codehaus.mojo locations where Maven looks by default to map the prefix to an artifactId. You have two choices, define the plugin in your pom, or add the jetty group as a pluginGroup in your settings.xml

Brian Fox
Thanks Brain. I will check this one out as well. While @xorza's answer does indeed work, it does not actualy solve the problem.
Ron Tuffin
This is what you want if jetty isn't otherwise configured in your pom:<profile> ... <pluginGroups> <pluginGroup>org.mortbay.jetty</pluginGroup> </pluginGroups></profile>See http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin
Brian Fox