From f0c3dc85be9a56917ee95795749092d0f0e84d6c Mon Sep 17 00:00:00 2001 From: Steve Hill Date: Wed, 28 Jun 2023 08:09:04 -0700 Subject: [PATCH] Adopt org.openrewrite.build.recipe-library plugin - Apply license header to all files - Remove unnecessary gradle plugins - Specify type arguments in Java-8-compatible source Issue #4 --- build.gradle.kts | 23 +------------------ settings.gradle.kts | 11 --------- .../sghill/jenkins/rewrite/AddDependency.java | 15 ++++++++++++ .../sghill/jenkins/rewrite/AddPluginsBom.java | 19 +++++++++++++-- .../jenkins/rewrite/ApiPluginIndex.java | 15 ++++++++++++ .../net/sghill/jenkins/rewrite/BomLookup.java | 15 ++++++++++++ .../jenkins/rewrite/ChangeJenkinsVersion.java | 15 ++++++++++++ .../jenkins/rewrite/CreateIndexJelly.java | 17 +++++++++++++- .../DisableLocalResolutionForParentPom.java | 15 ++++++++++++ .../jenkins/rewrite/IsJenkinsPlugin.java | 15 ++++++++++++ .../net/sghill/jenkins/rewrite/Jenkins.java | 15 ++++++++++++ .../rewrite/LoggingTransferListener.java | 15 ++++++++++++ .../rewrite/UpgradeVersionProperty.java | 21 ++++++++++++++--- .../resources/META-INF/rewrite/rewrite.yml | 16 +++++++++++++ src/main/resources/jenkins-bom.xml | 17 ++++++++++++++ .../jenkins/rewrite/ApiPluginIndexTest.java | 15 ++++++++++++ .../sghill/jenkins/rewrite/BomLookupTest.java | 15 ++++++++++++ .../rewrite/ChangeJenkinsVersionTest.kt | 15 ++++++++++++ .../jenkins/rewrite/CreateIndexJellyTest.kt | 15 ++++++++++++ .../DisableLocalResolutionForParentPomTest.kt | 15 ++++++++++++ .../jenkins/rewrite/IsJenkinsPluginTest.kt | 15 ++++++++++++ .../rewrite/JavaxAnnotationsToSpotbugsTest.kt | 15 ++++++++++++ .../rewrite/ModernizeJenkinsPluginTest.kt | 15 ++++++++++++ .../ReplaceLibrariesWithApiPluginTest.kt | 15 ++++++++++++ .../jenkins/rewrite/UpgradeHtmlUnit330Test.kt | 15 ++++++++++++ .../rewrite/UpgradeParentPom466Test.kt | 15 ++++++++++++ .../rewrite/UpgradeVersionPropertyTest.kt | 15 ++++++++++++ .../replace-libraries-with-api-plugin.yml | 16 +++++++++++++ 28 files changed, 401 insertions(+), 39 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 54709f6..b5bdb83 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,22 +5,8 @@ import nebula.plugin.release.git.base.ReleasePluginExtension import java.net.URI plugins { - `java-library` - signing - + id("org.openrewrite.build.recipe-library") version "latest.release" alias(kt.plugins.jvm) - - alias(nn.plugins.contacts) - alias(nn.plugins.javadoc.jar) - alias(nn.plugins.info) - alias(nn.plugins.maven.manifest) - alias(nn.plugins.maven.publish) - alias(nn.plugins.maven.resolved.dependencies) - alias(nn.plugins.publish.verification) - alias(nn.plugins.release) - alias(nn.plugins.source.jar) - - id("org.openrewrite.rewrite").version("6.0.0") } configure { @@ -71,9 +57,6 @@ dependencies { testRuntimeOnly("com.github.spotbugs:spotbugs-annotations:4.7.0") testRuntimeOnly("com.google.code.findbugs:jsr305:3.0.2") testRuntimeOnly("org.slf4j:slf4j-simple:1.7.36") - - rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:2.0.0")) - rewrite("org.openrewrite:rewrite-java:8.0.0") } tasks.test { @@ -154,7 +137,3 @@ signing { tasks.withType() { onlyIf { gradle.taskGraph.hasTask(":publish") } } - -rewrite { - activeRecipe("org.openrewrite.java.upgrade.MigrateToRewrite8sghill") -} diff --git a/settings.gradle.kts b/settings.gradle.kts index 8d22e23..e686538 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -13,16 +13,5 @@ dependencyResolutionManagement { val kotlin = version("kotlin", "1.8.21") plugin("jvm", "org.jetbrains.kotlin.jvm").versionRef(kotlin) } - create("nn") { - plugin("contacts", "com.netflix.nebula.contacts").version("7.0.1") - plugin("info", "com.netflix.nebula.info").version("12.1.4") - plugin("javadoc-jar", "com.netflix.nebula.javadoc-jar").version("20.3.0") - plugin("maven-manifest", "com.netflix.nebula.maven-manifest").version("20.3.0") - plugin("maven-publish", "com.netflix.nebula.maven-publish").version("20.3.0") - plugin("maven-resolved-dependencies", "com.netflix.nebula.maven-resolved-dependencies").version("20.3.0") - plugin("publish-verification", "com.netflix.nebula.publish-verification").version("20.3.0") - plugin("release", "com.netflix.nebula.release").version("17.2.2") - plugin("source-jar", "com.netflix.nebula.source-jar").version("20.3.0") - } } } diff --git a/src/main/java/net/sghill/jenkins/rewrite/AddDependency.java b/src/main/java/net/sghill/jenkins/rewrite/AddDependency.java index 0163554..1676cad 100644 --- a/src/main/java/net/sghill/jenkins/rewrite/AddDependency.java +++ b/src/main/java/net/sghill/jenkins/rewrite/AddDependency.java @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite; import lombok.EqualsAndHashCode; diff --git a/src/main/java/net/sghill/jenkins/rewrite/AddPluginsBom.java b/src/main/java/net/sghill/jenkins/rewrite/AddPluginsBom.java index cac27b0..da64c90 100644 --- a/src/main/java/net/sghill/jenkins/rewrite/AddPluginsBom.java +++ b/src/main/java/net/sghill/jenkins/rewrite/AddPluginsBom.java @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite; import lombok.EqualsAndHashCode; @@ -57,7 +72,7 @@ public Scanned getInitialValue(ExecutionContext ctx) { @Override public TreeVisitor getScanner(Scanned acc) { BomLookup lookup = new BomLookup(); - return Preconditions.check(acc.hasDependencyInBom, new MavenIsoVisitor<>() { + return Preconditions.check(acc.hasDependencyInBom, new MavenIsoVisitor() { @Override public Xml.Document visitDocument(Xml.Document document, ExecutionContext executionContext) { if (acc.hasDependencyInBom) { @@ -82,7 +97,7 @@ public Xml.Tag visitTag(Xml.Tag tag, ExecutionContext executionContext) { @Override public TreeVisitor getVisitor(Scanned acc) { - return Preconditions.check(acc.hasDependencyInBom, new MavenVisitor<>() { + return Preconditions.check(acc.hasDependencyInBom, new MavenVisitor() { @Override public Xml visitDocument(Xml.Document document, ExecutionContext executionContext) { Xml maven = super.visitDocument(document, executionContext); diff --git a/src/main/java/net/sghill/jenkins/rewrite/ApiPluginIndex.java b/src/main/java/net/sghill/jenkins/rewrite/ApiPluginIndex.java index 8a18479..17478ab 100644 --- a/src/main/java/net/sghill/jenkins/rewrite/ApiPluginIndex.java +++ b/src/main/java/net/sghill/jenkins/rewrite/ApiPluginIndex.java @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite; import com.google.inject.Guice; diff --git a/src/main/java/net/sghill/jenkins/rewrite/BomLookup.java b/src/main/java/net/sghill/jenkins/rewrite/BomLookup.java index d3dd76b..fbb1780 100644 --- a/src/main/java/net/sghill/jenkins/rewrite/BomLookup.java +++ b/src/main/java/net/sghill/jenkins/rewrite/BomLookup.java @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite; import lombok.Getter; diff --git a/src/main/java/net/sghill/jenkins/rewrite/ChangeJenkinsVersion.java b/src/main/java/net/sghill/jenkins/rewrite/ChangeJenkinsVersion.java index fa827d1..6fb105d 100644 --- a/src/main/java/net/sghill/jenkins/rewrite/ChangeJenkinsVersion.java +++ b/src/main/java/net/sghill/jenkins/rewrite/ChangeJenkinsVersion.java @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite; import lombok.EqualsAndHashCode; diff --git a/src/main/java/net/sghill/jenkins/rewrite/CreateIndexJelly.java b/src/main/java/net/sghill/jenkins/rewrite/CreateIndexJelly.java index 7125955..24ad5b1 100644 --- a/src/main/java/net/sghill/jenkins/rewrite/CreateIndexJelly.java +++ b/src/main/java/net/sghill/jenkins/rewrite/CreateIndexJelly.java @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite; import org.openrewrite.ExecutionContext; @@ -49,7 +64,7 @@ public Scanned getInitialValue(ExecutionContext ctx) { @Override public TreeVisitor getScanner(Scanned acc) { - return Preconditions.check(!acc.isJenkinsPlugin, new TreeVisitor<>() { + return Preconditions.check(!acc.isJenkinsPlugin, new TreeVisitor() { @Override public @Nullable Tree visit(@Nullable Tree tree, ExecutionContext executionContext) { SourceFile sourceFile = (SourceFile) Objects.requireNonNull(tree); diff --git a/src/main/java/net/sghill/jenkins/rewrite/DisableLocalResolutionForParentPom.java b/src/main/java/net/sghill/jenkins/rewrite/DisableLocalResolutionForParentPom.java index 634d4c4..785c958 100644 --- a/src/main/java/net/sghill/jenkins/rewrite/DisableLocalResolutionForParentPom.java +++ b/src/main/java/net/sghill/jenkins/rewrite/DisableLocalResolutionForParentPom.java @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite; import lombok.EqualsAndHashCode; diff --git a/src/main/java/net/sghill/jenkins/rewrite/IsJenkinsPlugin.java b/src/main/java/net/sghill/jenkins/rewrite/IsJenkinsPlugin.java index 7dbb6ea..ed181b6 100644 --- a/src/main/java/net/sghill/jenkins/rewrite/IsJenkinsPlugin.java +++ b/src/main/java/net/sghill/jenkins/rewrite/IsJenkinsPlugin.java @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite; import lombok.EqualsAndHashCode; diff --git a/src/main/java/net/sghill/jenkins/rewrite/Jenkins.java b/src/main/java/net/sghill/jenkins/rewrite/Jenkins.java index c2264ad..eddae49 100644 --- a/src/main/java/net/sghill/jenkins/rewrite/Jenkins.java +++ b/src/main/java/net/sghill/jenkins/rewrite/Jenkins.java @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite; import org.openrewrite.SourceFile; diff --git a/src/main/java/net/sghill/jenkins/rewrite/LoggingTransferListener.java b/src/main/java/net/sghill/jenkins/rewrite/LoggingTransferListener.java index b7006d1..3bcd8c3 100644 --- a/src/main/java/net/sghill/jenkins/rewrite/LoggingTransferListener.java +++ b/src/main/java/net/sghill/jenkins/rewrite/LoggingTransferListener.java @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite; import lombok.extern.slf4j.Slf4j; diff --git a/src/main/java/net/sghill/jenkins/rewrite/UpgradeVersionProperty.java b/src/main/java/net/sghill/jenkins/rewrite/UpgradeVersionProperty.java index 615a869..3f7b2cf 100644 --- a/src/main/java/net/sghill/jenkins/rewrite/UpgradeVersionProperty.java +++ b/src/main/java/net/sghill/jenkins/rewrite/UpgradeVersionProperty.java @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite; import lombok.EqualsAndHashCode; @@ -52,7 +67,7 @@ public String getDescription() { public TreeVisitor getVisitor() { VersionComparator versionComparator = Semver.validate(minimumVersion, null).getValue(); assert versionComparator != null; - return Preconditions.check(new MavenVisitor<>() { + return Preconditions.check(new MavenVisitor() { @Override public Xml visitDocument(Xml.Document document, ExecutionContext executionContext) { String value = getResolutionResult().getPom().getProperties().get(key); @@ -60,12 +75,12 @@ public Xml visitDocument(Xml.Document document, ExecutionContext executionContex return document; } Optional upgrade = versionComparator.upgrade(value, Collections.singleton(minimumVersion)); - if (upgrade.isEmpty()) { + if (!upgrade.isPresent()) { return document; } return SearchResult.found(document); } - }, new MavenVisitor<>() { + }, new MavenVisitor() { @Override public Xml visitTag(Tag tag, ExecutionContext ctx) { Xml.Tag t = (Tag) super.visitTag(tag, ctx); diff --git a/src/main/resources/META-INF/rewrite/rewrite.yml b/src/main/resources/META-INF/rewrite/rewrite.yml index 594b035..7f84279 100644 --- a/src/main/resources/META-INF/rewrite/rewrite.yml +++ b/src/main/resources/META-INF/rewrite/rewrite.yml @@ -1,3 +1,19 @@ +# +# Copyright 2023 the original author or authors. +#

+# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +#

+# https://www.apache.org/licenses/LICENSE-2.0 +#

+# 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: net.sghill.jenkins.rewrite.UpgradeHtmlUnit_3_3_0 diff --git a/src/main/resources/jenkins-bom.xml b/src/main/resources/jenkins-bom.xml index 42914b2..c004efd 100644 --- a/src/main/resources/jenkins-bom.xml +++ b/src/main/resources/jenkins-bom.xml @@ -1,3 +1,20 @@ + org.jenkins-ci.plugins diff --git a/src/test/kotlin/net/sghill/jenkins/rewrite/ApiPluginIndexTest.java b/src/test/kotlin/net/sghill/jenkins/rewrite/ApiPluginIndexTest.java index 9754bd8..1bf70b1 100644 --- a/src/test/kotlin/net/sghill/jenkins/rewrite/ApiPluginIndexTest.java +++ b/src/test/kotlin/net/sghill/jenkins/rewrite/ApiPluginIndexTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite; import org.junit.jupiter.api.Test; diff --git a/src/test/kotlin/net/sghill/jenkins/rewrite/BomLookupTest.java b/src/test/kotlin/net/sghill/jenkins/rewrite/BomLookupTest.java index cae8463..2f205e5 100644 --- a/src/test/kotlin/net/sghill/jenkins/rewrite/BomLookupTest.java +++ b/src/test/kotlin/net/sghill/jenkins/rewrite/BomLookupTest.java @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite; import org.junit.jupiter.api.Test; diff --git a/src/test/kotlin/net/sghill/jenkins/rewrite/ChangeJenkinsVersionTest.kt b/src/test/kotlin/net/sghill/jenkins/rewrite/ChangeJenkinsVersionTest.kt index 1bdf2e9..6520845 100644 --- a/src/test/kotlin/net/sghill/jenkins/rewrite/ChangeJenkinsVersionTest.kt +++ b/src/test/kotlin/net/sghill/jenkins/rewrite/ChangeJenkinsVersionTest.kt @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/net/sghill/jenkins/rewrite/CreateIndexJellyTest.kt b/src/test/kotlin/net/sghill/jenkins/rewrite/CreateIndexJellyTest.kt index 076581e..c5c687e 100644 --- a/src/test/kotlin/net/sghill/jenkins/rewrite/CreateIndexJellyTest.kt +++ b/src/test/kotlin/net/sghill/jenkins/rewrite/CreateIndexJellyTest.kt @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite import org.junit.jupiter.api.Disabled diff --git a/src/test/kotlin/net/sghill/jenkins/rewrite/DisableLocalResolutionForParentPomTest.kt b/src/test/kotlin/net/sghill/jenkins/rewrite/DisableLocalResolutionForParentPomTest.kt index fa0cbb0..5722b64 100644 --- a/src/test/kotlin/net/sghill/jenkins/rewrite/DisableLocalResolutionForParentPomTest.kt +++ b/src/test/kotlin/net/sghill/jenkins/rewrite/DisableLocalResolutionForParentPomTest.kt @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/net/sghill/jenkins/rewrite/IsJenkinsPluginTest.kt b/src/test/kotlin/net/sghill/jenkins/rewrite/IsJenkinsPluginTest.kt index 9db883b..9a56f21 100644 --- a/src/test/kotlin/net/sghill/jenkins/rewrite/IsJenkinsPluginTest.kt +++ b/src/test/kotlin/net/sghill/jenkins/rewrite/IsJenkinsPluginTest.kt @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite import org.junit.jupiter.api.Disabled diff --git a/src/test/kotlin/net/sghill/jenkins/rewrite/JavaxAnnotationsToSpotbugsTest.kt b/src/test/kotlin/net/sghill/jenkins/rewrite/JavaxAnnotationsToSpotbugsTest.kt index 647500c..3934d33 100644 --- a/src/test/kotlin/net/sghill/jenkins/rewrite/JavaxAnnotationsToSpotbugsTest.kt +++ b/src/test/kotlin/net/sghill/jenkins/rewrite/JavaxAnnotationsToSpotbugsTest.kt @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/net/sghill/jenkins/rewrite/ModernizeJenkinsPluginTest.kt b/src/test/kotlin/net/sghill/jenkins/rewrite/ModernizeJenkinsPluginTest.kt index 57f55f4..a595431 100644 --- a/src/test/kotlin/net/sghill/jenkins/rewrite/ModernizeJenkinsPluginTest.kt +++ b/src/test/kotlin/net/sghill/jenkins/rewrite/ModernizeJenkinsPluginTest.kt @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite import org.junit.jupiter.api.Disabled diff --git a/src/test/kotlin/net/sghill/jenkins/rewrite/ReplaceLibrariesWithApiPluginTest.kt b/src/test/kotlin/net/sghill/jenkins/rewrite/ReplaceLibrariesWithApiPluginTest.kt index 734c049..9b2722a 100644 --- a/src/test/kotlin/net/sghill/jenkins/rewrite/ReplaceLibrariesWithApiPluginTest.kt +++ b/src/test/kotlin/net/sghill/jenkins/rewrite/ReplaceLibrariesWithApiPluginTest.kt @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite import org.junit.jupiter.api.Test diff --git a/src/test/kotlin/net/sghill/jenkins/rewrite/UpgradeHtmlUnit330Test.kt b/src/test/kotlin/net/sghill/jenkins/rewrite/UpgradeHtmlUnit330Test.kt index f8c6590..d17fbd4 100644 --- a/src/test/kotlin/net/sghill/jenkins/rewrite/UpgradeHtmlUnit330Test.kt +++ b/src/test/kotlin/net/sghill/jenkins/rewrite/UpgradeHtmlUnit330Test.kt @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite import org.intellij.lang.annotations.Language diff --git a/src/test/kotlin/net/sghill/jenkins/rewrite/UpgradeParentPom466Test.kt b/src/test/kotlin/net/sghill/jenkins/rewrite/UpgradeParentPom466Test.kt index e5ce0db..7e0840a 100644 --- a/src/test/kotlin/net/sghill/jenkins/rewrite/UpgradeParentPom466Test.kt +++ b/src/test/kotlin/net/sghill/jenkins/rewrite/UpgradeParentPom466Test.kt @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite import org.junit.jupiter.api.Disabled diff --git a/src/test/kotlin/net/sghill/jenkins/rewrite/UpgradeVersionPropertyTest.kt b/src/test/kotlin/net/sghill/jenkins/rewrite/UpgradeVersionPropertyTest.kt index 19583ff..2ebb8dc 100644 --- a/src/test/kotlin/net/sghill/jenkins/rewrite/UpgradeVersionPropertyTest.kt +++ b/src/test/kotlin/net/sghill/jenkins/rewrite/UpgradeVersionPropertyTest.kt @@ -1,3 +1,18 @@ +/* + * Copyright 2023 the original author or authors. + *

+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * https://www.apache.org/licenses/LICENSE-2.0 + *

+ * 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. + */ package net.sghill.jenkins.rewrite import org.junit.jupiter.api.Test diff --git a/src/test/resources/replace-libraries-with-api-plugin.yml b/src/test/resources/replace-libraries-with-api-plugin.yml index 5debcaf..cc6fe77 100644 --- a/src/test/resources/replace-libraries-with-api-plugin.yml +++ b/src/test/resources/replace-libraries-with-api-plugin.yml @@ -1,3 +1,19 @@ +# +# Copyright 2023 the original author or authors. +#

+# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +#

+# https://www.apache.org/licenses/LICENSE-2.0 +#

+# 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: net.sghill.jenkins.rewrite.CommonsLang3ToApiPlugin