Solucionado (ver solução)
Solucionado
(ver solução)
2
respostas

http erro 503

Quando faço o mvn install em produtos, e coloco ele como dependencia de lojaweb, e subo o jetty, tenho esse erro:

[INFO] Scanning for projects...
[INFO] 
[INFO] ---------------------< br.com.alura.maven:lojaweb >---------------------
[INFO] Building lojaweb Maven Webapp 1.0.0-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] >>> jetty-maven-plugin:9.3.7.v20160115:run (default-cli) > test-compile @ lojaweb >>>
[INFO] 
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ lojaweb ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Francisco\Desktop\GABRIEL\workspace\lojaweb\src\main\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ lojaweb ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ lojaweb ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Francisco\Desktop\GABRIEL\workspace\lojaweb\src\test\resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ lojaweb ---
[INFO] No sources to compile
[INFO] 
[INFO] <<< jetty-maven-plugin:9.3.7.v20160115:run (default-cli) < test-compile @ lojaweb <<<
[INFO] 
[INFO] 
[INFO] --- jetty-maven-plugin:9.3.7.v20160115:run (default-cli) @ lojaweb ---
[INFO] Logging initialized @2965ms
[INFO] Configuring Jetty for project: lojaweb Maven Webapp
[INFO] webAppSourceDirectory not set. Trying src\main\webapp
[INFO] Reload Mechanic: automatic
[INFO] Classes = C:\Users\Francisco\Desktop\GABRIEL\workspace\lojaweb\target\classes
[INFO] Context path = /loja
[INFO] Tmp directory = C:\Users\Francisco\Desktop\GABRIEL\workspace\lojaweb\target\tmp
[INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml
[INFO] Web overrides =  none
[INFO] web.xml file = file:///C:/Users/Francisco/Desktop/GABRIEL/workspace/lojaweb/src/main/webapp/WEB-INF/web.xml
[INFO] Webapp directory = C:\Users\Francisco\Desktop\GABRIEL\workspace\lojaweb\src\main\webapp
[INFO] jetty-9.3.7.v20160115
[WARNING] Failed startup of context o.e.j.m.p.JettyWebAppContext@66e889df{/loja,file:///C:/Users/Francisco/Desktop/GABRIEL/workspace/lojaweb/src/main/webapp/,STARTING}{file:///C:/Users/Francisco/Desktop/GABRIEL/workspace/lojaweb/src/main/webapp/}
java.lang.RuntimeException: Error scanning entry module-info.class from jar file:///C:/Users/Francisco/.m2/repository/com/google/code/gson/gson/2.8.6/gson-2.8.6.jar
    at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:937)
    at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:851)
    at org.eclipse.jetty.annotations.AnnotationConfiguration$ParserTask.call(AnnotationConfiguration.java:163)
    at org.eclipse.jetty.annotations.AnnotationConfiguration$1.run(AnnotationConfiguration.java:548)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException
    at org.objectweb.asm.ClassReader.<init>(Unknown Source)
    at org.objectweb.asm.ClassReader.<init>(Unknown Source)
    at org.objectweb.asm.ClassReader.<init>(Unknown Source)
    at org.eclipse.jetty.annotations.AnnotationParser.scanClass(AnnotationParser.java:1003)
    at org.eclipse.jetty.annotations.AnnotationParser.parseJarEntry(AnnotationParser.java:984)
    at org.eclipse.jetty.annotations.AnnotationParser.parseJar(AnnotationParser.java:933)
    ... 6 more
[INFO] Started ServerConnector@1f64f782{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
[INFO] Started @3602ms
[INFO] Started Jetty Server
2 respostas
solução!

uma solução que encontrei foi tirar a dependencia do plugin gson 2.8.6 do projeto produtos, dar um mvn clean install nos produtos, depois mvn install, e linkar novamente com loja web ;)

Esse recurso module-info.class do GSON que você está usando no projeto é um recurso Java9 (JPMS).

Você terá que usar o Jetty 9.4.9 (ou mais recente) para suportar as novas alterações de arquivo JAR do Java 9.