You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andreas Höhmann (JIRA)" <ji...@codehaus.org> on 2012/12/21 12:05:13 UTC

[jira] (MCOMPILER-194) Strange effects with springs @Configurable (AspectJ) and new compiler plugin version 3.0

Andreas Höhmann created MCOMPILER-194:
-----------------------------------------

             Summary: 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

       

[jira] (MCOMPILER-194) Strange effects with springs @Configurable (AspectJ) and new compiler plugin version 3.0

Posted by "Oliver Gierke (JIRA)" <ji...@codehaus.org>.
    [ 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

       

[jira] (MCOMPILER-194) Strange effects with springs @Configurable (AspectJ) and new compiler plugin version 3.0

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MCOMPILER-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=320019#comment-320019 ] 

Olivier Lamy commented on MCOMPILER-194:
----------------------------------------

Does it happen with 3.1-SNAPSHOT ? 
And if configuring <forceJavacCompilerUse>true</forceJavacCompilerUse> ?
Any test project ?

                
> 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