Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor

Perhaps a version of maven war plugin is being used, which does not work with Java 7? As per this issue (which describes a similar problem), 2.1.1 version of maven war plugin should work.

Include the following in your pom.xml

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-war-plugin</artifactId>
    <version>2.1.1</version>
</plugin>

I had this problem when doing a mvn install. I resolved it by doing a mvn clean first, followed by a mvn install.

Using maven 2.1.1, JDK 1.7.0.45.


It's confirmed: JDK7 with Maven 2.x will produce this error.

I am using Maven 2.2.1 and JDK7 and got this error. I changed the JDK to version 1.6 and it's working fine.

Tags:

Maven

Maven 2