You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/02/21 18:14:05 UTC

[GitHub] [maven-compiler-plugin] jglick commented on a change in pull request #88: [MCOMPILER-205] Add a boolean to generate missing package-info classes by default

jglick commented on a change in pull request #88:
URL: https://github.com/apache/maven-compiler-plugin/pull/88#discussion_r811352086



##########
File path: src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
##########
@@ -1286,6 +1315,72 @@ else if ( message.getKind() == CompilerMessage.Kind.WARNING
         }
     }
 
+    private void createMissingPackageInfoClasses( CompilerConfiguration compilerConfiguration,
+                                                  SourceMapping sourceMapping,
+                                                  Set<File> sources )
+            throws InclusionScanException, IOException
+    {
+        for ( File source : sources )
+        {
+            String path = source.toString();
+            if ( path.endsWith( File.separator + "package-info.java" ) )
+            {
+                for ( String root : getCompileSourceRoots() )
+                {
+                    root = root + File.separator;
+                    if ( path.startsWith( root ) )
+                    {
+                        String rel = path.substring( root.length() );
+                        Set<File> files = sourceMapping.getTargetFiles( getOutputDirectory(), rel );

Review comment:
       #95




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org