T3rm1 created MCOMPILER-498:
-------------------------------

             Summary: Recompilation when class name doesn't match file name
                 Key: MCOMPILER-498
                 URL: https://issues.apache.org/jira/browse/MCOMPILER-498
             Project: Maven Compiler Plugin
          Issue Type: Bug
            Reporter: T3rm1


The compiler plugin detects a file as stale whenever the class defined inside 
has a different name than the file.

Steps to reproduce:

Create a file named {{SpecialTest.java}} in directory {{{}foo{}}}.
Paste in following content:
{code:java}
package foo;

class UncommonTest {
}

class CommonTest {
} {code}
Run {{mvn -X test-compile}}

It'll report on each invocation: {{[DEBUG] Stale source detected: 
F:\Git\bug\src\test\java\foo\SpecialTest.java}}

That's because the plugin is looking for a fileĀ {{{}SpecialTest.class{}}}.

This is a problem because it can easily happen that you have a typo in your 
class or file name so that they don't match.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to