keith-turner commented on code in PR #5890:
URL: https://github.com/apache/accumulo/pull/5890#discussion_r2360974174


##########
pom.xml:
##########
@@ -1682,11 +1693,57 @@
         <surefire.reuseForks>${reuseForks}</surefire.reuseForks>
       </properties>
     </profile>
+    <profile>
+      <!--
+        Explicitly add the log4j annotation processor to generate the 
Log4jPlugins.dat file for the
+        AccumuloMonitorAppender, but only when not using the errorprone 
profile. This is necessary
+        because log4j added a GraalVMProcessor that we don't need and won't 
run without failing the
+        build, so we need to itemize all the processors we do want to run. 
Except, I couldn't get
+        errorprone to work when I tried to itemize its processors, so 
errorprone needs to rely on
+        the normal autodiscovery process. Since that would pick up the 
unwanted GraalVMProcessor,
+        this profile exists to avoid adding log4j-core to the processors when 
using errorprone.
+        This prevents using the AccumuloMonitorAppender when using the 
errorprone profile.
+        Activate the errorprone profile and de-activate this one 
simultaneously by using:
+        `mvn -Derrorprone` or `mvn -Perrorprone,!generate-log4j-plugin-data`
+      -->
+      <id>generate-log4j-plugin-data</id>
+      <activation>
+        <property>
+          <name>!errorprone</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-compiler-plugin</artifactId>
+            <configuration>
+              <annotationProcessorPaths>
+                <path>
+                  <groupId>org.apache.logging.log4j</groupId>
+                  <artifactId>log4j-core</artifactId>
+                  <version>${version.log4j}</version>
+                </path>
+              </annotationProcessorPaths>
+              <annotationProcessors>

Review Comment:
   Is this comment correct?  It may be redundant w/ other comments, but it did 
not click for me until reading some of your comments on this  PR.
   
   
   ```suggestion
                 <!-- explicitly specify processes to avoid auto discovery 
which would find the error prone processor -->
                 <annotationProcessors>
   ```



-- 
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...@accumulo.apache.org

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

Reply via email to