Jonathan Strauss created IGNITE-21057:
-----------------------------------------

             Summary: Add Xpkginfo:always to Compiler Args
                 Key: IGNITE-21057
                 URL: https://issues.apache.org/jira/browse/IGNITE-21057
             Project: Ignite
          Issue Type: Wish
          Components: build
    Affects Versions: 2.15
            Reporter: Jonathan Strauss


From:  [javac 
manual|[https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html]]

 

 
{noformat}
-Xpkginfo:[always, legacy, nonempty]
Specifies when and how the javac command generates package-info.class files 
from package-info.java files using one of the following options:

always
Generates a package-info.class file for every package-info.java file. This 
option may be useful if you use a build system such as Ant, which checks that 
each .java file has a corresponding .class file.

legacy
Generates a package-info.class file only if package-info.java contains 
annotations. This option does not generate a package-info.class file if 
package-info.java contains only comments.
Note: A package-info.class file might be generated but be empty if all the 
annotations in the package-info.java file have RetentionPolicy.SOURCE.

nonempty
Generates a package-info.class file only if package-info.java contains 
annotations with RetentionPolicy.CLASS or RetentionPolicy.RUNTIME.


{noformat}
 

The Maven Compiler plugin will always recompile the entire project because 
there are a number of package-info.java source files with no corresponding 
package-info.class files, adding:
{code:java}
<compilerArgs>
    <arg>-Xpkginfo:always</arg>
....{code}
Forces the compilation of these Java source files thereby allowing the build 
cache to function properly.

 



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

Reply via email to