ok, resolved, my error, i forgot to explicitly include the compile
plugin, therefor my plugin was packaged but contained no classes.
thanx for the help. now i only need to force the using project to add
generated classes to the source dirs ;-)

regards
Leon

On Tue, Oct 5, 2010 at 8:11 AM, Leon Rosenberg <rosenberg.l...@gmail.com> wrote:
> Hello,
>
> thanks for the help.
>
> the plugin.xml (packaged) looks like follows:
> <?xml version="1.0" encoding="UTF-8"?>
> <plugin>
>  <description></description>
>  <groupId>net.anotheria</groupId>
>  <artifactId>maven-ano-doc-plugin</artifactId>
>  <version>1.0-SNAPSHOT</version>
>  <goalPrefix>ano-doc</goalPrefix>
>  <isolatedRealm>false</isolatedRealm>
>  <inheritedByDefault>true</inheritedByDefault>
>  <mojos/>
>  <dependencies>
>    <dependency>
>      <groupId>org.apache.maven</groupId>
>      <artifactId>maven-plugin-api</artifactId>
>      <type>jar</type>
>      <version>2.0</version>
>    </dependency>
>  </dependencies>
> </plugin>
>
> mvn help:describe  fails:
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'help'.
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Error building POM (may not be this project's POM).
>
>
> Project ID: org.apache.maven.plugins:maven-help-plugin
>
> Reason: Error getting POM for
> 'org.apache.maven.plugins:maven-help-plugin' from the repository:
> Failed to resolve artifact, possibly due to a repository list that is
> not appropriately equipped for this artifact's metadata.
>  org.apache.maven.plugins:maven-help-plugin:pom:2.2-SNAPSHOT
>
> from the specified remote repositories:
>  nexus (http://nexus.anotheria.net/nexus/content/groups/public)
>
>  for project org.apache.maven.plugins:maven-help-plugin
>
>
>
>
> On Tue, Oct 5, 2010 at 12:21 AM, Justin Edelson
> <jus...@justinedelson.com> wrote:
>> Hard to tell from this code. Check the plugin.xml file which is being
>> generated. Also mvn help:describe (which uses the plugin.xml
>> descriptor IIRC).
>>
>> Also, my guess is that you don't actually want to include this line:
>> * @execute phase="generate-sources"
>>
>> But I doubt that's the source of the error below.
>>
>> Justin
>>
>>
>>
>> On Mon, Oct 4, 2010 at 5:50 PM, Leon Rosenberg <rosenberg.l...@gmail.com> 
>> wrote:
>>> Hello,
>>>
>>> I'm currently writing my first plugin and am struggling with very basics.
>>> From the guide 
>>> (http://maven.apache.org/guides/plugin/guide-java-plugin-development.html)
>>> I understood that if I
>>> specify a goal in a javadoc annotation I will able to call it later
>>> directly, but I fail to achieve it. In my plugin I'm annotating the
>>> code with generate:
>>>
>>>
>>> /**
>>>  * Generates ano-doc classes.
>>>  *
>>>  * @goal generate
>>>  * @phase generate-sources
>>>  * @execute phase="generate-sources"
>>>  *
>>>  */
>>> public class GeneratorMojo extends AbstractMojo{
>>>
>>>        public void execute() throws MojoExecutionException, 
>>> MojoFailureException {
>>>                getLog().info("YOOOO HEI!!!!");
>>>
>>>        }
>>>
>>> }
>>>
>>> After the packaging, and installing, and running from the directory I
>>> want to use it:
>>> anot...@colin:~/projects/aos/ano-site$ mvn ano-doc:generate
>>> [INFO] Scanning for projects...
>>> [INFO] 
>>> ------------------------------------------------------------------------
>>> [ERROR] BUILD FAILURE
>>> [INFO] 
>>> ------------------------------------------------------------------------
>>> [INFO] Required goal not found: ano-doc:generate in
>>> net.anotheria:maven-ano-doc-plugin:1.0-SNAPSHOT
>>> [INFO] 
>>> ------------------------------------------------------------------------
>>> [INFO] For more information, run Maven with the -e switch
>>> [INFO] 
>>> ------------------------------------------------------------------------
>>> [INFO] Total time: < 1 second
>>> [INFO] Finished at: Mon Oct 04 23:48:07 CEST 2010
>>> [INFO] Final Memory: 8M/81M
>>>
>>>
>>> My plugin pom looks like this:
>>> <project>
>>>  <modelVersion>4.0.0</modelVersion>
>>>  <groupId>net.anotheria</groupId>
>>>  <artifactId>maven-ano-doc-plugin</artifactId>
>>>  <packaging>maven-plugin</packaging>
>>>  <version>1.0-SNAPSHOT</version>
>>>  <name>AnoDoc Generator for Maven</name>
>>>
>>>        <distributionManagement>
>>>                <!--omited-->
>>>        </distributionManagement>
>>>
>>>  <dependencies>
>>>    <dependency>
>>>      <groupId>org.apache.maven</groupId>
>>>      <artifactId>maven-plugin-api</artifactId>
>>>      <version>2.0</version>
>>>    </dependency>
>>>  </dependencies>
>>> </project>
>>>
>>> my pom in which I intend to use the new project :
>>>  <build>
>>>        <plugins>
>>>      <plugin>
>>>        <groupId>net.anotheria</groupId>
>>>        <artifactId>maven-ano-doc-plugin</artifactId>
>>>        <version>1.0-SNAPSHOT</version>
>>>        <executions>
>>>          <execution>
>>>            <phase>generate-sources</phase>
>>>            <goals>
>>>              <goal>generate</goal>
>>>            </goals>
>>>          </execution>
>>>        </executions>
>>>      </plugin>
>>>    </plugins>
>>>  </build>
>>>
>>>
>>> any help would be greatly appreciated
>>> regards
>>> Leon
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>>> For additional commands, e-mail: users-h...@maven.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to