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>
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.
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.
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With