I've been having problems trying to get Maven to create a war for my
project using the IntelliJ Maven plugin. I keep getting a 'SEVERE:
springDispatcher: WARNING: Failed to get the SerializationPolicy'
warning whenever I deploy a war that Maven creates. However, building
a war through IntelliJ (with the same code) creates a fully
functioning war. To create a war via Maven, I use the pom.xml shown
below, run Lifecycle:clean, then gwt-maven:compile, then war:war.
What am I missing?
pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<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>org.cggh.wwarn</groupId>
<artifactId>wwarn_register_test</artifactId>
<packaging>war</packaging>
<version>1.0</version>
<inceptionYear>2009</inceptionYear>
<pluginRepositories>
<pluginRepository>
<id>gwt-maven</id>
<url>
http://gwt-maven.googlecode.com/svn/trunk/mavenrepo</
url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>gwt-maven</id>
<url>
http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/
</url>
</repository>
<repository>
<id>gilead</id>
<url>
https://gilead.svn.sourceforge.net/svnroot/gilead/gilead/maven-repo/
</url>
</repository>
<repository>
<id>MVNRepository</id>
<name>MVNRepository</name>
<layout>default</layout>
<url>
http://repository.jboss.com/maven2/</url>
</repository>
</repositories>
<properties>
<gwtVersion>1.7.0</gwtVersion>
<war.classes.includes>true</war.classes.includes>
</properties>
<build>
<resources>
<resource>
<directory>src</directory>
<includes>
<include>**/client/**</include>
<include>**/public/**</include>
<include>**/*.gwt.xml</include>
<include>**/*.cfg.xml</include>
</includes>
</resource>
</resources>
<plugins>
<!--Required to allow annotations-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<!--To facilitate war compilation-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<webXml>web/WEB-INF/web.xml</webXml>
</configuration>
</plugin>
<!--Allow automatic GWT code compilation-->
<plugin>
<groupId>com.totsp.gwt</groupId>
<artifactId>maven-googlewebtoolkit2-plugin</artifactId>
<version>2.0-RC1</version>
<configuration>
<gwtHome>C:\gwt-windows-1.7.0</gwtHome>
<logLevel>INFO</logLevel>
<compileTargets>
<value>registration.registration</value>
</compileTargets>
<runTarget>registration.registration/registration.html</
runTarget>
<style>DETAILED</style>
<noServer>false</noServer>
<extraJvmArgs>-Xmx512m</extraJvmArgs>
<gwtVersion>${gwtVersion}</gwtVersion>
</configuration>
</plugin>
</plugins>
<!--Include source-->
<sourceDirectory>src</sourceDirectory>
</build>
<dependencies>
<dependency>
<groupId>org.cggh.wwarn</groupId>
<artifactId>register-interest-rpc-interface</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwtVersion}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version>
<scope>system</scope>
<systemPath>C:\gwt-windows-1.7.0\gwt-user.jar</systemPath>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwtVersion}</version>
<scope>system</scope>
<systemPath>C:\gwt-windows-1.7.0\gwt-dev-windows.jar</
systemPath>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>net.sf.gwt-widget</groupId>
<artifactId>gwt-sl</artifactId>
<version>0.1.5</version>
</dependency>
<dependency>
<groupId>net.sf.gilead</groupId>
<artifactId>adapter-core</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>net.sf.gilead</groupId>
<artifactId>adapter4gwt</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>net.sf.gilead</groupId>
<artifactId>adapter-actionscript</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>net.sf.gilead</groupId>
<artifactId>hibernate-util</artifactId>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>20040616</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>
3.2.6.ga</version>
<exclusions>
<exclusion>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-cglib-repack</artifactId>
<version>2.1_3</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>
3.4.0.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>
3.4.0.GA</version>
</dependency>
</dependencies>
</project>