1
resposta

BUILD FAILURE ao tentar gerar projeto quickstart

Ao rodar o comando:

mvn archetype:generate -DartifactId=produtos -DgroupId=br.com.alura.maven -DinteractiveMode=false -DarchetypeArtifactId=maven-archetype-quickstart

Aparece o seguinte erro:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.171 s
[INFO] Finished at: 2019-12-03T12:45:57-03:00
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\daviaraujo\Documents\curso). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException

As variáveis de ambiente e de usuário já estão todas configuradas.

1 resposta

Oi Davi, tudo bem?

Você precisa rodar o comando dentro do diretório que está o pom.xml do seu projeto. Pela mensagem de erro não existe nenhum pom.xml em "C:\Users\daviaraujo\Documents\curso".

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