Ne pouvait pas trouver de but dans la coutume plugin maven

Je suis en train de développer son propre plugin Maven, je suis le tutoriel officiel, maven de la documentation, comme décrit ici:

http://maven.apache.org/guides/plugin/guide-java-plugin-development.html

Cependant, lorsque j'essaie d'utiliser mon plugin à partir d'un autre projet que j'ai d'obtenir les éléments suivants:

Could not find goal 'generateProtoClasses' in plugin com.myComapny.maven.plugin:myCompany-protobuf-plugin:1.0 among available goals -> [Help 1]

C'est mon MOJO:

@Mojo(name = "generateProtoClasses", defaultPhase = LifecyclePhase.GENERATE_RESOURCES)
public class CompileProtoClasses extends AbstractMojo {


    @Parameter(defaultValue = "mokmok")
    private String inputPath;

    public void execute() throws MojoExecutionException {
        getLog().info("@@@@@@@@@@@@@@@@@@@@@@@");
        getLog().info(inputPath);
    }

}

C'est l'extrait de code sur la pom.xml fichier de projet à l'aide du plugin:

<plugin>
        <groupId>com.myCompany.maven.plugin</groupId>
        <artifactId>legolas-protobuf-plugin</artifactId>
        <version>1.0</version>
        <configuration>
          <inputPath>yoyo</inputPath>
        </configuration>
        <executions>
            <execution>
                <goals>
                    <goal>generateProtoClasses</goal>
                </goals>
            </execution>
        </executions>
    </plugin>

Pom du plugin projet:

<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>com.myCompany.maven.plugin</groupId>
    <artifactId>myCompany-protobuf-plugin</artifactId>
    <version>1.0</version>
    <packaging>maven-plugin</packaging>

    <name>protobuf-plugin Maven Plugin</name>

    <dependencies>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>3.0.5</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-tools-api</artifactId>
            <version>3.2</version>
        </dependency>


        <!-- dependencies to annotations -->
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.2</version>
            <!-- annotations are not needed for plugin execution so you can remove 
                this dependency for execution with using provided scope -->
            <scope>provided</scope>
        </dependency>
        <!-- generated help mojo has a dependency to plexus-utils -->
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>3.0.1</version>
        </dependency>


    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
Êtes-vous en utilisant le maven-plugin-annotations ? Pouvez-vous montrer le pom du plugin?
ajouté le pom du plugin
Changer le nom de votre classe en WhatEverMojo et le retest. Vérifiez si il pourrait être un problème ayant mélangé cas que vous avez en vous la classe.

OriginalL'auteur Noam Nevo | 2013-03-13