Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Maven-aspectj-plugin weaving while doing other than compile tasks causes errors

Hello,
I posted this mail to Maven group but no response. Maybe you can help.

I use maven to do code production tasks. While calling
mvn compile
it does aspectj compiling which is what I need. But while calling
mvn package
it does aspect weaving again and I get lot of errors because AspectJ tries to weave same inter-type methods and fields again into already compiled code.

Does anybody know how to _disable_ weaving while in tasks other than "compile"? My Maven conf. for AspectJ plugin is

             <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <configuration>
                    <showWeaveInfo>true</showWeaveInfo>
                    <Xlint>warning</Xlint>
                </configuration>
                <executions>
                    <execution>
                         <id>compile</id>
                        <configuration>
                            <complianceLevel>1.5</complianceLevel>
                            <verbose>true</verbose>
                            <ajdtBuildDefFile>build.ajproperties</ajdtBuildDefFile>
                        </configuration>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <configuration>
                            <complianceLevel>1.5</complianceLevel>
                            <verbose>true</verbose>
                            <ajdtBuildDefFile>test.ajproperties</ajdtBuildDefFile>
                        </configuration>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
               </executions>
           </plugin>



Thank you kindly.
Best regards,
--
Bartlomiej Zdanowski
Programmer
Product Research & Development Department
AutoGuard & Insurance Ltd.

Omulewska 27 street
04-128 Warsaw
Poland
phone +48 22 611 69 23
www.autoguard.pl
begin:vcard
fn;quoted-printable:Bart=C5=82omiej Zdanowski
n;quoted-printable:Zdanowski;Bart=C5=82omiej
org;quoted-printable:AutoGuard & Insurance Sp. z o.o.;Dzia=C5=82 Rozwoju Produkt=C3=B3w
adr:;;ul. Omulewska 27;Warszawa;;04-128;Polska
email;internet:b.zdanowski@xxxxxxxxxxxx
title:Programista AC2
tel;work:022 611 69 23
tel;cell:603 525 105
x-mozilla-html:TRUE
url:http://www.autoguard.pl
version:2.1
end:vcard


Back to the top