GMaven

generateStubs generates stubs without original Javadocs or annotations

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.2
  • Fix Version/s: None
  • Component/s: stub generation
  • Labels:
    None
  • Environment:
    Maven 2.2.1
  • Number of attachments :
    2

Description

When running

<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>generate-stubs</id>
<phase>generate-sources</phase>
<goals>
<goal>generateStubs</goal>
</goals>
<configuration>
<providerSelection>1.7</providerSelection>
<sources>
<fileset>
<directory>${projects.basedir}/src/main/scripts</directory>
<includes>
<include>*/.groovy</include>
</includes>
</fileset>
</sources>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.gmaven.runtime</groupId>
<artifactId>gmaven-runtime-1.7</artifactId>
<version>1.2</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>1.7.1</version>
</dependency>
</dependencies>
</plugin>

*.java files generated (to be processed for mojo @annotations) contain no original javadocs or annotations.
One such file is attached while original Groovy file starts as:

/**

  • Plugin that creates Hudson config files to define new build projects
    */
    @MojoGoal ( "generate" )
    @MojoPhase ( "compile" )
    public class HudsonMojo extends GroovyMojo
    {
    ....
    }

or

/**

  • Plugin that creates Hudson config files to define new build projects
    *
  • @goal generate
  • @phase compile
    */
    public class HudsonMojo extends GroovyMojo
    {
    ....
    }

In both cases the resulting file is the same (attached) and it's clean from any original javadocs or annotations.

  1. HudsonMojo.java
    01/Mar/10 7:06 PM
    1 kB
    Evgeny Goldin
  2. HudsonMojo2.java
    01/Mar/10 7:19 PM
    4 kB
    Evgeny Goldin

Issue Links

Activity

Hide
Evgeny Goldin added a comment - - edited

POM code again:

<plugin>
    <groupId>org.codehaus.gmaven</groupId>
    <artifactId>gmaven-plugin</artifactId>
    <version>1.2</version>
    <executions>
        <execution>
            <id>generate-stubs</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>generateStubs</goal>
            </goals>
            <configuration>
                <providerSelection>1.7</providerSelection>
                <sources>
                    <fileset>
                        <directory>${projects.basedir}/src/main/scripts</directory>
                        <includes>
                            <include>**/*.groovy</include>
                        </includes>
                    </fileset>
                </sources>
            </configuration>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>org.codehaus.gmaven.runtime</groupId>
            <artifactId>gmaven-runtime-1.7</artifactId>
            <version>1.2</version>
            <exclusions>
                <exclusion>
                    <groupId>org.codehaus.groovy</groupId>
                    <artifactId>groovy-all</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>1.7.1</version>
        </dependency>
    </dependencies>
</plugin>
Show
Evgeny Goldin added a comment - - edited POM code again:
<plugin>
    <groupId>org.codehaus.gmaven</groupId>
    <artifactId>gmaven-plugin</artifactId>
    <version>1.2</version>
    <executions>
        <execution>
            <id>generate-stubs</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>generateStubs</goal>
            </goals>
            <configuration>
                <providerSelection>1.7</providerSelection>
                <sources>
                    <fileset>
                        <directory>${projects.basedir}/src/main/scripts</directory>
                        <includes>
                            <include>**/*.groovy</include>
                        </includes>
                    </fileset>
                </sources>
            </configuration>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>org.codehaus.gmaven.runtime</groupId>
            <artifactId>gmaven-runtime-1.7</artifactId>
            <version>1.2</version>
            <exclusions>
                <exclusion>
                    <groupId>org.codehaus.groovy</groupId>
                    <artifactId>groovy-all</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>1.7.1</version>
        </dependency>
    </dependencies>
</plugin>
Hide
Evgeny Goldin added a comment -

With

<plugin>
    <groupId>org.codehaus.groovy.maven</groupId>
    <artifactId>gmaven-plugin</artifactId>
    <version>1.0</version>
    <executions>
        <execution>
            <id>generate-stubs</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>generateStubs</goal>
            </goals>
            <configuration>
                <sources>
                    <fileset>
                        <directory>${projects.basedir}/src/main/scripts</directory>
                        <includes>
                            <include>**/*.groovy</include>
                        </includes>
                    </fileset>
                </sources>
            </configuration>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>1.6.7</version>
        </dependency>
    </dependencies>
</plugin>

I get the proper stub generated - "HudsonMojo2.java"

Show
Evgeny Goldin added a comment - With
<plugin>
    <groupId>org.codehaus.groovy.maven</groupId>
    <artifactId>gmaven-plugin</artifactId>
    <version>1.0</version>
    <executions>
        <execution>
            <id>generate-stubs</id>
            <phase>generate-sources</phase>
            <goals>
                <goal>generateStubs</goal>
            </goals>
            <configuration>
                <sources>
                    <fileset>
                        <directory>${projects.basedir}/src/main/scripts</directory>
                        <includes>
                            <include>**/*.groovy</include>
                        </includes>
                    </fileset>
                </sources>
            </configuration>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>1.6.7</version>
        </dependency>
    </dependencies>
</plugin>
I get the proper stub generated - "HudsonMojo2.java"
Hide
Paul King added a comment -

Groovy trunk and the 1.7.3 snapshot currently being built by Bamboo have a patch that should help fix this problem. If anyone can test this further, that would be great.

Show
Paul King added a comment - Groovy trunk and the 1.7.3 snapshot currently being built by Bamboo have a patch that should help fix this problem. If anyone can test this further, that would be great.
Hide
Marc von Renteln added a comment -

Annotations are now generated correctly. Javadocs are still not generated... This is an issue because Maven uses Javadoc-Annotations to define Mojos...

Show
Marc von Renteln added a comment - Annotations are now generated correctly. Javadocs are still not generated... This is an issue because Maven uses Javadoc-Annotations to define Mojos...

People

Vote (8)
Watch (9)

Dates

  • Created:
    Updated: