igor-petruk / protobuf-maven-plugin

Protobuf Maven Plugin

Home Page:http://igor-petruk.github.com/protobuf-maven-plugin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getting 'Plugin execution not covered by lifecycle configuration' error in eclipse

morgwai opened this issue · comments

full error message:

Plugin execution not covered by lifecycle configuration: com.github.igor-petruk.protobuf:protobuf-maven-plugin:0.3:run (execution: default, phase: generate-sources) pom.xml /monitoring line 34 Maven Project Build Lifecycle Mapping Problem

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>monitoring</groupId>
<artifactId>monitoring</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
    <dependency>
        <groupId>com.google.protobuf</groupId>
        <artifactId>protobuf-java</artifactId>
        <version>2.4.1</version>
    </dependency>
</dependencies>
<build>
    <sourceDirectory>${basedir}/java</sourceDirectory>
    <testSourceDirectory>${basedir}/javaTests</testSourceDirectory>
    <outputDirectory>${basedir}/bin</outputDirectory>
    <testOutputDirectory>${basedir}/bin</testOutputDirectory>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>com.github.igor-petruk.protobuf</groupId>
            <artifactId>protobuf-maven-plugin</artifactId>
            <version>0.3</version>
            <executions>
                <execution>
                    <goals>
                        <goal>run</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
</project>

ah, it is eclipse problem apparently which can be workarounded as documented here http://wiki.eclipse.org/M2E_plugin_execution_not_covered

Thanks for the post. I'll take a look to http://wiki.eclipse.org/M2E_compatible_maven_plugins, I hope it will help making the plugin compatible with m2e out of the box

ah, that would be a great addition!
thanks for your work on this plugin!

You can try 0.4 version of the plugin now. You need M2Eclipse 1.1 from http://download.eclipse.org/technology/m2e/milestones/1.1

This is so awesome now!!
Not only I don't have to add some weird pluginManagement config, but also I don't have to workaround the problem that eclipse doesn't see sources generated by the plugin! Great, great, great!! :DDD
Once again many thanks for your terrific work!

Nice to hear. Thanks )