Re: Excluding source files even if they are referenced

2020-09-14 Thread Thomas Broyer
On Mon, Sep 14, 2020 at 1:41 PM Alex Gerdov 
wrote:

> Hello,
>
> I was wondering - is it possible to instruct the compiler plug-in to
> exclude source files even if they are referenced directly by other source
> files?
>

It depends what you're trying to do.
You can exclude [1] those files, but then because the maven-compiler-plugin
sets the sourcepath to your source roots, the files will be compiled anyway
if they are referenced by others that are being compiled [2].
You could use -implicit:none in compilerArgs to prevent the corresponding
*.class file from being generated though. So compilation will succeed, but
the output will be "incomplete" (but maybe that's what you want after all).

[1]
https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#excludes
[2] https://blog.ltgt.net/most-build-tools-misuse-javac/

-- 
Thomas Broyer
/tɔ.ma.bʁwa.je/ 


Excluding source files even if they are referenced

2020-09-14 Thread Alex Gerdov
Hello,
I was wondering - is it possible to instruct the compiler plug-in to exclude 
source files even if they are referenced directly by other source files?
Thank you.



Alex Gerdov
Research & Development


(t) +972-54-6489120
(e) alex.ger...@unboundtech.com
(w) www.unboundtech.com



[cid:image001_33bc2125-acce-499f-b3e4-d7ff3ead2655.png]
[cid:image002_835de91e-1279-4d5b-8caf-3b333b513648.jpg] 
  
[cid:image003_e0941979-a6a1-4d3c-ad38-16acdd775113.jpg] 

[cid:image004_7cb7b240-000d-45a9-be8b-9afaf7262345.jpg] 




This email message and any attachments thereto are confidential and/or subject 
to privacy laws and/or non-disclosure agreements and are intended only for use 
by the addressee(s) named above. The writer asserts in respect of this message 
and attachments all rights for confidentiality or privacy to the fullest extent 
permitted by law.