Cannot read lifecycle mapping metadata for artifact org.apache.maven.plugins:mav

后端 未结 7 1799
执念已碎
执念已碎 2020-12-11 11:05

Earlier today i was just doing some work on a maven project i just imported in and i was having some trouble with it. It wasn\'t getting a certain dependency. I tried deleti

相关标签:
7条回答
  • 2020-12-11 11:36

    I had the same error. I removed the directory containing the different versions of the maven-war-plugin from my local repository. After this I startet the build with mvn install -U to update all the plugins.

    The plugin was downloaded again and the error was gone.

    0 讨论(0)
  • 2020-12-11 11:38

    Check if you have set path variables for MAVEN_HOME and JAVA_HOME correctly. Then Delete the folder ${HOME}/.m2/repository/org/apache/maven/plugins/maven-site-plugin and then update the project. For more details. go to https://www.eclipse.org/lists/m2e-users/msg04952.html

    Above worked for me. Hope this helps.

    0 讨论(0)
  • 2020-12-11 11:41

    In Ubuntu to solve this I use this command on Terminal:

    sudo rm -rf ~/.m2/repository

    0 讨论(0)
  • 2020-12-11 11:55

    I don't want to resurrect this topic, but I had the same error. When I make a Maven project on Eclipse/Windows and when I import this same project on Eclipse/OSX.

    To fix it : right click on your project -> Maven -> Update Project

    I have this issue on all my projects and this fix them always

    0 讨论(0)
  • 2020-12-11 11:57

    Step 1) Please download the jar files Manually (Outside of Maven ) and place it in C:\Users\.m2\repository\org\apache\maven\plugins.

    Step 2) Delete the project from Eclipse and import it as maven project.

    This issue will happen because some of the Maven plugin jar files not being downloaded properly . example : If pox.xml file showing the error "Cannot read lifecycle mapping metadata for artifact org.apache.maven.plugins:maven-site-plugin:maven-plugin:3.0-beta-3:runtime Cause: error in opening zip file" then manually download the maven-site-plugin.jar (download the right version that ur project is expecting) and place it in C:\Users\.m2\repository\org\apache\maven\plugins.

    Ananth k

    0 讨论(0)
  • 2020-12-11 11:58

    When I add below tags in pom.xml , the problem has been resolved.

    <build>
    <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                    <configuration>
                        <source>1.7</source>
                        <target>1.7</target>
                    </configuration>
                </plugin>
    </plugins>
    </build>
    
    0 讨论(0)
提交回复
热议问题