[INFO] [war:war {execution: default-war}]
[INFO] Packaging webapp
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[IN
This definitely seems to be related to incompatible plugin, library and language versions.
Two years, and two Java versions later, I had this same error while doing a sample project from an older book on Spring and Hibernate.
I was able to resolve the error by commenting out all of the version tags for the apache.maven.plugins and setting the Java version to 1.8. This let me know what was the latest and greatest version of the libraries, with the cost of some warnings from Maven about missing the version tags. If you care about the warnings, you can set the version tags to be latest version and the warnings from Maven should go away.
I executed mvn clean package
and then just mvn package
.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<!-- <version>2.1-beta-1</version> -->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<!-- <version>2.1</version> -->
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
Apache Maven WAR Plugin 3.0.0 resolved all issues:
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
It doesn't matter if you use jdk 1.6, 1.7 or 1.8