maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dagan Sandler <dagansand...@gmail.com>
Subject Should I disable maven-compiler-plugin when using aspectj-maven-compiler?
Date Wed, 13 Jan 2016 08:41:18 GMT
Hi,

I am in the process of updating my plugin definitions in all of the
projects I manage.
Notably, I tried updating maven-compiler-plugin from 2.5.1 to 3.3 but
encountered an issue in a project that uses aspectj-maven-plugin.

The issue is, it seems, that the maven-compiler-plugin is invoked before
the aspectj-maven-plugin, and causes the build to fail.

I have previously used a workaround for this issue by setting the
aspectj-maven-plugin to execute in phase process-sources, so it's invoked
before the maven plugin
However, in maven-compiler-plugin 3.1+ there's this bug
<https://issues.apache.org/jira/browse/MCOMPILER-209> which causes the
maven-compiler-plugin to recompile all sources and to fail the build, so
you must set useIncrementalCompilation to *false*

Another workaround I found before finding out about the incremental build
bug, is to disable the maven-compiler-plugin altogether in that project and
let aspectj-maven-plugin do all the compilation by adding
<execution>
<id>default-compile</id>
<phase>none</phase>
</execution>
to the maven-compiler-plugin definition

Anyone knows the downsides of any of these workarounds? Is there another
configuration that I should be using instead of these options?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message