Thanks, the aspectj runs though, it just doesn't weave my aj classes in.

My layout is default with: src/main/aspect and src/main/java

and my build.ajproperties:
src.includes = src/main/java, src/test/java, src/main/aspect,
src/test/aspect

Aspectj apears to try to weave the classes because it outputs minor warnings
when verbose is on.
My only lead is either default maven compiler is overwriting classes, or
there is an error in the latest aspectj-maven-plugin SNAPSHOT, which I need
to use because I have java 1.6 code? Can you suggest another aspectj plugin
that works with 1.6?

The aspects compile correctly in eclipse and all test cases pass?

thanks for your help,
Matt.


Chris Lieb wrote:
> 
> I've never had this issue with aspectj-maven-plugin.  Here is the
> configuration that I use for the compiler and aspectj plugins (works
> with jar and war packaging, perhaps others):
> 
>     <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-compiler-plugin</artifactId>
>         <configuration>
>             <source>1.5</source>
>             <target>1.5</target>
>             <showWarnings>true</showWarnings>
>             <showDeprecation>true</showDeprecation>
>             <encoding>UTF-8</encoding>
>         </configuration>
>     </plugin>
> 
>     <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>
>             <encoding>UTF-8</encoding>
>         </configuration>
>         <dependencies>
>             <dependency>
>                 <groupId>org.aspectj</groupId>
>                 <artifactId>aspectjrt</artifactId>
>                 <version>1.6.1</version>
>             </dependency>
>             <dependency>
>                 <groupId>org.aspectj</groupId>
>                 <artifactId>aspectjtools</artifactId>
>                 <version>1.6.1</version>
>             </dependency>
>         </dependencies>
>     </plugin>
> 
> -- Chris
> 
> matthew hindle wrote:
>> Apologies Nabble 2 seemed to mess the code up.
>>
>> Hi, I'm trying to override the default maven compiler with
>> aspectj-maven-plugin. But it insists on compiling.
>>
>> My compiler settings are:
>>
>> <plugin>
>>      <groupId>org.codehaus.mojo</groupId>
>>      <artifactId>aspectj-maven-plugin</artifactId>
>>      <version>1.1-alpha</version>
>>      <configuration>
>>              <complianceLevel>1.6</complianceLevel>
>>              <source>1.6</source>
>>              <target>1.6</target>
>>              <showWeaveInfo>true</showWeaveInfo>
>>              <Xlint>warning</Xlint>
>>                              
>> <aspectDirectory>src/main/aspect</aspectDirectory>
>>              <verbose>true</verbose>
>>      </configuration>
>>      <dependencies>
>>              <dependency>
>>                      <groupId>org.aspectj</groupId>
>>                      <artifactId>aspectjrt</artifactId>
>>                      <version>1.6.1</version>
>>              </dependency>
>>      <dependency>
>>              <groupId>org.aspectj</groupId>
>>              <artifactId>aspectjtools</artifactId>
>>              <version>1.6.1</version>
>>      </dependency>
>>      <dependencies>
>>      <executions>
>>               <execution>
>>                     <id>compile</id>
>>                      <phase>compile</phase>
>>                      <goals>
>>                                      <goal>compile</goal>
>>                      </goals>
>>                </execution>
>>                <execution>
>>                       <id>test-compile</id>
>>                        <phase>test-compile</phase>
>>                         <goals>
>>                      <goal>test-compile</goal>
>>                         </goals>
>>                </execution>
>>            </executions>
>> </plugin>
>>
>> I have even tried to exclude compiled classes with:
>>
>> <plugin> 
>>      <artifactId>maven-compiler-plugin</artifactId> 
>>      <configuration>
>>              <excludes>
>>                      <exclude>**/*.*</exclude>
>>              </excludes>
>>      </configuration>
>> </plugin> 
>>
>> This still tries to compile the test cases.
>>
>> Many Thanks,
>> Matt.
>>   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/override-maven-compiler-plugin--tp1557710p1557954.html
Sent from the maven users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to