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

David M. Lloyd commented on MCOMPILER-320:
------------------------------------------

Your example won't quite work:

* The supplementary classes must not be on the compile path for Java 9 or later 
as they may cause split package errors when compiling with modules - or worse 
yet, they may overlap a Java 9 API which is used by the Java 9 code overlay
* The Java 9 layer does not seem to include the classes from the Java 8 layer; 
in your example this may work because the Java 9 layer doesn't use any code 
from the Java 8 layer but in our code, we only provide Java 9 (or 10 or 11) 
classes when we actually need to use a newer API or something that is specific 
to that version; otherwise we inherit the earlier layer
* If you add more layers to your example, they in turn must depend on the 
classes output of each prior layer in order
* The dependency infects all other executions of all other mojos - which we 
definitely do not want.  It's better to include it in the one place we need it 
then deal with the heisenbug situation of excluding it from every other plugin 
everywhere


> Allow additional class path items to be given during compilation
> ----------------------------------------------------------------
>
>                 Key: MCOMPILER-320
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-320
>             Project: Maven Compiler Plugin
>          Issue Type: New Feature
>            Reporter: David M. Lloyd
>            Priority: Major
>
> At present it is very difficult to include additional class path items during 
> compilation that are not dependencies.  But this is a very useful capability, 
> especially when doing partial builds, MR JARs, JDK API stubbing, including 
> dependency items that cannot be included in any other build phase or 
> execution, etc.
> This enhancement and pull request are to request the addition of a 
> {{additionalCompilePathItems}} property in CompilerMojo or 
> AbstractCompilerMojo which includes additional filesystem paths in the 
> compilation class path.



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

Reply via email to