Is it possible to compile project with softened Exceptions (e.g.: declare soft: Exception : execution(* *.*());) aspects in it using only aspectj-maven-plugin ?
Actually I think there is a bug in Maven Compiler Plugin 3.0 and 3.1 because for me it works with plugin version 2.5.1. It seems that incremental compilation is broken or the corresponding switch useIncrementalCompilation is somehow accidentally reversed in its meaning since it was introduced in 3.1. Funnily, setting its value to false fixes the situation for me. Downgrading to 2.5.1 also does. In both cases I need to change the phase for the AspectJ Maven Plugin to process-sources as described in the question linked to by user @Gus.
Solution A:
4.0.0de.scrum-master.stackoverflowaspectj-soft-exceptions1.0-SNAPSHOTUTF-81.8.0AspectJ sample with declare softDemonstrates how to build an AspectJ project using "declare soft" with Mavenmaven-compiler-plugin3.11.71.7falseorg.codehaus.mojoaspectj-maven-plugin1.6true1.71.7ignore1.7UTF-8trueprocess-sourcescompiletest-compileorg.aspectjaspectjtools${aspectj.version}org.aspectjaspectjrt${aspectj.version}runtime
Solution B:
4.0.0de.scrum-master.stackoverflowaspectj-soft-exceptions1.0-SNAPSHOTUTF-81.8.0AspectJ sample with declare softDemonstrates how to build an AspectJ project using "declare soft" with Mavenmaven-compiler-plugin2.5.11.71.7org.codehaus.mojoaspectj-maven-plugin1.6true1.71.7ignore1.7UTF-8trueprocess-sourcescompiletest-compileorg.aspectjaspectjtools${aspectj.version}org.aspectjaspectjrt${aspectj.version}runtime