maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Bogouchev (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MCOMPILER-71) javac compilation error for package-info.java containing package annotation
Date Fri, 27 Nov 2009 14:32:57 GMT

    [ http://jira.codehaus.org/browse/MCOMPILER-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=199749#action_199749
] 

Ivan Bogouchev commented on MCOMPILER-71:
-----------------------------------------

We experience the same problem and it seems this is a bug in javac 1.5 : 

  http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6198196




> javac compilation error for package-info.java containing package annotation
> ---------------------------------------------------------------------------
>
>                 Key: MCOMPILER-71
>                 URL: http://jira.codehaus.org/browse/MCOMPILER-71
>             Project: Maven 2.x Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0.2
>         Environment: Windows XP SP2
> JDK 1.5.0_15
>            Reporter: Gabriel Forro
>         Attachments: compile_error_2.0.2.log
>
>
> The package-info.java files can not be compiled in Maven 2 if the 2.0.2 maven-compiler-plugin
is used. package-info.java 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 package-info.java (for instance "javac
sk/forro/package-info.java"). You must use '\' separator (for instance "javac sk\forro\package-info.java").
If you use the '/' separator you get the the compilation error reported by this bug (package
annotations should be in file package-info.java). 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 package-info.java files at all.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message