Option for -warn parameter not working
--------------------------------------

                 Key: MOJO-1158
                 URL: http://jira.codehaus.org/browse/MOJO-1158
             Project: Mojo
          Issue Type: Bug
          Components: aspectj
            Reporter: Chris Lieb
         Attachments: aspectj-maven-plugin.patch

When I specify a value for <warn/> in my AspectJ config, it produces incorrect 
output.  Here is a snippet of my pom:

        <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <executions>
                        <execution>
                                <goals>
                                        <goal>compile</goal>
                                        <goal>test-compile</goal>
                                </goals>
                        </execution>
                </executions>
                <configuration>
                        <source>1.5</source>
                        <target>1.5</target>
                        <complianceLevel>1.5</complianceLevel>
                        <preserveAllLocals>true</preserveAllLocals>
                        <showWeaveInfo>true</showWeaveInfo>
                        <warn>allJavadoc,assertIdentifier,<snip desc="other 
valid warning options"/></warn>
                        <Xlint>warning</Xlint>
                </configuration>
                <dependencies>
                        <dependency>
                                <groupId>org.aspectj</groupId>
                                <artifactId>aspectjrt</artifactId>
                                <version>1.6.0</version>
                        </dependency>
                        <dependency>
                                <groupId>org.aspectj</groupId>
                                <artifactId>aspectjtools</artifactId>
                                <version>1.6.0</version>
                        </dependency>
                </dependencies>
        </plugin>

When I build the project using the configuration given above, I get the 
following in my builddef.list:

        -Xlint:warning
        -1.5
        -preserveAllLocals
        -showWeaveInfo
        -source
        1.5
        -target
        1.5
        -classpath
        <snip desc="a valid classpath"/>
        -warn:
        <snip desc="a list of desired warnings"/>
        -d
        <snip desc="the output directory and a listing of source files"/>

This produces the error:

        [ERROR] invalid warning configuration: -warn:
        [ERROR] no sources specified
        [ERROR] AspectJ Compiler 1.6.0
        
I have attached a patch that fixes this issue, giving you a builddef.list like:

        -Xlint:warning
        -1.5
        -preserveAllLocals
        -showWeaveInfo
        -source
        1.5
        -target
        1.5
        -classpath
        <snip desc="a valid classpath"/>
        -warn:<snip desc="a list of desired warnings"/>
        -d
        <snip desc="the output directory and a listing of source files"/>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to