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

后端 未结 14 847
执念已碎
执念已碎 2021-01-30 12:27
[INFO] [war:war {execution: default-war}]
[INFO] Packaging webapp
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[IN         


        
相关标签:
14条回答
  • 2021-01-30 12:49

    For me changing plugin version could not solve problme and changing JDK version is not in my control.

    However running mvn clean before mvn tomcat6:deploy solved this problem.

    0 讨论(0)
  • 2021-01-30 12:54

    Confirmed, I ran into the same issue with maven 3.0.2 and jdk 1.7.0_02. After running against jdk 1.6.0_30 it compiled just fine.

    0 讨论(0)
  • 2021-01-30 12:54

    I was getting the same error after i upgraded my java version from 8 to some 8.x, i fixed it by going to pom then 1. right click > maven > add plugin 2. type in org.apache.maven and then look for war plugin add it and save, then just clean and install. It should work.

    0 讨论(0)
  • 2021-01-30 12:56

    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.

    0 讨论(0)
  • 2021-01-30 12:58

    I don't think the version was the problem. I solved deleting my target folder (because it contains webapp-cache.xml) and doing Maven install again.

    0 讨论(0)
  • 2021-01-30 13:01

    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.

    0 讨论(0)
提交回复
热议问题