title: Maven goal raises "Required goal not found"
body: <p>I am trying to generate a maven plugin as described in <a href="http://maven.apache.org/guides/plugin/guide-java-plugin-development.html" rel="nofollow">the maven documentation</a>.</p>
  
  <p>So I created a new plugin project with Eclipse, using the mvn archetype:</p>
  
  <pre><code>&lt;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"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;com.test&lt;/groupId&gt;
    &lt;artifactId&gt;hotdeploy&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;maven-plugin&lt;/packaging&gt;
    &lt;description&gt;Maven Plugin to hotdeploy portlets to server&lt;/description&gt;
    &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.apache.maven&lt;/groupId&gt;
        &lt;artifactId&gt;maven-plugin-api&lt;/artifactId&gt;
        &lt;version&gt;2.2.1&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>I used the created java class file:</p>
  
  <pre><code>package com.test.mavenplugins;
  
  import org.apache.maven.plugin.AbstractMojo;
  import org.apache.maven.plugin.MojoExecutionException;
  
  /**
   * Hot Deploy something components to local server.
   * @goal hotdeploy
   */
  public class HotDeployMojo extends AbstractMojo {
       public void execute() throws MojoExecutionException
          {
              getLog().info("Hello, world.");
          }
  }
  </code></pre>
  
  <p>and ran <code>mvn install</code> without errors. Then I included this plugin in another project:</p>
  
  <pre><code>  &lt;build&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;groupId&gt;com.test&lt;/groupId&gt;
          &lt;artifactId&gt;hotdeploy&lt;/artifactId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
  </code></pre>
  
  <p>But when I call <code>mvn com.test:hotdeploy:hotdeploy</code>, I get the following error:</p>
  
  <pre><code>[INFO] ------------------------------------------------------------------------
  [ERROR] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Required goal not found: com.test:hotdeploy:hotdeploy in com.test:hotdeploy:0.0.1-SNAPSHOT
  [INFO] ------------------------------------------------------------------------
  </code></pre>
  
  <p>Can anybody help me resolve this error?</p>