ppkarwasz commented on code in PR #2407:
URL: https://github.com/apache/logging-log4j2/pull/2407#discussion_r1537565796


##########
log4j-parent/pom.xml:
##########
@@ -1028,6 +1031,118 @@
         </plugins>
       </build>
     </profile>
+
+    <profile>
+
+      <id>plugin-processing</id>
+
+      <!-- Profile gets activated using a file instead of, say, a property 
defined by the child `pom.xml`.
+           Since a Maven property lookup requires model interpolation and that 
happens after the profile activation phase.
+           See: https://maven.apache.org/ref/3.9.6/maven-model-builder -->
+      <activation>
+        <file>
+          <exists>.log4j-plugin-processing-activator</exists>
+        </file>
+      </activation>
+
+      <properties>
+        
<log4j.docgen.pluginDescriptorsDir.effective>${log4j.docgen.pluginDescriptorsDir.phase2}</log4j.docgen.pluginDescriptorsDir.effective>
+      </properties>
+
+      <build>
+        <plugins>
+
+          <!-- Generate a random target package for `Log4jPlugins.java` -->
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>build-helper-maven-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>generate-plugin-package-for-tests</id>
+                <goals>
+                  <goal>bsh-property</goal>
+                </goals>

Review Comment:
   This is not necessary, we could hardcode the parameter to 
`org.apache.logging.current.test.module` or similar.
   
   In the current setup the tests of a module `A` do not depend on the content 
of `B/src/test`.



##########
log4j-jul/pom.xml:
##########
@@ -85,19 +85,6 @@
 
   <build>
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <annotationProcessorPaths combine.children="append">
-            <path>
-              <groupId>org.apache.logging.log4j</groupId>
-              <artifactId>log4j-plugin-processor</artifactId>
-              <version>${project.version}</version>
-            </path>
-          </annotationProcessorPaths>
-        </configuration>
-      </plugin>

Review Comment:
   Nice catch!
   
   `log4j-jul` in fact does not have any plugins.



-- 
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