[
https://issues.apache.org/jira/browse/MCOMPILER-194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16403740#comment-16403740
]
Michael Osipov edited comment on MCOMPILER-194 at 3/17/18 9:36 PM:
-------------------------------------------------------------------
I have now reapplied the reverse patch from the offending commit and no avail.
Even if the commit shouldn't be there, it wouldn't change a thing. I stepped
through the code and I am afraid that the AspectJ Maven Plugin is not
compatible with the incremental build feature.
What happens is that the {{IncrementalBuildHelper}} expects
{{org.apache.maven.shared.incremental.IncrementalBuildHelper.INPUT_FILES_LST_FILENAME}}
to be present containing the source path of the file AspectJ already has
compiled/processed. If not present, the compiler plugin creates it with the
source file and recompiles: boom. If you do just {{mvn install}} at second run,
the file is already there and everything is peachy.
So we have two issues, the offending commit introduced which caused the issue
in 3.0 and the incremental feature introduced in 3.1 which would have broken it
anyway. This is also caused by MCOMPILER-187.
We have two competing compilers not knowing of each other. I consider this
issue to be invalid and to be solved in the AspectJ Maven Plugin since this is
the default compiler plugin.
was (Author: michael-o):
I have now reapplied the reverse patch from the offending commit and no avail.
Even if the commit shouldn't be there, it wouldn't change a thing. I stepped
through the code and I am afraid that the AspectJ Maven Plugin is not
compatible with the incremental build feature.
What happens is that the {{IncrementalBuildHelper}} expects
{{org.apache.maven.shared.incremental.IncrementalBuildHelper.INPUT_FILES_LST_FILENAME}}
to be present containing the source path of the file AspectJ already has
compiled/processed. If not present, the compiler plugin creates it with the
source file and recompiles: boom. If you do just {{mvn install}} at second run,
the file is already there and everything is peachy.
So we have two issues, the offending commit introduced which caused the issue
in 3.0 and the incremental feature introduced in 3.1 which would have broken it
anyway. This is also caused by MCOMPILER-187.
> Strange effects with springs @Configurable (AspectJ) and new compiler plugin
> version 3.0
> ----------------------------------------------------------------------------------------
>
> Key: MCOMPILER-194
> URL: https://issues.apache.org/jira/browse/MCOMPILER-194
> Project: Maven Compiler Plugin
> Issue Type: Bug
> Affects Versions: 3.0
> Environment: jdk 1.6.0_38, jdk 1.6.0_37
> Reporter: Andreas Höhmann
> Assignee: Michael Osipov
> Priority: Blocker
> Attachments: MCOMPILER-194.zip, SO_AJ_MavenSoftExceptions.zip
>
>
> 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 was sent by Atlassian JIRA
(v7.6.3#76005)