vy commented on code in PR #2404:
URL: https://github.com/apache/logging-log4j2/pull/2404#discussion_r1537473129


##########
log4j-core/pom.xml:
##########
@@ -222,40 +233,61 @@
         </executions>
       </plugin>
 
+      <!-- We can't use `plugin-processing` Maven profile activated by 
`.log4j-plugin-processing-activator` file, because...
+           `log4j-core` contains `PluginProcessor`, that is responsible for 
generating `META-INF/org/apache/.../Log4j2Plugins.dat` from `@Plugin`-annotated 
members.
+           `log4j-core` also contains `@Plugin`-annotated members too.
+           That is, we need `log4j-core` to build `log4j-core`.
+           To work around this chicken-and-egg problem, we build as follows:
+
+           1. Compile sources using the `default-compile` default compilation 
execution.
+              This will generate the `PluginProcessor` class.
+
+           2. Make a second compilation pass using the generated 
`PluginProcessor`. -->
       <plugin>
         <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <annotationProcessorPaths combine.self="override" />
-        </configuration>
         <executions>
+
+          <!-- Compile sources as usual -->
           <execution>
-            <!-- disable annotation processing for first pass -->
             <id>default-compile</id>
             <configuration>
-              <annotationProcessorPaths>
+              <annotationProcessorPaths combine.children="append">
+                <!-- 
`org.apache.logging.log4j.docgen.processor.DescriptorGenerator` for generating 
`log4j-plugins.xml`: -->
                 <path>
-                  <groupId>com.google.errorprone</groupId>
-                  <artifactId>error_prone_core</artifactId>
-                  <version>${error-prone.version}</version>
+                  <groupId>org.apache.logging.log4j</groupId>
+                  <artifactId>log4j-docgen</artifactId>
+                  <version>${log4j-docgen.version}</version>
                 </path>
               </annotationProcessorPaths>

Review Comment:
   Fixed in 5aa7a3d16cf7c7b9ba4c9d15be66914da21e6e23.



-- 
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: notifications-unsubscr...@logging.apache.org

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

Reply via email to