javamavenjettyplayn

Playn demo won't launch HTML version


I'm trying to follow Playn's getting started guide, but the HTML version won't launch.

I can successfully run the Java versions of the showcase and hello projects, but when I try to launch the HTML versions I get errors.

I can run the compile and test goals successfully:

cd playn-samples/hello
mvn -Phtml compile
mvn -Phtml test

This fails, though:

mvn -Phtml integration-test

The pom file is at Google code, and here are some sections of the output:

[INFO] [gwt:compile {execution: default}]
[INFO] playn.sample.hello.HelloGame is up to date. GWT compilation skipped
[INFO] [war:war {execution: default-war}]
[INFO] Packaging webapp
[INFO] Assembling webapp [playn-hello-html] in [/home/don/git/playn-samples/hello/html/target/playn-hello-html-1.0-SNAPSHOT]
...
[INFO] [war:war {execution: default-war}]
[INFO] Packaging webapp
[INFO] Assembling webapp [playn-hello-html] in [/home/don/git/playn-samples/hello/html/target/playn-hello-html-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/don/git/playn-samples/hello/html/src/main/webapp]
[INFO] Webapp assembled in [348 msecs]
[INFO] Building war: /home/don/git/playn-samples/hello/html/target/playn-hello-html-1.0-SNAPSHOT.war
[INFO] WEB-INF/web.xml already added, skipping
[WARNING] POM for 'org.eclipse.jetty:jetty-xml:pom:8.0.0.v20110901:runtime' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'org.eclipse.jetty:jetty-servlet:pom:8.0.0.v20110901:runtime' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'org.apache.geronimo.specs:geronimo-jta_1.1_spec:pom:1.1.1:runtime' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'org.eclipse.jetty:jetty-jndi:pom:8.0.0.v20110901:runtime' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'org.apache.geronimo.specs:geronimo-annotation_1.0_spec:pom:1.1.1:runtime' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'asm:asm-commons:pom:3.1:runtime' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'org.eclipse.jetty:jetty-server:pom:8.0.0.v20110901:runtime' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[INFO] [jetty:run-exploded {execution: test-html}]
[INFO] Configuring Jetty for project: PlayN Hello HTML
[INFO] Context path = /
[INFO] Tmp directory = /home/don/git/playn-samples/hello/html/target/tmp
[INFO] Web defaults = org/eclipse/jetty/webapp/webdefault.xml
[INFO] Web overrides =  none
[INFO] Starting jetty 8.0.0.v20110901 ...
2014-08-04 21:49:23.261:INFO:oejs.Server:jetty-8.0.y.z-SNAPSHOT
2014-08-04 21:49:24.364:INFO:oejpw.PlusConfiguration:No Transaction manager found - if your webapp requires one, please configure one.
2014-08-04 21:49:24.371:WARN:oejuc.AbstractLifeCycle:FAILED o.m.j.p.JettyWebAppContext{/,file:/home/don/git/playn-samples/hello/html/target/playn-hello-html-1.0-SNAPSHOT/},/home/don/git/playn-samples/hello/html/target/playn-hello-html-1.0-SNAPSHOT: java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
    at org.eclipse.jetty.annotations.AnnotationConfiguration.createAnnotationParser(AnnotationConfiguration.java:106)
    at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:73)
    at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:426)

I've tried running the package goal as recommended by another answer, as well as running the dependency:tree goal, but I haven't made any progress.


Solution

  • Turns out I just needed to read the error messages more closely. When I went and looked at one of the pom files it was complaining about, I found an HTML 301 response page.

    Deleting all the artifacts with invalid poms from my local Maven repository fixed the problem when Maven downloaded them again.

    Either there was a temporary problem in the remote Maven repository, I ended up hitting a different mirror of the Maven repository, or I upgraded to a new version of Maven that properly handles 301 redirects. I'm now using Maven 3.0.5.