Boa tarde, estou com erro ao tentar executar o comando: mvn package no projeto.. (sim já fiz o mvn install do projeto enviador de email)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.616 s
[INFO] Finished at: 2017-01-09T11:54:22-02:00
[INFO] Final Memory: 22M/221M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project vips: Compilation failure: Compilation failure:
[ERROR]
/c:/Users/Admin/workspace/vips/src/main/java/br/com/alura/vips/ConvidadosController.java:[11,34] package br.com.alura.enviadoremail does not exist
[ERROR] /c:/Users/Admin/workspace/vips/src/main/java/br/com/alura/vips/ConvidadosController.java:[48,21] cannot find symbol
[ERROR] symbol: class EmailService
[ERROR] location: class br.com.alura.vips.ConvidadosController
[ERROR] -> [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/MojoFailureException
Instalando o EnviadorEmail da sucesso:
c:\projetosMaven\enviadoremail>mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building enviadorEmail 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ enviadorEmail ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ enviadorEmail ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to c:\projetosMaven\enviadoremail\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ enviadorEmail ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory c:\projetosMaven\enviadoremail\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ enviadorEmail ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ enviadorEmail ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ enviadorEmail ---
[INFO] Building jar: c:\projetosMaven\enviadoremail\target\enviadorEmail-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:1.4.3.RELEASE:repackage (default) @ enviadorEmail ---
[INFO]
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ enviadorEmail ---
[INFO] Installing c:\projetosMaven\enviadoremail\target\enviadorEmail-0.0.1-SNAPSHOT.jar to C:\Users\Admin\.m2\repository\br\com\alura\enviadorEmail\enviadorEmail\0.0.1-SNAPSHOT\enviadorEmail-0.0.1-SNAPSHOT.jar
[INFO] Installing c:\projetosMaven\enviadoremail\pom.xml to C:\Users\Admin\.m2\repository\br\com\alura\enviadorEmail\enviadorEmail\0.0.1-SNAPSHOT\enviadorEmail-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.466 s
[INFO] Finished at: 2017-01-09T11:53:59-02:00
[INFO] Final Memory: 27M/213M
[INFO] ------------------------------------------------------------------------
Ja revi mais de uma vez o curso de Maven com o Guilherme e fiz exatamente o que ele explica la porem não funciona para essa classe de enviar email.. Funciona pelo eclipse quando ele importa a pasta, blz... agora quando preciso executar o mvn install e retiro o pasta ele não encontra o "new EmailService().enviar(nome, email);".
No exemplo do Guilherme funcionou perfeitamente tirar o projeto produtos, criar o jar etc.... Só nessa aqui que não da certo.
Agora eu utilizando o conteudo disponviel para baixar (que tambem funciona perfeitamente quando esta linkado no eclipse):
c:\Users\Admin\Downloads\springboot-aula4\springboot-aula4\Aula-4>mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building listavip 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ listavip ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 18 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ listavip ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 5 source files to c:\Users\Admin\Downloads\springboot-aula4\springboot-aula4\Aula-4\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /c:/Users/Admin/Downloads/springboot-aula4/springboot-aula4/Aula-4/src/main/java/br/com/alura/listavip/ConvidadoController.java:[43,21] cannot find symbol
symbol: class EmailService
location: class br.com.alura.listavip.ConvidadoController
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.062 s
[INFO] Finished at: 2017-01-09T13:50:55-02:00
[INFO] Final Memory: 22M/143M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project listavip: Compilation failure
[ERROR] /c:/Users/Admin/Downloads/springboot-aula4/springboot-aula4/Aula-4/src/main/java/br/com/alura/listavip/ConvidadoController.java:[43,21] cannot find symbol
[ERROR] symbol: class EmailService
[ERROR] location: class br.com.alura.listavip.ConvidadoController
[ERROR] -> [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/MojoFailureException
O projeto EnviadorEmail tambem já foi instalado com sucesso no repository, inclusive se eu der um dir lá olha ele aqui:
c:\Users\Admin\.m2\repository\br\com\alura\enviadoremail\enviadoremail\0.0.1-SNAPSHOT>dir
O volume na unidade C é Acer
O Número de Série do Volume é 9884-D7AC
Pasta de c:\Users\Admin\.m2\repository\br\com\alura\enviadoremail\enviadoremail\0.0.1-SNAPSHOT
09/01/2017 09:45 <DIR> .
09/01/2017 09:45 <DIR> ..
09/01/2017 13:30 7.250.456 enviadoremail-0.0.1-SNAPSHOT.jar
09/01/2017 11:50 1.586 enviadoremail-0.0.1-SNAPSHOT.pom
09/01/2017 13:30 725 maven-metadata-local.xml
09/01/2017 13:30 280 _remote.repositories
4 arquivo(s) 7.253.047 bytes
2 pasta(s) 162.112.520.192 bytes disponíveis
c:\Users\Admin\.m2\repository\br\com\alura\enviadoremail\enviadoremail\0.0.1-SNAPSHOT>