[ 
https://issues.apache.org/jira/browse/MCOMPILER-368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16722500#comment-16722500
 ] 

Gili edited comment on MCOMPILER-368 at 12/16/18 2:28 PM:
----------------------------------------------------------

I don't think -Xpkginfo is the answer for two reasons:
 # It took me forever to figure out what issue I had in the first place not to 
mention finding a workaround for it. When users ask you to compile their 
sources, they shouldn't have to dig into the plugin implementation details to 
figure out why things aren't working as expected.
 # The flag is not portable. It is currently available on Oracle JDK but might 
be removed in the future. The flag is not guaranteed to exist on other JDKs 
either.

The proposed fix would work as follows:
 # Load maven-compile-plugin.cache into memory.
 # Read the timestamps of source/target files for computing stale sources.
 # For every entry that was previous read from maven-compile-plugin.cache 
subtract from the stale-sources list if the timestamp has not changed.
 # Compile the files.
 # Dump a list of  [path, last-modified timestamp] into a new 
maven-compile-plugin.cache


was (Author: cowwoc):
I don't think -Xpkginfo is an answer for two reasons:
 # It took me forever to figure out what issue I had in the first place not to 
mention finding a workaround for it. When users ask you to compile their 
sources, they shouldn't have to dig into the plugin implementation details to 
figure out why things aren't working as expected.
 # The flag is not portable. It is currently available on Oracle JDK but might 
be removed in the future. The flag is not guaranteed to exist on other JDKs 
either.

The proposed fix would work as follows:
 # Load maven-compile-plugin.cache into memory.
 # Read the timestamps of source/target files for computing stale sources.
 # For every entry that was previous read from maven-compile-plugin.cache 
subtract from the stale-sources list if the timestamp has not changed.
 # Compile the files.
 # Dump a list of  [path, last-modified timestamp] into a new 
maven-compile-plugin.cache

> package-info.java always triggers recompilation of module
> ---------------------------------------------------------
>
>                 Key: MCOMPILER-368
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-368
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 3.8.0
>         Environment: Microsoft Windows [Version 10.0.17763.194]
> Maven 3.6.0
> maven-compiler-plugin 3.8.0
>            Reporter: Gili
>            Priority: Major
>         Attachments: testcase.zip
>
>
> # Unzip testcase
>  # Run: mvn install
>  # Notice that maven-compiler-plugin always claims package-info.java is stale 
> and forces recompilation of entire module
> When package-info.java is present in large modules build times suffer 
> noticeably.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to