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

Sebb commented on MCOMPILER-537:
--------------------------------

AFAICT the compiler does produce these messages when run stand-alone; it looks 
like Maven suppresses them.

I ran the command shown in the -X output, and got the following:

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

(The associated file names are not shown).

This was with

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /opt/apache-maven-3.6.3
Java version: 19.0.2, vendor: Oracle Corporation, runtime: 
/Library/Java/JavaVirtualMachines/jdk-19.0.2.jdk/Contents/Home
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "12.6.6", arch: "aarch64", family: "mac"


> Inconsistent behaviour when compiler is forked
> ----------------------------------------------
>
>                 Key: MCOMPILER-537
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-537
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Major
>
> Further to MCOMPILER-491, there is another difference between forked and 
> non-forked compiles. Informational messages about deprecation etc are not 
> shown in the forked case.
> For example:
> $ git clone https://gitbox.apache.org/repos/asf/commons-compress.git 
> --single-branch --branch commons-compress-1.22 --depth 1
> $ cd commons-compress
> $ mvn clean compile
> ...
> [INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ 
> commons-compress ---
> [INFO] Changes detected - recompiling the module!
> [INFO] Compiling 360 source files to 
> /private/tmp/commons-compress/target/classes
> [INFO] 
> /private/tmp/commons-compress/src/main/java/org/apache/commons/compress/harmony/pack200/Archive.java:
>  Some input files use or override a deprecated API.
> [INFO] 
> /private/tmp/commons-compress/src/main/java/org/apache/commons/compress/harmony/pack200/Archive.java:
>  Recompile with -Xlint:deprecation for details.
> [INFO] 
> /private/tmp/commons-compress/src/main/java/org/apache/commons/compress/harmony/unpack200/AttributeLayoutMap.java:
>  Some input files use unchecked or unsafe operations.
> [INFO] 
> /private/tmp/commons-compress/src/main/java/org/apache/commons/compress/harmony/unpack200/AttributeLayoutMap.java:
>  Recompile with -Xlint:unchecked for details.
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> ...
> $ mvn clean compile -Dcommons.compiler.fork=true
> ...[INFO] Compiling 360 source files to 
> /private/tmp/commons-compress/target/classes
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> ...



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to