Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] ajcore in maven builds - shouldn't this fail?

Ooops.. That would be useful wouldn't it!!

It's incompatible aspectj versions.  The following is logged when doing
a "mvn compile", and I would have thought ABORT would mean we are not
going to continue with the build, but instead the build is reported as
successful.

  [INFO] [aspectj:compile {execution: default}]
  [WARNING] bad version number found in aspectjrt-1.6.8.jar expected
  1.5.4
 found 1.6.8
  ERROR] ABORT
  27-May-2010 16:35:35 org.aspectj.weaver.tools.Jdk14Trace info
  INFO: Dumping to
  C:\Users\Neale\Documents\workspace-sts-2.3.2.RELEASE\tnt-sech-refactor\build\.\ajcore.20100527.163535.991.txt



The cause of the issue is that the plugin is defaulting to the 1.5.4
tools, which is easily solved, by adding the aspectjtools:1.6.8.
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>1.0</version>
                <dependencies>
                    <!-- NB: You must use Maven 2.0.9 or above or these
                    are ignored (see MNG-2972) -->
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjrt</artifactId>
                        <version>1.6.8</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <outxml>true</outxml>
                    <aspectLibraries>
                        <aspectLibrary>
                            <groupId>org.springframework</groupId>
                            <artifactId>spring-aspects</artifactId>
                        </aspectLibrary>
                    </aspectLibraries>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>



On Thu, 27 May 2010 07:54 -0700, "Andy Clement"
<andrew.clement@xxxxxxxxx> wrote:
> What kind of failure is reported in the ajcore files?
> 
> Andy
> 
> On 27 May 2010 07:47, Neale Upstone <neale@xxxxxxxxxxxxxxxx> wrote:
> > Hi,
> >
> > Is anyone here familiar with this problem:
> > - I have a maven build using the Maven aspectJ plugin, which, when
> > configured correctly works.
> > - However, if misconfigured, the failure is reported in ajcore files,
> > but the build still completes (instead of giving a build error)
> >
> > If anyone has come across this issue, I'd love to know why the build
> > isn't failing.  It's not that useful in a CI environment.
> >
> > Cheers,
> >
> > Neale
> > --
> >  Neale Upstone
> >  neale@xxxxxxxxxxxxxxxx
> >
> > _______________________________________________
> > aspectj-users mailing list
> > aspectj-users@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
> >
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> 
-- 
  Neale Upstone
  neale@xxxxxxxxxxxxxxxx



Back to the top