You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2023/08/15 13:15:21 UTC

[logging-log4j2] branch 2.x updated: Move OpenRewrite config to a profile

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

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


The following commit(s) were added to refs/heads/2.x by this push:
     new 5c54d1f847 Move OpenRewrite config to a profile
5c54d1f847 is described below

commit 5c54d1f8470e039c0836a50aa496b05a49148b91
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Tue Aug 15 15:15:14 2023 +0200

    Move OpenRewrite config to a profile
---
 pom.xml     | 66 +++++++++++++++++++++++++++++++++++++------------------------
 rewrite.yml |  2 +-
 2 files changed, 41 insertions(+), 27 deletions(-)

diff --git a/pom.xml b/pom.xml
index 3228b85d4d..483835b1d3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -361,9 +361,6 @@
     <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
     <maven-taglib-plugin.version>2.4</maven-taglib-plugin.version>
     <maven-toolchains-plugin.version>3.1.0</maven-toolchains-plugin.version>
-    <rewrite-java.version>8.1.15</rewrite-java.version>
-    <rewrite-maven-plugin.version>5.4.1</rewrite-maven-plugin.version>
-    <rewrite-static-analysis.version>1.0.5</rewrite-static-analysis.version>
     <spotbugs-maven-plugin.version>4.7.3.5</spotbugs-maven-plugin.version>
     <!-- `surefire.version` property used in `apache.org:apache`: -->
     <surefire.version>3.1.2</surefire.version>
@@ -1464,29 +1461,6 @@
           <version>${maven-toolchains-plugin.version}</version>
         </plugin>
 
-        <plugin>
-          <groupId>org.openrewrite.maven</groupId>
-          <artifactId>rewrite-maven-plugin</artifactId>
-          <version>${rewrite-maven-plugin.version}</version>
-          <dependencies>
-            <dependency>
-              <groupId>org.openrewrite</groupId>
-              <artifactId>rewrite-java</artifactId>
-              <version>${rewrite-java.version}</version>
-            </dependency>
-            <dependency>
-              <groupId>org.openrewrite.recipe</groupId>
-              <artifactId>rewrite-static-analysis</artifactId>
-              <version>${rewrite-static-analysis.version}</version>
-            </dependency>
-            <dependency>
-              <groupId>org.openrewrite.recipe</groupId>
-              <artifactId>rewrite-testing-frameworks</artifactId>
-              <version>2.0.9</version>
-            </dependency>
-          </dependencies>
-        </plugin>
-
         <plugin>
           <groupId>com.github.spotbugs</groupId>
           <artifactId>spotbugs-maven-plugin</artifactId>
@@ -1914,6 +1888,46 @@
       </build>
     </profile>
 
+    <profile>
+      <id>rewrite</id>
+      <properties>
+        <rewrite-java.version>8.1.15</rewrite-java.version>
+        <rewrite-maven-plugin.version>5.4.1</rewrite-maven-plugin.version>
+        <rewrite-static-analysis.version>1.0.5</rewrite-static-analysis.version>
+        <rewrite-testing.version>2.0.9</rewrite-testing.version>
+      </properties>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.openrewrite.maven</groupId>
+            <artifactId>rewrite-maven-plugin</artifactId>
+            <version>${rewrite-maven-plugin.version}</version>
+            <configuration>
+              <activeRecipes>
+                <recipe>org.apache.logging.log4j.rewrite.FinalizeAll</recipe>
+              </activeRecipes>
+            </configuration>
+            <dependencies>
+              <dependency>
+                <groupId>org.openrewrite</groupId>
+                <artifactId>rewrite-java</artifactId>
+                <version>${rewrite-java.version}</version>
+              </dependency>
+              <dependency>
+                <groupId>org.openrewrite.recipe</groupId>
+                <artifactId>rewrite-static-analysis</artifactId>
+                <version>${rewrite-static-analysis.version}</version>
+              </dependency>
+              <dependency>
+                <groupId>org.openrewrite.recipe</groupId>
+                <artifactId>rewrite-testing-frameworks</artifactId>
+                <version>${rewrite-testing.version}</version>
+              </dependency>
+            </dependencies>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
   </profiles>
 
 </project>
diff --git a/rewrite.yml b/rewrite.yml
index 170dcc841a..1904d80ec0 100644
--- a/rewrite.yml
+++ b/rewrite.yml
@@ -1,5 +1,5 @@
 # Run with:
-# ./mvnw rewrite:run -Drewrite.activeRecipes=org.apache.logging.log4j.rewrite.FinalizeAll -pl !log4j-bom
+# ./mvnw -Prewrite rewrite:run -pl !log4j-bom
 ---
 type: specs.openrewrite.org/v1beta/recipe
 name: org.apache.logging.log4j.rewrite.FinalizeAll