-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed support for rewrite-maven-plugin.
- Loading branch information
Showing
2 changed files
with
18 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/usr/bin/env groovy | ||
/* | ||
* ao-tlds - Self-updating Java API to get top-level domains. | ||
* Copyright (C) 2021, 2022, 2023, 2024 AO Industries, Inc. | ||
* Copyright (C) 2021, 2022, 2023, 2024, 2025 AO Industries, Inc. | ||
* [email protected] | ||
* 7262 Bull Pen Cir | ||
* Mobile, AL 36695 | ||
|
@@ -119,9 +119,6 @@ def upstreamProjects = [ | |
* mavenOpts The Maven Java options. * | ||
* Defaults to '-Djansi.force' for colorful logs * | ||
* * | ||
* mavenOptsJdk16 The Maven Java options for JDK 16+. * | ||
* Defaults to exporting Java compiler for rewrite-maven-plugin. * | ||
* * | ||
* extraProfiles An array of additional profiles to pass to Maven. * | ||
* Defaults to [] * | ||
* * | ||
|
@@ -447,10 +444,6 @@ if (!binding.hasVariable('maven')) { | |
if (!binding.hasVariable('mavenOpts')) { | ||
binding.setVariable('mavenOpts', '-Djansi.force') | ||
} | ||
if (!binding.hasVariable('mavenOptsJdk16')) { | ||
// See https://docs.openrewrite.org/getting-started/getting-started#running-on-jdk-16-and-newer | ||
binding.setVariable('mavenOptsJdk16', '--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED') | ||
} | ||
if (!binding.hasVariable('extraProfiles')) { | ||
binding.setVariable('extraProfiles', []) | ||
} | ||
|
@@ -798,7 +791,7 @@ or any build that adds or removes build artifacts.""" | |
dir(projectDir) { | ||
withMaven( | ||
maven: maven, | ||
mavenOpts: "${jdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}", | ||
mavenOpts: mavenOpts, | ||
mavenLocalRepo: ".m2/repository-jdk-$jdk", | ||
jdk: "jdk-$jdk" | ||
) { | ||
|
@@ -853,7 +846,7 @@ or any build that adds or removes build artifacts.""" | |
dir(projectDir) { | ||
withMaven( | ||
maven: maven, | ||
mavenOpts: "${testJdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}", | ||
mavenOpts: mavenOpts, | ||
mavenLocalRepo: ".m2/repository-jdk-$jdk", | ||
jdk: "jdk-$testJdk" | ||
) { | ||
|
@@ -878,7 +871,7 @@ or any build that adds or removes build artifacts.""" | |
steps { | ||
// Steps moved to separate function to avoid "Method too large" | ||
// See https://stackoverflow.com/a/47631522 | ||
deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon) | ||
deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon) | ||
} | ||
} | ||
stage('SonarQube analysis') { | ||
|
@@ -894,7 +887,7 @@ or any build that adds or removes build artifacts.""" | |
steps { | ||
// Steps moved to separate function to avoid "Method too large" | ||
// See https://stackoverflow.com/a/47631522 | ||
sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon) | ||
sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon) | ||
} | ||
} | ||
stage('Quality Gate') { | ||
|
@@ -941,7 +934,7 @@ or any build that adds or removes build artifacts.""" | |
|
||
// Steps moved to separate function to avoid "Method too large" | ||
// See https://stackoverflow.com/a/47631522 | ||
void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon) { | ||
void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon) { | ||
// Make sure working tree not modified by build or test | ||
sh checkTreeUnmodifiedScriptBuild(niceCmd) | ||
dir(projectDir) { | ||
|
@@ -962,7 +955,7 @@ void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk1 | |
sh moveSurefireReportsScript() | ||
withMaven( | ||
maven: maven, | ||
mavenOpts: "${deployJdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}", | ||
mavenOpts: mavenOpts, | ||
mavenLocalRepo: ".m2/repository-jdk-$deployJdk", | ||
jdk: "jdk-$deployJdk" | ||
) { | ||
|
@@ -977,13 +970,13 @@ void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk1 | |
|
||
// Steps moved to separate function to avoid "Method too large" | ||
// See https://stackoverflow.com/a/47631522 | ||
void sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon) { | ||
void sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon) { | ||
// Not doing shallow: sh "${niceCmd}git fetch --unshallow || true" // SonarQube does not currently support shallow fetch | ||
dir(projectDir) { | ||
withSonarQubeEnv(installationName: 'AO SonarQube') { | ||
withMaven( | ||
maven: maven, | ||
mavenOpts: "${deployJdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}", | ||
mavenOpts: mavenOpts, | ||
mavenLocalRepo: ".m2/repository-jdk-$deployJdk", | ||
jdk: "jdk-$deployJdk" | ||
) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/usr/bin/env groovy | ||
/* | ||
* ao-tlds - Self-updating Java API to get top-level domains. | ||
* Copyright (C) 2021, 2022, 2023, 2024 AO Industries, Inc. | ||
* Copyright (C) 2021, 2022, 2023, 2024, 2025 AO Industries, Inc. | ||
* [email protected] | ||
* 7262 Bull Pen Cir | ||
* Mobile, AL 36695 | ||
|
@@ -126,9 +126,6 @@ def upstreamProjects = [ | |
* mavenOpts The Maven Java options. * | ||
* Defaults to '-Djansi.force' for colorful logs * | ||
* * | ||
* mavenOptsJdk16 The Maven Java options for JDK 16+. * | ||
* Defaults to exporting Java compiler for rewrite-maven-plugin. * | ||
* * | ||
* extraProfiles An array of additional profiles to pass to Maven. * | ||
* Defaults to [] * | ||
* * | ||
|
@@ -454,10 +451,6 @@ if (!binding.hasVariable('maven')) { | |
if (!binding.hasVariable('mavenOpts')) { | ||
binding.setVariable('mavenOpts', '-Djansi.force') | ||
} | ||
if (!binding.hasVariable('mavenOptsJdk16')) { | ||
// See https://docs.openrewrite.org/getting-started/getting-started#running-on-jdk-16-and-newer | ||
binding.setVariable('mavenOptsJdk16', '--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED') | ||
} | ||
if (!binding.hasVariable('extraProfiles')) { | ||
binding.setVariable('extraProfiles', []) | ||
} | ||
|
@@ -805,7 +798,7 @@ or any build that adds or removes build artifacts.""" | |
dir(projectDir) { | ||
withMaven( | ||
maven: maven, | ||
mavenOpts: "${jdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}", | ||
mavenOpts: mavenOpts, | ||
mavenLocalRepo: ".m2/repository-jdk-$jdk", | ||
jdk: "jdk-$jdk" | ||
) { | ||
|
@@ -860,7 +853,7 @@ or any build that adds or removes build artifacts.""" | |
dir(projectDir) { | ||
withMaven( | ||
maven: maven, | ||
mavenOpts: "${testJdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}", | ||
mavenOpts: mavenOpts, | ||
mavenLocalRepo: ".m2/repository-jdk-$jdk", | ||
jdk: "jdk-$testJdk" | ||
) { | ||
|
@@ -885,7 +878,7 @@ or any build that adds or removes build artifacts.""" | |
steps { | ||
// Steps moved to separate function to avoid "Method too large" | ||
// See https://stackoverflow.com/a/47631522 | ||
deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon) | ||
deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon) | ||
} | ||
} | ||
stage('SonarQube analysis') { | ||
|
@@ -901,7 +894,7 @@ or any build that adds or removes build artifacts.""" | |
steps { | ||
// Steps moved to separate function to avoid "Method too large" | ||
// See https://stackoverflow.com/a/47631522 | ||
sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon) | ||
sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon) | ||
} | ||
} | ||
stage('Quality Gate') { | ||
|
@@ -948,7 +941,7 @@ or any build that adds or removes build artifacts.""" | |
|
||
// Steps moved to separate function to avoid "Method too large" | ||
// See https://stackoverflow.com/a/47631522 | ||
void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon) { | ||
void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon) { | ||
// Make sure working tree not modified by build or test | ||
sh checkTreeUnmodifiedScriptBuild(niceCmd) | ||
dir(projectDir) { | ||
|
@@ -969,7 +962,7 @@ void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk1 | |
sh moveSurefireReportsScript() | ||
withMaven( | ||
maven: maven, | ||
mavenOpts: "${deployJdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}", | ||
mavenOpts: mavenOpts, | ||
mavenLocalRepo: ".m2/repository-jdk-$deployJdk", | ||
jdk: "jdk-$deployJdk" | ||
) { | ||
|
@@ -984,13 +977,13 @@ void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk1 | |
|
||
// Steps moved to separate function to avoid "Method too large" | ||
// See https://stackoverflow.com/a/47631522 | ||
void sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon) { | ||
void sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon) { | ||
// Not doing shallow: sh "${niceCmd}git fetch --unshallow || true" // SonarQube does not currently support shallow fetch | ||
dir(projectDir) { | ||
withSonarQubeEnv(installationName: 'AO SonarQube') { | ||
withMaven( | ||
maven: maven, | ||
mavenOpts: "${deployJdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}", | ||
mavenOpts: mavenOpts, | ||
mavenLocalRepo: ".m2/repository-jdk-$deployJdk", | ||
jdk: "jdk-$deployJdk" | ||
) { | ||
|