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

只谈情不闲聊 提交于 2019-11-28 12:57:51

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.

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>

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

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

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

sudo rm -rf ~/.m2/repository

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

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!