Estava tentando criar um projeto apenas para praticar aqui, mas estou preso ainda nas configurações...
Quais são as dependências necessárias para iniciar um projeto?
Por enquanto o meu pom.xml
está assim:
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.naldson</groupId>
<artifactId>loja</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>loja Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>br.com.caelum</groupId>
<artifactId>vraptor</artifactId>
<version>4.1.4</version>
</dependency>
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-core</artifactId>
<version>2.1.2.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-core-impl</artifactId>
<version>2.1.2.Final</version>
</dependency>
<!-- Essa eu encontrei através de uma resposta do Rodrigo Turini em um
fórum -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator-cdi</artifactId>
<version>5.0.1.Final</version>
</dependency>
</dependencies>
<build>
<finalName>loja</finalName>
</build>
</project>
Está faltando algo?
O console da aplicação fica assim:
GRAVE: Exception starting filter vraptor
javax.servlet.ServletException: Dependencies were not set. Do you have a Weld/CDI listener setup in your web.xml?
at br.com.caelum.vraptor.VRaptor.validateIfCdiIsFound(VRaptor.java:177)
at br.com.caelum.vraptor.VRaptor.init(VRaptor.java:91)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4659)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5281)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
jan 16, 2016 1:51:23 PM org.apache.catalina.core.StandardContext startInternal
GRAVE: One or more Filters failed to start. Full details will be found in the appropriate container log file
jan 16, 2016 1:51:23 PM org.apache.catalina.core.StandardContext startInternal
GRAVE: Context [/loja] startup failed due to previous errors
jan 16, 2016 1:51:23 PM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler ["http-nio-8080"]
jan 16, 2016 1:51:23 PM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler ["ajp-nio-8009"]
jan 16, 2016 1:51:23 PM org.apache.catalina.startup.Catalina start
INFORMAÇÕES: Server startup in 2537 ms
Alguém poderia me ajudar? Grato!