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


##########
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:
   I don't like an idea of adding a BSH script to the POM, for a single case 
(`log4j-core-test`).



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