Instalação e configuração do maven

2 respostas
R

Pessoal,

baixei o maven 2.0.2, ja direcionei as variaveis de ambiente, estou rodando o mvn install e esta dando build error alguem que conhece poderia me ajudar me dizendo o que fazer, porque ele ta dizendo que ta faltando o pom so que o pom existe segue o erro abaixo:

C:\Users\odp107333>mvn install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Default Project [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/maven/pl ugins/maven-resources-plugin/2.3/maven-resources-plugin-2.3.pom 4K downloaded Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/maven/pl ugins/maven-plugins/12/maven-plugins-12.pom 11K downloaded Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/maven/ma ven-parent/9/maven-parent-9.pom 32K downloaded Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/apache/4 /apache-4.pom 4K downloaded Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/maven/pl ugins/maven-resources-plugin/2.3/maven-resources-plugin-2.3.jar 20K downloaded Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/maven/pl ugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.pom 2K downloaded Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/maven/pl ugins/maven-plugins/8/maven-plugins-8.pom 5K downloaded Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/maven/ma ven-parent/5/maven-parent-5.pom 14K downloaded Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/apache/3 /apache-3.pom 3K downloaded Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/maven/pl ugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.jar 17K downloaded Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/maven/pl ugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3.pom 6K downloaded Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/maven/su refire/surefire/2.4.3/surefire-2.4.3.pom 7K downloaded Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/maven/ma ven-parent/7/maven-parent-7.pom 20K downloaded Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/maven/pl ugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3.jar 22K downloaded Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/maven/pl ugins/maven-jar-plugin/2.2/maven-jar-plugin-2.2.pom 8K downloaded Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/maven/pl ugins/maven-plugins/10/maven-plugins-10.pom 7K downloaded Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/maven/pl ugins/maven-jar-plugin/2.2/maven-jar-plugin-2.2.jar 26K downloaded Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/maven/pl ugins/maven-install-plugin/2.2/maven-install-plugin-2.2.pom 2K downloaded Downloading: http://10.10.10.244/nexus/content/groups/public/org/apache/maven/pl ugins/maven-install-plugin/2.2/maven-install-plugin-2.2.jar 15K downloaded [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Cannot execute mojo: resources. It requires a project with an existing po m.xml, but the build is not using one. [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2 seconds [INFO] Finished at: Wed Aug 15 09:10:08 BRT 2012 [INFO] Final Memory: 4M/15M [INFO] ------------------------------------------------------------------------

2 Respostas

kdoigor

roda primeiro com a opção -e pra ter mais detalhes.
outra coisa, pq ta usando o 2.02 ? se o projeto pede 2.x usa a 2.09

R
C:\>mvn install -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Cannot execute mojo: resources. It requires a project with an existing po
m.xml, but the build is not using one.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Cannot execute mojo: res
ources. It requires a project with an existing pom.xml, but the build is not usi
ng one.
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:584)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:500)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:479)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:331)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:292)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:142)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:345)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:132)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:290)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot execute mojo:
resources. It requires a project with an existing pom.xml, but the build is not
using one.
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:380)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:559)
        ... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Wed Aug 15 10:02:33 BRT 2012
[INFO] Final Memory: 4M/15M
[INFO] ------------------------------------------------------------------------
C:\>

Não entendi o que vc disse eu tenho que baixar uma versão do maven inferior?

Criado 15 de agosto de 2012
Ultima resposta 15 de ago. de 2012
Respostas 2
Participantes 2