A required class was missing while executing org.apache.maven.plugins:maven-war-plugin:2.1.1:war

后端 未结 9 718
小蘑菇
小蘑菇 2020-12-31 01:46

Here is my clean install -x result:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] --         


        
相关标签:
9条回答
  • 2020-12-31 02:11

    Try to delete the maven folder at ~/.m2/repository/org/apache/maven and build your project again to force the maven libraries be downloaded. This worked for me the last time I faced this java.lang.NoClassDefFoundError: org/apache/maven/shared/filtering/MavenFilteringException.

    0 讨论(0)
  • 2020-12-31 02:23

    Faced the same issue and resolved by upgrading my Maven from 3.0.4 to 3.1.1. Please try with v3.1.1 or any higher version if available

    0 讨论(0)
  • 2020-12-31 02:24

    You should add maven-resources-plugin in your pom.xml file. Deleting ~/.m2/repository does not work always.

            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
            </plugins>
    

    Now build your project again. It should be successful!

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