Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing Maven Plugin Jetty

I am having trouble folowing this http://hrycan.com/2012/03/28/primefaces-lazy-loading-datatable-for-jsf2/

It says I should just run

mvn jetty:run

but I keep on encountering this error.

org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: No plugin found
for prefix 'jetty' in the current project and in the plugin groups [org.apache.m
aven.plugins, org.codehaus.mojo] available from the repositories [local (C:\MyRepo), central (http://repo1.maven.org/maven2)]
        at org.apache.maven.plugin.prefix.internal.DefaultPluginPrefixResolver.r

I used Maven 3 here.

Any thoughts?

ADD:

From the link, it has this already in the pom.xml

<plugin>
    <groupId>org.mortbay.jetty</groupId>
    <artifactId>jetty-maven-plugin</artifactId>
    <version>7.5.1.v20110908</version>
    <dependencies>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>${mysql.version}</version>
        </dependency>
    </dependencies>
</plugin>
like image 597
Mark Estrada Avatar asked May 03 '12 06:05

Mark Estrada


People also ask

How to install Jetty maven plugin?

Adding Jetty Plugin to your pom. xml xml, add the jetty plugin in the build > plugins section. You can change the default port of 8080 to something you want to avoid any conflicting port if you are running multiple instances of Jetty. Or add a hot-swap functionality that auto reloads Jetty to deploy the changed file.

What is jetty maven plugin?

The Jetty Maven plugin is useful for rapid development and testing. You can add it to any webapp project that is structured according to the usual Maven defaults. The plugin can then periodically scan your project for changes and automatically redeploy the webapp if any are found.


1 Answers

The instructions at (http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html) say to put the version as ${project.version} which is wrong! Also, the older documentation has the groupId set to org.codehaus.mojo it should be set to org.eclipse.jetty.

I added a real version from the jetty repo (http://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-maven-plugin/) and changed the groupId.

<plugin>
  <groupId>org.eclipse.jetty</groupId>
  <artifactId>jetty-maven-plugin</artifactId>
  <version>9.0.5.v20130815</version>
</plugin>
like image 138
Doug Avatar answered Oct 02 '22 14:10

Doug