Uploaded image for project: 'Maven Compiler Plugin'
  1. Maven Compiler Plugin
  2. MCOMPILER-190

No compile errors with plexus-compiler-eclipse

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0
    • 3.1
    • Mac OS X 10.8.2 x86_64
      JDK 1.6.0_37
      Maven 3.0.4 (r1232337)

    Description

      I'm trying to make use of plexus-compiler-eclipse by configuring maven-compiler-plugin (3.0) with a compilerId of 'eclipse' and dependency to plexus-compiler-eclipse, version 2.0 (couldn't select 2.0 in affects version above, so I left blank).
      I have java classes that definitely should raise a compiler error.

      'mvn compile' gives

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project sample: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile failed: basedir ${project.basedir}/target/classes does not exist

      on a clean project. Nothing else, no compiler error with respect to erroneous class. And in fact no compiled class.

      But more critical to mee seems compilation on a non-clean project, i.e. 'target/classes' exists.

      Output of 'mavn compile' than is

      [INFO] — maven-compiler-plugin:3.0:compile (default-compile) @ sample —
      [INFO] Changes detected - recompiling the module!
      [WARNING] Dummy.java:[5] Type mismatch: cannot convert from Integer to String
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS

      I've attached a sample project which can be used to reproduce the behavior.
      1. Extract to an empty directory
      2. chdir to this directory
      2.a if in doubt: mvn clean
      4. mvn compile
      4.a error message about non-existent output directory
      5. mkdir -p target/classes
      6. mvn compile
      7. see above mentioned warning, but build "succeeds" (of course no class file was generated)

      Attachments

        1. pce.tar.gz
          0.8 kB
          Peter Palmreuther

        Activity

          People

            olamy Olivier Lamy
            pitpalme Peter Palmreuther
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: