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

user2573819 picture user2573819 · Jul 23, 2013 · Viewed 33.7k times · Source

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 deleting the dependency folder then re downloading it and cleaning the project then updating it but it done nothing. Then i noticed that my other maven project popped up with an error with the pom.xml that the first one had as well. "Cannot read lifecycle mapping metadata for artifact org.apache.maven.plugins:mav" I updated maven to 3.1.0 still nothing. Here's my pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.kyle.burnett</groupId>
<artifactId>Sky-Block-Wars</artifactId>
<version>1.0.0</version>
<name>Sky-Block Wars</name>
<url>http://dev.bukkit.org/bukkit-plugins/sky-block-wars/</url>
<description>Shrunk
</description>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
    <dependency>
        <groupId>org.bukkit</groupId>
        <artifactId>craftbukkit</artifactId>
        <version>1.6.2-R0.1-SNAPSHOT</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.sk89q</groupId>
        <artifactId>worldedit</artifactId>
        <version>5.5.8-SNAPSHOT</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.bukkit</groupId>
        <artifactId>bukkit</artifactId>
        <version>1.6.2-R0.1-SNAPSHOT</version>
        <scope>provided</scope>
    </dependency>
</dependencies>
<repositories>
    <repository>
        <id>bukkit-repo</id>
        <url>http://repo.bukkit.org/content/groups/public</url>
    </repository>
    <repository>
        <id>sk89w repo</id>
        <url>http://maven.sk89q.com/repo</url>
        <!-- <url>http://maven.sk89q.com/artifactory/libs-release-local</url> -->
    </repository>
</repositories>
<build>
    <sourceDirectory>src/</sourceDirectory>
    <resources>
        <resource>
            <directory>resources</directory>
            <filtering>true</filtering>
        </resource>
    </resources>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
        </plugins>
</build>

Answer

Christian13467 picture Christian13467 · Sep 26, 2013

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.