Oi Turini.
Adicionei a dependência, mas o erro persistiu. Segue a arvore de dependências:
[INFO] Building teste-jetty 4.2.0-RC4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.3:tree (default-cli) @ teste-jetty ---
[INFO] br.com.caelum:teste-jetty:war:4.2.0-RC4-SNAPSHOT
[INFO] +- br.com.caelum:vraptor:jar:4.2.0-RC3:compile
[INFO] | +- com.google.guava:guava:jar:15.0:compile
[INFO] | +- br.com.caelum:iogi:jar:1.0.0:compile
[INFO] | +- org.javassist:javassist:jar:3.18.1-GA:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.5:compile
[INFO] | +- net.vidageek:mirror:jar:1.6.1:compile
[INFO] | +- com.thoughtworks.paranamer:paranamer:jar:2.7:compile
[INFO] | +- com.thoughtworks.xstream:xstream:jar:1.4.7:compile
[INFO] | | +- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] | | \- xpp3:xpp3_min:jar:1.1.4c:compile
[INFO] | +- com.google.code.gson:gson:jar:2.2.4:compile
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] | +- javax.interceptor:javax.interceptor-api:jar:1.2:compile
[INFO] | +- javax.ejb:javax.ejb-api:jar:3.2:compile
[INFO] | | \- javax.transaction:javax.transaction-api:jar:1.2:compile
[INFO] | \- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] +- br.com.caelum.vraptor:vraptor-java8:jar:4.0.0.Final:compile
[INFO] +- org.jboss.weld.servlet:weld-servlet-core:jar:2.1.2.Final:compile
[INFO] | +- org.jboss.weld:weld-spi:jar:2.1.Final:compile
[INFO] | | \- javax.inject:javax.inject:jar:1:compile
[INFO] | +- org.jboss.spec.javax.el:jboss-el-api_3.0_spec:jar:1.0.0.Alpha1:compile
[INFO] | \- org.jboss.logging:jboss-logging:jar:3.1.3.GA:compile
[INFO] +- org.jboss.weld:weld-core-impl:jar:2.1.2.Final:compile
[INFO] | +- javax.enterprise:cdi-api:jar:1.1:compile
[INFO] | +- org.jboss.weld:weld-api:jar:2.1.Final:compile
[INFO] | +- org.jboss.classfilewriter:jboss-classfilewriter:jar:1.0.4.Final:compile
[INFO] | +- org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:jar:1.0.0.Alpha1:compile
[INFO] | \- org.jboss.spec.javax.interceptor:jboss-interceptors-api_1.2_spec:jar:1.0.0.Alpha3:compile
[INFO] +- javax.el:el-api:jar:2.2:provided
[INFO] +- org.hibernate:hibernate-validator-cdi:jar:5.1.1.Final:compile
[INFO] | \- org.hibernate:hibernate-validator:jar:5.1.1.Final:compile
[INFO] | \- com.fasterxml:classmate:jar:1.0.0:compile
[INFO] +- javax.servlet:jstl:jar:1.2:compile
[INFO] +- javax.servlet:javax.servlet-api:jar:3.1.0:provided
[INFO] \- org.slf4j:slf4j-log4j12:jar:1.7.5:compile
[INFO] \- log4j:log4j:jar:1.2.17:compile
Além disso, percebi nas instruções do heroku que a forma de startar a aplicação é diferente, é por meio do jetty-runner.jar. Daí a cara do erro fica um pouco diferente, mas ainda relacionado ao ApplicationContextFacade.
https://devcenter.heroku.com/articles/deploy-a-java-web-application-that-launches-with-jetty-runner
A forma de startar no meu caso seria:
$ java -jar target/dependency/jetty-runner.jar target/teste-jetty.war
Como disse no início, estou fazendo os testes a partir do blank-project do vraptor. Fiz poucas alterações no pom.xml para incluir as partes do jetty e java8 (e tirei algumas coisas que não usaria – creio). Segue o pom.xml que estou testando:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.caelum</groupId>
<artifactId>teste-jetty</artifactId>
<version>4.2.0-RC4-SNAPSHOT</version>
<packaging>war</packaging>
<description>A blank project to start using VRaptor 4</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<vraptor.version>4.2.0-RC3</vraptor.version>
<weld.version>2.1.2.Final</weld.version>
<vraptor.jpa.version>4.0.4</vraptor.jpa.version>
<mysql.connector.version>5.1.33</mysql.connector.version>
<!-- indicada pelo heroku -->
<jetty.version>9.3.3.v20150827</jetty.version>
</properties>
<build>
<finalName>${project.artifactId}</finalName>
<outputDirectory>${basedir}/src/main/webapp/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-runner</artifactId>
<version>${jetty.version}</version>
<destFileName>jetty-runner.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.version}</version>
<configuration>
<webApp>
<contextPath>/${project.build.finalName}</contextPath>
</webApp>
<contextXml>src/main/webapp/WEB-INF/jetty-context.xml</contextXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>br.com.caelum</groupId>
<artifactId>vraptor</artifactId>
<version>${vraptor.version}</version>
</dependency>
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-java8</artifactId>
<version>4.0.0.Final</version>
</dependency>
<!-- Gera erro -->
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-jpa</artifactId>
<version>${vraptor.jpa.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-core</artifactId>
<version>${weld.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core-impl</artifactId>
<version>${weld.version}</version>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>2.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator-cdi</artifactId>
<version>5.1.1.Final</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.5</version>
</dependency>
</dependencies>
</project>
Me antecipei e comecei os testes com o Tomcat (tanto embedded como por meio do webapp-runner), mas também encontrei erros, mas dessa vez diferentes (o erro ocorre quando adiciono a dependência do vraptor-jpa). Abri um outro tópico pra não misturar as coisas. O link está abaixo.
https://cursos.alura.com.br/forum/topico-erro-ao-startar-sistema-feito-com-vraptor-nos-moldes-do-heroku-com-tomcat-8-embedded-ou-webapp-runner-causa-aparente-plugin-vraptor-jpa-26939
Cara, to apavorado com esse deploy, já empenhei o tempo que não tenho nesse processo. O pior é que não trabalho com uma equipe de desenvolvedores. Sou eu, os livros vocês e a internet, rsrs.
Desde já agradeço!