apache / apache/maven-compiler-plugin
[MCOMPILER-498] Recompilation when class name doesn't match file name
- Dominant language
- Java
- Stars
- 261
- Forks
- 191
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 8
Description
**[T3rm1](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=t3rm1)** opened **[MCOMPILER-498](https://issues.apache.org/jira/browse/MCOMPILER-498?redirect=false)** and commented
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:
```java
package foo;
class UncommonTest {
}
class CommonTest {
}
```
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.
---
No further details from [MCOMPILER-498](https://issues.apache.org/jira/browse/MCOMPILER-498?redirect=false)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.