[ 
https://jira.codehaus.org/browse/MCOMPILER-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=319836#comment-319836
 ] 

Oliver Gierke commented on MCOMPILER-194:
-----------------------------------------

I've seen similar issues. Here's what I think I could break it down to. The 3.0 
version of the compiler somehow seems to detect "changes" that do not appear to 
be ones. Just run {{mvn clean test-compile}} and {{mvn test}} afterwards and 
you still see

{noformat}
[INFO] Changes detected - recompiling the module!
{noformat}

for the second invocation. Now the AspectJ plugin set up to run before the 
compiler *has not been invoked as there were no changes* actually. Now the 
compiler plugin essentially throws away the generated class files and 
recompiles them which means the AspectJ compilation step is not applied.

The only safe way to get this working for me is using {{mvn clean install}} all 
the way.
                
> Strange effects with springs @Configurable (AspectJ) and new compiler plugin 
> version 3.0
> ----------------------------------------------------------------------------------------
>
>                 Key: MCOMPILER-194
>                 URL: https://jira.codehaus.org/browse/MCOMPILER-194
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 3.0
>         Environment: jdk 1.6.0_38, jdk 1.6.0_37
>            Reporter: Andreas Höhmann
>            Priority: Blocker
>
> I have no details I can only report the "effects" ..
> I have a maven project with compiler-plugin 2.5.1,
> aspectj-plugin 1.4, java 1.6 and a lot of @Configurable 
> annotations in my code. Aspectj will decorate these classes
> so @Autowired dependencies injected during runtime. 
> All is working fine.
> Now I switch to compiler-plugin 3.0 ... nothing else changed!
> Then "sometimes" I got NPE's because the injected service etc. are
> not available. I guess aspectj was not successfull. I have no
> errors etc. anywhere during build.
> Strang :)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to