Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Maven 2 - Compile Time Weaving

Hi,
I'm trying to get compile time weaving working for my integration tests. The
aspect compiler is being invoked correctly but my tests still will not work
correctly without enabling LTW. Here is the relevant sections from my Maven
POM:

...
<plugins>
  <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>aspectj-maven-plugin</artifactId>
    <version>1.0-beta-2</version>
    <configuration>
	<source>1.5</source>
	<target>1.5</target>
	<XnoInline>true</XnoInline>
	<aspectDirectory>src/main/java</aspectDirectory>
	<testAspectDirectory>src/test/java</testAspectDirectory>
	<aspectLibraries>
	  <aspectLibrary>
	    <groupId>org.springframework</groupId>
	    <artifactId>spring-aspects</artifactId>
	  </aspectLibrary>
	</aspectLibraries>
    </configuration>
    <executions>
	<execution>
          <id>compile</id>
	  <goals><goal>compile</goal></goals>
        </execution>
        <execution>
          <id>test-compile</id>
	  <goals><goal>test-compile</goal></goals>
        </execution>
      </executions>
    </plugin>
   <plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-surefire-plugin</artifactId>
     <configuration>
       <forkMode>once</forkMode>
	<argLine>-javaagent:/projects/libs/aspectjweaver.jar -Xms128m
-Xmx256m</argLine>
         ...	
      </configuration>
   </plugin>
   ...

If I remove the argLine element to enable LTW I cannot run my integration
tests that rely on aspects. Anyone have any ideas on what I'm doing wrong?

Thanks.

-- 
View this message in context: http://www.nabble.com/Maven-2---Compile-Time-Weaving-tf3334370.html#a9272074
Sent from the AspectJ - users mailing list archive at Nabble.com.



Back to the top