Maven compiler plugin always detecting a set of sources as “stale”

前端 未结 9 1332
挽巷
挽巷 2020-12-02 22:31

FIXED: this is a known bug in maven-compiler-plugin 3.1

I am converting an ant-based build of a 1000+ java-sources project to maven. So far so good, but every time l

9条回答
  •  再見小時候
    2020-12-02 22:42

    Faced the same problem. Maven mvn compile with -X option showed that the problem is caused by package-info.java file.

    [DEBUG] Stale source detected: .../package-info.java

    The problem is that there is no .class file generated for package-info.java.

    The solution was found in this PR: https://github.com/apache/flink/pull/5644/files referencing MCOMPILER-205

    
        -Xpkginfo:always
    
    

    which means:

    Always generate package-info.class for every package-info.java file.

提交回复
热议问题