viudes
Outubro 19, 2012, 7:31am
#1
Olá pessoal,
Não encontrei em nenhum lugar, estou tendo um problema no bluid de um projeto web .war
Sou novato com maven ainda
Aparece o seguinte erro:
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:war (default-war) on project EmailServer: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [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/MojoExecutionException
Quem tiver alguma sugestão??
Cara Tem como voce postar o Web.xml e o Pom.xml aí
viudes
Outubro 19, 2012, 8:15am
#3
ta ai
pom:
[code]<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.viudes.email</groupId>
<artifactId>EmailServer</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Servidor de envio de emails</name>
<packaging>war</packaging>
<url>http://maven.apache.org </url>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>
</dependencies>
<build>
<defaultGoal>install</defaultGoal>
<finalName>EmailServer</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<executions>
<execution></execution>
</executions>
</plugin>
</plugins>
</build>
</project>[/code]
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>email-server</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/spring.xml</param-value>
</context-param>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
</web-app>
ta ai
deixe desse jeito
isso é para resolver
<build>
<defaultGoal>install</defaultGoal>
<finalName>EmailServer</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<!-- Java EE 6 doesn't require web.xml, Maven needs to catch up! -->
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
<executions>
<execution></execution>
</executions>
</plugin>
</plugins>
</build>
viudes
Outubro 19, 2012, 10:49am
#5
eee \o/ valew era isso mesmo…