Maven Compiler Plugin
  1. Maven Compiler Plugin

javac compilation error for containing package annotation


    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0.2
    • Fix Version/s: None
    • Labels:
    • Environment:
      Windows XP SP2
      JDK 1.5.0_15


      The files can not be compiled in Maven 2 if the 2.0.2 maven-compiler-plugin is used. files can be compiled by earlier versions of the maven-compiler-plugin (I have tried 2.0 and 2.0.1). Newer snapshot versions does not work also and it fails in the same error (I have tried version 2.1-snapshot).

      This problem can be caused by an unusual behavior of the javac from jdk 1.5. This behavior is as follows:
      You can not use '/' file separator during compiling (for instance "javac sk/forro/"). You must use '\' separator (for instance "javac sk\forro\"). If you use the '/' separator you get the the compilation error reported by this bug (package annotations should be in file This is javac 'feature' has been removed in jdk 6 and in jdk 6 you can use either '/' or '\' - it does not matter.

      It looks like the maven-compiler-plugin or one of its components (I mean plexus-x artefacts used by maven-compiler-plugin) uses '/' instead of the '\' in the MS Windows environment.

      I have attached a log file of an unsuccessful build (generated by mvn install -X)

      A possible workaround to solve this problem temporarily:
      The compilation successes if I use either an older version of maven-compiler-plugin or jdk 6 or do not use files at all.



          • Assignee:
            John Casey
            Gabriel Forro
          • Votes:
            14 Vote for this issue
            13 Start watching this issue


            • Created: