You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by vy...@apache.org on 2024/03/19 08:28:08 UTC

(logging-log4j2) 04/05: Create a common `log4j.docgen.typeFilter.excludePattern` property

This is an automated email from the ASF dual-hosted git repository.

vy pushed a commit to branch 2.x-docgen
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit fcc53b997088adba13ff625186cd3a1926fa2f03
Author: Volkan Yazıcı <vo...@yazi.ci>
AuthorDate: Fri Mar 15 11:30:52 2024 +0100

    Create a common `log4j.docgen.typeFilter.excludePattern` property
---
 log4j-core/pom.xml   |  1 +
 log4j-parent/pom.xml |  1 +
 pom.xml              | 19 +++++++++++++++----
 3 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/log4j-core/pom.xml b/log4j-core/pom.xml
index b8737a72b2..b8ef135c25 100644
--- a/log4j-core/pom.xml
+++ b/log4j-core/pom.xml
@@ -266,6 +266,7 @@
                 <arg>-Alog4j.docgen.artifactId=${project.artifactId}</arg>
                 <arg>-Alog4j.docgen.version=${project.version}</arg>
                 <arg>-Alog4j.docgen.description=${project.description}</arg>
+                <arg>-Alog4j.docgen.typeFilter.excludePattern=${log4j.docgen.typeFilter.excludePattern}</arg>
               </compilerArgs>
             </configuration>
           </execution>
diff --git a/log4j-parent/pom.xml b/log4j-parent/pom.xml
index b3d3e4bcbc..edee1511c6 100644
--- a/log4j-parent/pom.xml
+++ b/log4j-parent/pom.xml
@@ -1242,6 +1242,7 @@
                 <arg>-Alog4j.docgen.artifactId=${project.artifactId}</arg>
                 <arg>-Alog4j.docgen.version=${project.version}</arg>
                 <arg>-Alog4j.docgen.description=${project.description}</arg>
+                <arg>-Alog4j.docgen.typeFilter.excludePattern=${log4j.docgen.typeFilter.excludePattern}</arg>
               </compilerArgs>
             </configuration>
           </plugin>
diff --git a/pom.xml b/pom.xml
index 49e8528346..06f484753e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -336,6 +336,11 @@
     <!-- Dependency versions -->
     <log4j-docgen.version>1.0.0-SNAPSHOT</log4j-docgen.version>
 
+    <!-- ==================================
+         `log4j-docgen`-specific properties
+         ================================== -->
+    <!-- `log4j-docgen` qualified class name exclude pattern -->
+    <log4j.docgen.typeFilter.excludePattern>^java\..+</log4j.docgen.typeFilter.excludePattern>
     <!-- Directories where `log4j-docgen` annotation processor will emit files to -->
     <log4j.docgen.pluginDescriptorsDir.phase1>${maven.multiModuleProjectDirectory}/target/plugin-descriptors/phase1</log4j.docgen.pluginDescriptorsDir.phase1>
     <log4j.docgen.pluginDescriptorsDir.phase2>${maven.multiModuleProjectDirectory}/target/plugin-descriptors/phase2</log4j.docgen.pluginDescriptorsDir.phase2>
@@ -522,6 +527,14 @@
     </dependencies>
   </dependencyManagement>
 
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-docgen</artifactId>
+      <version>${log4j-docgen.version}</version>
+    </dependency>
+  </dependencies>
+
   <build>
 
     <plugins>
@@ -782,9 +795,8 @@
           </descriptorFileMatchers>
 
           <typeFilter>
-            <!-- `excludes` must be in sync. with the `log4j-docgen-type-filter-exclude-pattern` configuration of `log4j-docgen-asciidoctor-extension`! -->
             <excludes>
-              <exclude>java\..+</exclude>
+              <exclude>${log4j.docgen.typeFilter.excludePattern}</exclude>
             </excludes>
           </typeFilter>
 
@@ -875,8 +887,7 @@
                 <source-highlighter>rouge</source-highlighter>
                 <toc>left</toc>
                 <log4j-docgen-descriptor-directory>${project.build.directory}/plugin-descriptors</log4j-docgen-descriptor-directory>
-                <!-- `log4j-docgen-type-filter-exclude-pattern` must be in sync. with the `typeFilter` configuration of `log4j-docgen-maven-plugin`! -->
-                <log4j-docgen-type-filter-exclude-pattern>java\..+</log4j-docgen-type-filter-exclude-pattern>
+                <log4j-docgen-type-filter-exclude-pattern>${log4j.docgen.typeFilter.excludePattern}</log4j-docgen-type-filter-exclude-pattern>
                 <!-- `log4j-docgen-type-template-target` must be in sync. with the `typeTemplate` configuration of `log4j-docgen-maven-plugin`! -->
                 <log4j-docgen-type-template-target>../../%g/%a/%c.html</log4j-docgen-type-template-target>
               </attributes>