[ 
https://issues.apache.org/jira/browse/MTOOLCHAINS-19?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wolf Geldmacher updated MTOOLCHAINS-19:
---------------------------------------
    Description: 
The attached project results in different (and wrong!) error messages when 
compiled without or with toolchains support.

If compiled without toolchains support (mvn clean compile) the error message is:

   [ERROR] .../src/main/java/ch/pecunifex/x/Cls1.java:[12,5] cannot access 
ch.pecunifex.x.Cls2
     bad source file: .../src/main/java/ch/pecunifex/x/Cls2.java
       file does not contain class ch.pecunifex.x.Cls2
       Please remove or make sure it appears in the correct subdirectory of the 
sourcepath.

wĥich is correct.


If compiled with toolchains support (mvn -Ptoolchains clean compile) the error 
is:

  [ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) 
on project p1: Compilation failure
  [ERROR] .../src/main/java/ch/pecunifex/x/Cls1.java:[3,15] FontDesignMetrics 
is internal proprietary API and may be removed in a future release

which is (at least) misleading. The true error is not visible anymore.

(( The attached zip file has a toolchains.xml file that needs to be adapted to 
your setup (jdk location) and either must be put in ~/.m2 or its location 
specified on the command line. ))

  was:
The attached project results in different (and wrong!) error messages when 
compiled without or with toolchains support.

If compiled without toolchains support (mvn clean compile) the error message is:
   [ERROR] .../src/main/java/ch/pecunifex/x/Cls1.java:[12,5] cannot access 
ch.pecunifex.x.Cls2
     bad source file: .../src/main/java/ch/pecunifex/x/Cls2.java
       file does not contain class ch.pecunifex.x.Cls2
       Please remove or make sure it appears in the correct subdirectory of the 
sourcepath.
wĥich is correct.

If compiled with toolchains support (mvn -Ptoolchains clean compile) the error 
is:
  [ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) 
on project p1: Compilation failure
  [ERROR] .../src/main/java/ch/pecunifex/x/Cls1.java:[3,15] FontDesignMetrics 
is internal proprietary API and may be removed in a future release
which is (at least) misleading. The true error is not visible anymore.

(( The attached zip file has a toolchains.xml file that needs to be adapted to 
your setup (jdk location) and either must be put in ~/.m2 or its location 
specified on the command line. ))


> Use of toolchains plugin mangles compiler error output
> ------------------------------------------------------
>
>                 Key: MTOOLCHAINS-19
>                 URL: https://issues.apache.org/jira/browse/MTOOLCHAINS-19
>             Project: Maven Toolchains Plugin
>          Issue Type: Bug
>    Affects Versions: 1.1, 3.0.0
>         Environment: Ubuntu 16.04, Maven 3.2.3
>            Reporter: Wolf Geldmacher
>         Attachments: p.zip
>
>
> The attached project results in different (and wrong!) error messages when 
> compiled without or with toolchains support.
> If compiled without toolchains support (mvn clean compile) the error message 
> is:
>    [ERROR] .../src/main/java/ch/pecunifex/x/Cls1.java:[12,5] cannot access 
> ch.pecunifex.x.Cls2
>      bad source file: .../src/main/java/ch/pecunifex/x/Cls2.java
>        file does not contain class ch.pecunifex.x.Cls2
>        Please remove or make sure it appears in the correct subdirectory of 
> the sourcepath.
> wĥich is correct.
> If compiled with toolchains support (mvn -Ptoolchains clean compile) the 
> error is:
>   [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile 
> (default-compile) on project p1: Compilation failure
>   [ERROR] .../src/main/java/ch/pecunifex/x/Cls1.java:[3,15] FontDesignMetrics 
> is internal proprietary API and may be removed in a future release
> which is (at least) misleading. The true error is not visible anymore.
> (( The attached zip file has a toolchains.xml file that needs to be adapted 
> to your setup (jdk location) and either must be put in ~/.m2 or its location 
> specified on the command line. ))



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to