To easily run my web application, I decided to add Jetty to my single POM file.
Following the official documentation , I added this to my <plugins>:
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.0-SNAPSHOT</version>
</plugin>
PROBLEM : mvn jetty:runfailed:
$ mvn jetty:start
[INFO] Scanning for projects...
[WARNING] The POM for org.eclipse.jetty:jetty-maven-plugin:jar:9.4.0-SNAPSHOT is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.jetty:jetty-maven-plugin:9.4.0-SNAPSHOT: Plugin org.eclipse.jetty:jetty-maven-plugin:9.4.0-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.eclipse.jetty:jetty-maven-plugin:jar:9.4.0-SNAPSHOT
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 KB at 2.1 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 KB at 3.2 KB/sec)
[INFO]
[INFO] BUILD FAILURE
[INFO]
[INFO] Total time: 7.013 s
[INFO] Finished at: 2016-08-17T16:49:28+09:00
[INFO] Final Memory: 14M/307M
[INFO]
[ERROR] No plugin found for prefix 'jetty' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/nico/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
Another approach at https://mvnrepository.com/artifact/org.eclipse.jetty/jetty-maven-plugin/9.4.0.M0 suggests adding this to <dependencies>:
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.0.M0</version>
</dependency>
It doesn't help either, mvn jetty:startsays:
[ERROR] No plugin found for prefix 'jetty' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/nico/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
I deleted the folder .m2and allowed Maven to recreate it, no better. I do not have settings.xmlin ~/.m2, but the contents are ~/.m2/repository/org/eclipse/jetty/jetty-maven-plugin/9.4.0.M0/:
-rw-rw-r-- 1 nico nico 101524 8月 24 17:29 jetty-maven-plugin-9.4.0.M0.jar
-rw-rw-r-- 1 nico nico 40 8月 24 17:29 jetty-maven-plugin-9.4.0.M0.jar.sha1
-rw-rw-r-- 1 nico nico 5526 8月 24 17:28 jetty-maven-plugin-9.4.0.M0.pom
-rw-rw-r-- 1 nico nico 40 8月 24 17:28 jetty-maven-plugin-9.4.0.M0.pom.sha1
-rw-rw-r-- 1 nico nico 215 8月 24 17:29 _remote.repositories
. . , Maven (mortbay, codehaus), , Jetty Eclipse, <plugin> .