From 849c8d823573ddb2aaade8a61d5f6e4b4eac5f89 Mon Sep 17 00:00:00 2001 From: Steve Hill Date: Wed, 28 Jun 2023 21:18:33 -0700 Subject: [PATCH] Finish restructuring net.sghill.jenkins -> org.openrewrite.jenkins Issue #4 --- .../openrewrite/jenkins}/AddDependency.java | 2 +- .../openrewrite/jenkins}/AddPluginsBom.java | 3 +- .../openrewrite/jenkins/CreateIndexJelly.java | 1 - .../openrewrite/jenkins/IsJenkinsPlugin.java | 1 - .../openrewrite/jenkins}/Jenkins.java | 2 +- .../ReplaceLibrariesWithApiPlugin.java | 2 - .../resources/META-INF/rewrite/rewrite.yml | 42 +++++++++---------- 7 files changed, 24 insertions(+), 29 deletions(-) rename src/main/java/{net/sghill/jenkins/rewrite => org/openrewrite/jenkins}/AddDependency.java (98%) rename src/main/java/{net/sghill/jenkins/rewrite => org/openrewrite/jenkins}/AddPluginsBom.java (98%) rename src/main/java/{net/sghill/jenkins/rewrite => org/openrewrite/jenkins}/Jenkins.java (97%) diff --git a/src/main/java/net/sghill/jenkins/rewrite/AddDependency.java b/src/main/java/org/openrewrite/jenkins/AddDependency.java similarity index 98% rename from src/main/java/net/sghill/jenkins/rewrite/AddDependency.java rename to src/main/java/org/openrewrite/jenkins/AddDependency.java index 1676cad..3ba67d9 100644 --- a/src/main/java/net/sghill/jenkins/rewrite/AddDependency.java +++ b/src/main/java/org/openrewrite/jenkins/AddDependency.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package net.sghill.jenkins.rewrite; +package org.openrewrite.jenkins; import lombok.EqualsAndHashCode; import lombok.Value; diff --git a/src/main/java/net/sghill/jenkins/rewrite/AddPluginsBom.java b/src/main/java/org/openrewrite/jenkins/AddPluginsBom.java similarity index 98% rename from src/main/java/net/sghill/jenkins/rewrite/AddPluginsBom.java rename to src/main/java/org/openrewrite/jenkins/AddPluginsBom.java index e1911fc..538bb24 100644 --- a/src/main/java/net/sghill/jenkins/rewrite/AddPluginsBom.java +++ b/src/main/java/org/openrewrite/jenkins/AddPluginsBom.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package net.sghill.jenkins.rewrite; +package org.openrewrite.jenkins; import lombok.EqualsAndHashCode; import lombok.Value; @@ -22,7 +22,6 @@ import org.openrewrite.Preconditions; import org.openrewrite.ScanningRecipe; import org.openrewrite.TreeVisitor; -import org.openrewrite.jenkins.BomLookup; import org.openrewrite.marker.SearchResult; import org.openrewrite.maven.AddManagedDependency; import org.openrewrite.maven.AddManagedDependencyVisitor; diff --git a/src/main/java/org/openrewrite/jenkins/CreateIndexJelly.java b/src/main/java/org/openrewrite/jenkins/CreateIndexJelly.java index f91faee..fa13391 100644 --- a/src/main/java/org/openrewrite/jenkins/CreateIndexJelly.java +++ b/src/main/java/org/openrewrite/jenkins/CreateIndexJelly.java @@ -15,7 +15,6 @@ */ package org.openrewrite.jenkins; -import net.sghill.jenkins.rewrite.Jenkins; import org.openrewrite.ExecutionContext; import org.openrewrite.Preconditions; import org.openrewrite.ScanningRecipe; diff --git a/src/main/java/org/openrewrite/jenkins/IsJenkinsPlugin.java b/src/main/java/org/openrewrite/jenkins/IsJenkinsPlugin.java index fd836c4..afc49cb 100644 --- a/src/main/java/org/openrewrite/jenkins/IsJenkinsPlugin.java +++ b/src/main/java/org/openrewrite/jenkins/IsJenkinsPlugin.java @@ -17,7 +17,6 @@ import lombok.EqualsAndHashCode; import lombok.Value; -import net.sghill.jenkins.rewrite.Jenkins; import org.openrewrite.*; import org.openrewrite.marker.SearchResult; import org.openrewrite.semver.Semver; diff --git a/src/main/java/net/sghill/jenkins/rewrite/Jenkins.java b/src/main/java/org/openrewrite/jenkins/Jenkins.java similarity index 97% rename from src/main/java/net/sghill/jenkins/rewrite/Jenkins.java rename to src/main/java/org/openrewrite/jenkins/Jenkins.java index eddae49..3a2ad5f 100644 --- a/src/main/java/net/sghill/jenkins/rewrite/Jenkins.java +++ b/src/main/java/org/openrewrite/jenkins/Jenkins.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package net.sghill.jenkins.rewrite; +package org.openrewrite.jenkins; import org.openrewrite.SourceFile; import org.openrewrite.internal.lang.Nullable; diff --git a/src/main/java/org/openrewrite/jenkins/ReplaceLibrariesWithApiPlugin.java b/src/main/java/org/openrewrite/jenkins/ReplaceLibrariesWithApiPlugin.java index 4e7ccf7..36743af 100644 --- a/src/main/java/org/openrewrite/jenkins/ReplaceLibrariesWithApiPlugin.java +++ b/src/main/java/org/openrewrite/jenkins/ReplaceLibrariesWithApiPlugin.java @@ -17,14 +17,12 @@ import lombok.EqualsAndHashCode; import lombok.Value; -import net.sghill.jenkins.rewrite.AddDependency; import org.openrewrite.ExecutionContext; import org.openrewrite.Recipe; import org.openrewrite.TreeVisitor; import org.openrewrite.maven.MavenVisitor; import org.openrewrite.maven.RemoveDependency; import org.openrewrite.maven.tree.ResolvedDependency; -import org.openrewrite.xml.AddCommentToXmlTag; import org.openrewrite.xml.AddToTagVisitor; import org.openrewrite.xml.XPathMatcher; import org.openrewrite.xml.tree.Xml; diff --git a/src/main/resources/META-INF/rewrite/rewrite.yml b/src/main/resources/META-INF/rewrite/rewrite.yml index fcf68c7..e4fcb46 100644 --- a/src/main/resources/META-INF/rewrite/rewrite.yml +++ b/src/main/resources/META-INF/rewrite/rewrite.yml @@ -40,7 +40,7 @@ recipeList: # matchOverrides: true --- type: specs.openrewrite.org/v1beta/recipe -name: net.sghill.jenkins.rewrite.UpgradeParentPom_4_67 +name: org.openrewrite.jenkins.UpgradeParentPom_4_67 displayName: Migrate to Parent POM 4.67 description: Upgrade to Parent POM 4.67 recipeList: @@ -49,7 +49,7 @@ recipeList: oldArtifactId: plugin newVersion: 4.67 allowVersionDowngrades: false - - net.sghill.jenkins.rewrite.UpgradeParentPom_4_66 + - org.openrewrite.jenkins.UpgradeParentPom_4_66 --- type: specs.openrewrite.org/v1beta/recipe name: org.openrewrite.jenkins.UpgradeParentPom_4_66 @@ -61,11 +61,11 @@ recipeList: oldArtifactId: plugin newVersion: 4.66 allowVersionDowngrades: false - - net.sghill.jenkins.rewrite.UpgradeHtmlUnit_3_3_0 - - net.sghill.jenkins.rewrite.UpgradeParentPom_4_55 + - org.openrewrite.jenkins.UpgradeHtmlUnit_3_3_0 + - org.openrewrite.jenkins.UpgradeParentPom_4_55 --- type: specs.openrewrite.org/v1beta/recipe -name: net.sghill.jenkins.rewrite.UpgradeParentPom_4_55 +name: org.openrewrite.jenkins.UpgradeParentPom_4_55 displayName: Migrate to Parent POM 4.55 description: Upgrade to Parent POM 4.55 recipeList: @@ -82,10 +82,10 @@ recipeList: newVersion: 5.0.0 overrideManagedVersion: false # TODO: More Mockito 5 migration - - net.sghill.jenkins.rewrite.UpgradeParentPom_4_52 + - org.openrewrite.jenkins.UpgradeParentPom_4_52 --- type: specs.openrewrite.org/v1beta/recipe -name: net.sghill.jenkins.rewrite.UpgradeParentPom_4_52 +name: org.openrewrite.jenkins.UpgradeParentPom_4_52 displayName: Migrate to Parent POM 4.52 description: Upgrade to Parent POM 4.52 (requires Java 11) recipeList: @@ -94,7 +94,7 @@ recipeList: oldArtifactId: plugin newVersion: 4.52 allowVersionDowngrades: false - - net.sghill.jenkins.rewrite.UpgradeVersionProperty: + - org.openrewrite.jenkins.UpgradeVersionProperty: key: jenkins.version minimumVersion: 2.361.4 - org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: @@ -103,10 +103,10 @@ recipeList: newGroupId: io.jenkins.tools.bom newArtifactId: bom-2.361.x newVersion: latest.release - - net.sghill.jenkins.rewrite.UpgradeParentPom_4_50 + - org.openrewrite.jenkins.UpgradeParentPom_4_50 --- type: specs.openrewrite.org/v1beta/recipe -name: net.sghill.jenkins.rewrite.UpgradeParentPom_4_50 +name: org.openrewrite.jenkins.UpgradeParentPom_4_50 displayName: Migrate to Parent POM 4.50 description: Upgrade to Parent POM 4.50 recipeList: @@ -115,11 +115,11 @@ recipeList: oldArtifactId: plugin newVersion: 4.50 allowVersionDowngrades: false - - net.sghill.jenkins.rewrite.UpgradeParentPom_4_49 + - org.openrewrite.jenkins.UpgradeParentPom_4_49 # TODO: min jenkins 2.326 if jcip annotations used --- type: specs.openrewrite.org/v1beta/recipe -name: net.sghill.jenkins.rewrite.UpgradeParentPom_4_49 +name: org.openrewrite.jenkins.UpgradeParentPom_4_49 displayName: Migrate to Parent POM 4.49 description: Upgrade to Parent POM 4.49 recipeList: @@ -128,11 +128,11 @@ recipeList: oldArtifactId: plugin newVersion: 4.49 allowVersionDowngrades: false - - net.sghill.jenkins.rewrite.UpgradeParentPom_4_46 + - org.openrewrite.jenkins.UpgradeParentPom_4_46 # TODO: run build and check for you-must-override-the-yarn.version-property to know if properties must be added --- type: specs.openrewrite.org/v1beta/recipe -name: net.sghill.jenkins.rewrite.UpgradeParentPom_4_46 +name: org.openrewrite.jenkins.UpgradeParentPom_4_46 displayName: Migrate to Parent POM 4.46 description: Upgrade to Parent POM 4.46 recipeList: @@ -145,10 +145,10 @@ recipeList: groupPattern: junit artifactPattern: junit onlyIfVersionsMatch: false - - net.sghill.jenkins.rewrite.UpgradeParentPom_4_43_1 + - org.openrewrite.jenkins.UpgradeParentPom_4_43_1 --- type: specs.openrewrite.org/v1beta/recipe -name: net.sghill.jenkins.rewrite.UpgradeParentPom_4_43_1 +name: org.openrewrite.jenkins.UpgradeParentPom_4_43_1 displayName: Migrate to Parent POM 4.43.1 description: Upgrade to Parent POM 4.43.1 recipeList: @@ -157,11 +157,11 @@ recipeList: oldArtifactId: plugin newVersion: 4.43.1 allowVersionDowngrades: false - - net.sghill.jenkins.rewrite.UpgradeParentPom_4_40 + - org.openrewrite.jenkins.UpgradeParentPom_4_40 # TODO: jenkins.version 2.249.1 w/o downgrades --- type: specs.openrewrite.org/v1beta/recipe -name: net.sghill.jenkins.rewrite.UpgradeParentPom_4_40 +name: org.openrewrite.jenkins.UpgradeParentPom_4_40 displayName: Migrate to Parent POM 4.40 description: Upgrade to Parent POM 4.40 recipeList: @@ -182,7 +182,7 @@ recipeList: ]) --- type: specs.openrewrite.org/v1beta/recipe -name: net.sghill.jenkins.RemoveDep +name: org.openrewrite.jenkins.RemoveDep recipeList: - org.openrewrite.maven.RemoveDependency: groupId: org.jenkins-ci @@ -208,14 +208,14 @@ recipeList: - org.openrewrite.jenkins.ChangeJenkinsVersion: parentPomVersion: "4.64" jenkinsVersion: "2.332.1" - - net.sghill.jenkins.rewrite.AddPluginsBom: + - org.openrewrite.jenkins.AddPluginsBom: bomName: bom-2.332.x bomVersion: "1763.v092b_8980a_f5e" - org.openrewrite.jenkins.DisableLocalResolutionForParentPom - org.openrewrite.maven.RemoveProperty: # as of parent pom 4.40 this is deprecated and unused propertyName: java.level - - net.sghill.jenkins.RemoveDep + - org.openrewrite.jenkins.RemoveDep - org.openrewrite.maven.security.UseHttpsForRepositories --- type: specs.openrewrite.org/v1beta/recipe