Maven Compiler Plugin
  1. Maven Compiler Plugin
  2. MCOMPILER-36

class Foo is public, should be declared in a file named Foo.java

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.0.1
    • Fix Version/s: None
    • Labels:
      None

      Description

      When adding a depency to a jar which contains source code like this:

      <dependency>
      <groupId>com.nordija</groupId>
      <artifactId>nordija-midtier</artifactId>
      <version>snapshot</version>
      <classifier>sources</classifier>
      <scope>test</scope>
      </dependency>

      where I'm using the "classifier", the "compiler:testCompile" goal fails with the error:

      Failure executing javac, but could not parse the error:
      /home/tomcat/.m2/repository/com/nordija/nordija-midtier/snapshot/nordija-midtier-snapshot-sources.jar(com/nordija/midtier/util/NestingException.java):42: class NestingException is public, should be declared in a file named NestingException.java
      (source unavailable)
      1 error

      Now, my first thought is of course that the jar is corrupt or packaged wrongly or something like that. But it seems to be okay, and my IDEA can browse it and does not show error-marks for the source file in question. And, the same dependency is used in another module in the same build, where it is no problem!!!

      I solved the problem by going back to v2.0 of the compiler plugin, where everything works.

        Activity

        Per Olesen created issue -
        Michael Osipov made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 09:20:51 UTC 2015 [ 1428225651644 ]
        Mark Thomas made changes -
        Workflow jira [ 12718553 ] Default workflow, editable Closed status [ 12750084 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 22:48:53 UTC 2015 [ 1428274133206 ]
        Mark Thomas made changes -
        Workflow jira [ 12956140 ] Default workflow, editable Closed status [ 12993197 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Per Olesen
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development