Hi Velo,
 
I've done some changes to the aspectj-maven-plugin for our development.
Unfortunately I don't have any experience right now in Groovy and
therefore I can't get the problem reproduced. If you could prepare a
sample (src folder is enough as you posted the pom.xml already) I'll
have a look into the aspectj-maven-plugin and check what changes must be
made to have the same behaviour as the solution with the
exec-maven-plugin.
 
Cheers
Andi

________________________________

From: Marvin Froeder [mailto:velo...@gmail.com] 
Sent: Samstag, 14. Februar 2009 14:33
To: u...@groovy.codehaus.org; user@mojo.codehaus.org
Subject: [mojo-user] Re: Groovy + AspectJ


After I read this post
http://gavingrover.blogspot.com/2007/09/weaving-into-groovy-with-aspectj
.html

I was convinced that AspectJ and Groovy should play well together. 

So I manage to get it working using maven-exec-plugin:


        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>1.1</version>
          <executions>
            <execution>
              <phase>process-test-classes</phase>
              <goals>
                <goal>exec</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <executable>java</executable>
            <arguments>
              <argument>-classpath</argument>
              <classpath />
              <argument>org.aspectj.tools.ajc.Main</argument>
        
<argument>${project.build.testSourceDirectory}/org/sonatype/nexus/plugin
s/groovytest/Hello.aj</argument>
              <argument>-inpath</argument>
              <argument>${project.build.testOutputDirectory}</argument>
              <argument>-1.5</argument>
              <argument>-d</argument>
              <argument>${project.build.testOutputDirectory}</argument>
            </arguments>
          </configuration>
        </plugin>
        


Hopefully this can help on aspectJ-maven-plugin fix.

VELO


On Fri, Feb 13, 2009 at 7:22 PM, Marvin Froeder <velo...@gmail.com>
wrote:


        Hi Folks,
        
        I am using Groovy to run some integration tests.  So far,
everything was working well, but, I went into troubles when I try to add
AspectJ on it.
        
        I attached my pom.
        
        I'm using gmaven and aspectJ only on tests phases.  There are no
sources on src/main/*
        
        When I only have gmaven, everything work:
        

                <plugin>
                  <groupId>org.codehaus.groovy.maven</groupId>
                  <artifactId>gmaven-plugin</artifactId>
                  <version>1.0-rc-3</version>
                  <executions>
                    <execution>
                      <goals>
                        <goal>generateTestStubs</goal>
                        <goal>testCompile</goal>
                      </goals>
                    </execution>
                  </executions>
                </plugin>
                


        My tests run and I get results.
        
        But, when I enable AspectJ:
        

                <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>aspectj-maven-plugin</artifactId>
                  <version>1.1</version>
                  <executions>
                    <execution>
                      <phase>process-test-classes</phase>
                      <goals>
                        <goal>test-compile</goal>
                      </goals>
                    </execution>
                  </executions>
                  <configuration>
                    <complianceLevel>1.5</complianceLevel>
                  </configuration>
                </plugin>
                


        I got the following warning:
        

                [WARNING] build config error: skipping missing, empty or
corrupt aspectpath entry:
D:\sonatype\workspace\groovy-test\target\classes
                


        What worries me most is when this happens tests doesn't run
anymore.
        
        Does anyone have any idea what is going on and how can I fix
that?
        
        
        VELO
        


Reply via email to