1
resposta

Erro mvn jetty:run

Quando tento executar o jetty dá o seguinte erro:

[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo
/maven-metadata.xml
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/
plugins/maven-metadata.xml
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/p
lugins/maven-metadata.xml (14 kB at 12 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/
maven-metadata.xml (20 kB at 18 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.910 s
[INFO] Finished at: 2020-04-09T19:30:35-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'jetty' in the current project and in the plu
gin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repo
sitories [local (C:\Users\User\.m2\repository), central (https://repo.maven.apac
he.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundF
orPrefixException
'cmd' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.
1 resposta

Oi Silmara, tudo bem?

No seu pom.xml troque a versão do jetty conforme abaixo:

<dependency>
    <groupId>org.eclipse.jetty</groupId>
    <artifactId>jetty-maven-plugin</artifactId>
    <version>9.4.24.v20191120</version>
</dependency>

Essa versão 9.4.24-SNAPSHOT do projeto não existe no repository central do maven, então não está conseguindo fazer o download.

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software