Uploaded image for project: 'Maven Toolchains Plugin'
  1. Maven Toolchains Plugin
  2. MTOOLCHAINS-19

Use of toolchains plugin mangles compiler error output

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 1.1, 3.0.0
    • None
    • None
    • Ubuntu 16.04, Maven 3.2.3

    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. ))

      Attachments

        1. p.zip
          3 kB
          Wolf Geldmacher

        Issue Links

          Activity

            People

              rfscholte Robert Scholte
              wjg57 Wolf Geldmacher
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: