From ba98e98d9432c5847d7c2cd0c5c598f14011502b Mon Sep 17 00:00:00 2001 From: Jonathan Schneider Date: Sat, 14 Dec 2024 18:58:09 -0500 Subject: [PATCH 1/3] Apply MSAL license --- bin/main/META-INF/rewrite/category.yml | 21 ++++++++++++ bin/main/META-INF/rewrite/micrometer-13.yml | 38 +++++++++++++++++++++ bin/main/META-INF/rewrite/micrometer.yml | 23 +++++++++++++ bin/main/META-INF/rewrite/misk.yml | 24 +++++++++++++ 4 files changed, 106 insertions(+) create mode 100644 bin/main/META-INF/rewrite/category.yml create mode 100644 bin/main/META-INF/rewrite/micrometer-13.yml create mode 100644 bin/main/META-INF/rewrite/micrometer.yml create mode 100644 bin/main/META-INF/rewrite/misk.yml diff --git a/bin/main/META-INF/rewrite/category.yml b/bin/main/META-INF/rewrite/category.yml new file mode 100644 index 0000000..f0e0eaa --- /dev/null +++ b/bin/main/META-INF/rewrite/category.yml @@ -0,0 +1,21 @@ +# +# Copyright 2024 the original author or authors. +#

+# Licensed under the Moderne Source Available License (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +#

+# https://docs.moderne.io/licensing/moderne-source-available-license +#

+# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +type: specs.openrewrite.org/v1beta/category +name: Micrometer +packageName: org.openrewrite.micrometer +description: Recipes to perform [Micrometer](https://micrometer.io/) migration tasks. diff --git a/bin/main/META-INF/rewrite/micrometer-13.yml b/bin/main/META-INF/rewrite/micrometer-13.yml new file mode 100644 index 0000000..a635256 --- /dev/null +++ b/bin/main/META-INF/rewrite/micrometer-13.yml @@ -0,0 +1,38 @@ +# +# Copyright 2024 the original author or authors. +#

+# Licensed under the Moderne Source Available License (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +#

+# https://docs.moderne.io/licensing/moderne-source-available-license +#

+# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +type: specs.openrewrite.org/v1beta/recipe +name: org.openrewrite.micrometer.UpgradeMicrometer_1_13 +displayName: Migrate to Micrometer 1.13 +description: >- + Migrate applications to the latest Micrometer 1.13 release. This recipe will modify an + application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have + changes between versions as described in the [Micrometer 1.13 migration guide](https://github.com/micrometer-metrics/micrometer/wiki/1.13-Migration-Guide). +tags: + - micrometer +recipeList: + - org.openrewrite.java.dependencies.UpgradeDependencyVersion: + groupId: io.micrometer + artifactId: '*' + newVersion: 1.13.x + - org.openrewrite.java.ChangePackage: + oldPackageName: io.micrometer.prometheus + newPackageName: io.micrometer.prometheusmetrics + - org.openrewrite.java.ChangeType: + oldFullyQualifiedTypeName: io.prometheus.client.CollectorRegistry + newFullyQualifiedTypeName: io.prometheus.metrics.model.registry.PrometheusRegistry + diff --git a/bin/main/META-INF/rewrite/micrometer.yml b/bin/main/META-INF/rewrite/micrometer.yml new file mode 100644 index 0000000..09eedc2 --- /dev/null +++ b/bin/main/META-INF/rewrite/micrometer.yml @@ -0,0 +1,23 @@ +# +# Copyright 2024 the original author or authors. +#

+# Licensed under the Moderne Source Available License (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +#

+# https://docs.moderne.io/licensing/moderne-source-available-license +#

+# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +type: specs.openrewrite.org/v1beta/recipe +name: org.openrewrite.micrometer.UpgradeMicrometer +displayName: Upgrade Micrometer +description: This recipe will apply changes commonly needed when migrating Micrometer. +recipeList: + - org.openrewrite.micrometer.UpgradeMicrometer_1_13 diff --git a/bin/main/META-INF/rewrite/misk.yml b/bin/main/META-INF/rewrite/misk.yml new file mode 100644 index 0000000..98e9566 --- /dev/null +++ b/bin/main/META-INF/rewrite/misk.yml @@ -0,0 +1,24 @@ +# +# Copyright 2024 the original author or authors. +#

+# Licensed under the Moderne Source Available License (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +#

+# https://docs.moderne.io/licensing/moderne-source-available-license +#

+# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +type: specs.openrewrite.org/v1beta/recipe +name: org.openrewrite.micrometer.misk.MigrateMiskToMicrometer +displayName: Migrate Misk metrics to Micrometer +description: This recipe will move Misk metrics to Micrometer, where that is possible to do without a loss of fidelity. +recipeList: + - org.openrewrite.micrometer.misk.NoExplicitEmptyLabelList + - org.openrewrite.micrometer.misk.MigrateEmptyLabelMiskCounter From 8c58a96a8b489b2b4c2c7c2e6487e464a05fbb34 Mon Sep 17 00:00:00 2001 From: Jonathan Schneider Date: Sat, 14 Dec 2024 19:10:57 -0500 Subject: [PATCH 2/3] Apply MSAL license --- bin/main/META-INF/rewrite/category.yml | 21 ------------ bin/main/META-INF/rewrite/micrometer-13.yml | 38 --------------------- bin/main/META-INF/rewrite/micrometer.yml | 23 ------------- bin/main/META-INF/rewrite/misk.yml | 24 ------------- 4 files changed, 106 deletions(-) delete mode 100644 bin/main/META-INF/rewrite/category.yml delete mode 100644 bin/main/META-INF/rewrite/micrometer-13.yml delete mode 100644 bin/main/META-INF/rewrite/micrometer.yml delete mode 100644 bin/main/META-INF/rewrite/misk.yml diff --git a/bin/main/META-INF/rewrite/category.yml b/bin/main/META-INF/rewrite/category.yml deleted file mode 100644 index f0e0eaa..0000000 --- a/bin/main/META-INF/rewrite/category.yml +++ /dev/null @@ -1,21 +0,0 @@ -# -# Copyright 2024 the original author or authors. -#

-# Licensed under the Moderne Source Available License (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -#

-# https://docs.moderne.io/licensing/moderne-source-available-license -#

-# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -type: specs.openrewrite.org/v1beta/category -name: Micrometer -packageName: org.openrewrite.micrometer -description: Recipes to perform [Micrometer](https://micrometer.io/) migration tasks. diff --git a/bin/main/META-INF/rewrite/micrometer-13.yml b/bin/main/META-INF/rewrite/micrometer-13.yml deleted file mode 100644 index a635256..0000000 --- a/bin/main/META-INF/rewrite/micrometer-13.yml +++ /dev/null @@ -1,38 +0,0 @@ -# -# Copyright 2024 the original author or authors. -#

-# Licensed under the Moderne Source Available License (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -#

-# https://docs.moderne.io/licensing/moderne-source-available-license -#

-# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.micrometer.UpgradeMicrometer_1_13 -displayName: Migrate to Micrometer 1.13 -description: >- - Migrate applications to the latest Micrometer 1.13 release. This recipe will modify an - application's build files, make changes to deprecated/preferred APIs, and migrate configuration settings that have - changes between versions as described in the [Micrometer 1.13 migration guide](https://github.com/micrometer-metrics/micrometer/wiki/1.13-Migration-Guide). -tags: - - micrometer -recipeList: - - org.openrewrite.java.dependencies.UpgradeDependencyVersion: - groupId: io.micrometer - artifactId: '*' - newVersion: 1.13.x - - org.openrewrite.java.ChangePackage: - oldPackageName: io.micrometer.prometheus - newPackageName: io.micrometer.prometheusmetrics - - org.openrewrite.java.ChangeType: - oldFullyQualifiedTypeName: io.prometheus.client.CollectorRegistry - newFullyQualifiedTypeName: io.prometheus.metrics.model.registry.PrometheusRegistry - diff --git a/bin/main/META-INF/rewrite/micrometer.yml b/bin/main/META-INF/rewrite/micrometer.yml deleted file mode 100644 index 09eedc2..0000000 --- a/bin/main/META-INF/rewrite/micrometer.yml +++ /dev/null @@ -1,23 +0,0 @@ -# -# Copyright 2024 the original author or authors. -#

-# Licensed under the Moderne Source Available License (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -#

-# https://docs.moderne.io/licensing/moderne-source-available-license -#

-# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.micrometer.UpgradeMicrometer -displayName: Upgrade Micrometer -description: This recipe will apply changes commonly needed when migrating Micrometer. -recipeList: - - org.openrewrite.micrometer.UpgradeMicrometer_1_13 diff --git a/bin/main/META-INF/rewrite/misk.yml b/bin/main/META-INF/rewrite/misk.yml deleted file mode 100644 index 98e9566..0000000 --- a/bin/main/META-INF/rewrite/misk.yml +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright 2024 the original author or authors. -#

-# Licensed under the Moderne Source Available License (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -#

-# https://docs.moderne.io/licensing/moderne-source-available-license -#

-# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -type: specs.openrewrite.org/v1beta/recipe -name: org.openrewrite.micrometer.misk.MigrateMiskToMicrometer -displayName: Migrate Misk metrics to Micrometer -description: This recipe will move Misk metrics to Micrometer, where that is possible to do without a loss of fidelity. -recipeList: - - org.openrewrite.micrometer.misk.NoExplicitEmptyLabelList - - org.openrewrite.micrometer.misk.MigrateEmptyLabelMiskCounter From 8da9c3d4604070f1c20c8c1eaaffbbad8af54cf1 Mon Sep 17 00:00:00 2001 From: Jonathan Schneider Date: Sat, 14 Dec 2024 21:16:37 -0500 Subject: [PATCH 3/3] MSAL license gets set in pom.xml --- build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle.kts b/build.gradle.kts index 15dfdb6..f925fba 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,6 @@ plugins { id("org.openrewrite.build.recipe-library") version "latest.release" + id("org.openrewrite.build.moderne-source-available-license") version "latest.release" } group = "org.openrewrite.recipe"