Skip to content

Commit b609f9d

Browse files
committed
Removed support for rewrite-maven-plugin.
1 parent 0a46e38 commit b609f9d

File tree

2 files changed

+18
-32
lines changed

2 files changed

+18
-32
lines changed

Jenkinsfile

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env groovy
22
/*
33
* ao-payments-payflowPro - Provider for the Payflow Pro XMLPay system.
4-
* Copyright (C) 2021, 2022, 2023, 2024 AO Industries, Inc.
4+
* Copyright (C) 2021, 2022, 2023, 2024, 2025 AO Industries, Inc.
55
66
* 7262 Bull Pen Cir
77
* Mobile, AL 36695
@@ -121,9 +121,6 @@ def upstreamProjects = [
121121
* mavenOpts The Maven Java options. *
122122
* Defaults to '-Djansi.force' for colorful logs *
123123
* *
124-
* mavenOptsJdk16 The Maven Java options for JDK 16+. *
125-
* Defaults to exporting Java compiler for rewrite-maven-plugin. *
126-
* *
127124
* extraProfiles An array of additional profiles to pass to Maven. *
128125
* Defaults to [] *
129126
* *
@@ -449,10 +446,6 @@ if (!binding.hasVariable('maven')) {
449446
if (!binding.hasVariable('mavenOpts')) {
450447
binding.setVariable('mavenOpts', '-Djansi.force')
451448
}
452-
if (!binding.hasVariable('mavenOptsJdk16')) {
453-
// See https://docs.openrewrite.org/getting-started/getting-started#running-on-jdk-16-and-newer
454-
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')
455-
}
456449
if (!binding.hasVariable('extraProfiles')) {
457450
binding.setVariable('extraProfiles', [])
458451
}
@@ -800,7 +793,7 @@ or any build that adds or removes build artifacts."""
800793
dir(projectDir) {
801794
withMaven(
802795
maven: maven,
803-
mavenOpts: "${jdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}",
796+
mavenOpts: mavenOpts,
804797
mavenLocalRepo: ".m2/repository-jdk-$jdk",
805798
jdk: "jdk-$jdk"
806799
) {
@@ -855,7 +848,7 @@ or any build that adds or removes build artifacts."""
855848
dir(projectDir) {
856849
withMaven(
857850
maven: maven,
858-
mavenOpts: "${testJdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}",
851+
mavenOpts: mavenOpts,
859852
mavenLocalRepo: ".m2/repository-jdk-$jdk",
860853
jdk: "jdk-$testJdk"
861854
) {
@@ -880,7 +873,7 @@ or any build that adds or removes build artifacts."""
880873
steps {
881874
// Steps moved to separate function to avoid "Method too large"
882875
// See https://stackoverflow.com/a/47631522
883-
deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon)
876+
deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon)
884877
}
885878
}
886879
stage('SonarQube analysis') {
@@ -896,7 +889,7 @@ or any build that adds or removes build artifacts."""
896889
steps {
897890
// Steps moved to separate function to avoid "Method too large"
898891
// See https://stackoverflow.com/a/47631522
899-
sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon)
892+
sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon)
900893
}
901894
}
902895
stage('Quality Gate') {
@@ -943,7 +936,7 @@ or any build that adds or removes build artifacts."""
943936

944937
// Steps moved to separate function to avoid "Method too large"
945938
// See https://stackoverflow.com/a/47631522
946-
void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon) {
939+
void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon) {
947940
// Make sure working tree not modified by build or test
948941
sh checkTreeUnmodifiedScriptBuild(niceCmd)
949942
dir(projectDir) {
@@ -964,7 +957,7 @@ void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk1
964957
sh moveSurefireReportsScript()
965958
withMaven(
966959
maven: maven,
967-
mavenOpts: "${deployJdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}",
960+
mavenOpts: mavenOpts,
968961
mavenLocalRepo: ".m2/repository-jdk-$deployJdk",
969962
jdk: "jdk-$deployJdk"
970963
) {
@@ -979,13 +972,13 @@ void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk1
979972

980973
// Steps moved to separate function to avoid "Method too large"
981974
// See https://stackoverflow.com/a/47631522
982-
void sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon) {
975+
void sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon) {
983976
// Not doing shallow: sh "${niceCmd}git fetch --unshallow || true" // SonarQube does not currently support shallow fetch
984977
dir(projectDir) {
985978
withSonarQubeEnv(installationName: 'AO SonarQube') {
986979
withMaven(
987980
maven: maven,
988-
mavenOpts: "${deployJdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}",
981+
mavenOpts: mavenOpts,
989982
mavenLocalRepo: ".m2/repository-jdk-$deployJdk",
990983
jdk: "jdk-$deployJdk"
991984
) {

book/Jenkinsfile

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env groovy
22
/*
33
* ao-payments-payflowPro - Provider for the Payflow Pro XMLPay system.
4-
* Copyright (C) 2021, 2022, 2023, 2024 AO Industries, Inc.
4+
* Copyright (C) 2021, 2022, 2023, 2024, 2025 AO Industries, Inc.
55
66
* 7262 Bull Pen Cir
77
* Mobile, AL 36695
@@ -126,9 +126,6 @@ def upstreamProjects = [
126126
* mavenOpts The Maven Java options. *
127127
* Defaults to '-Djansi.force' for colorful logs *
128128
* *
129-
* mavenOptsJdk16 The Maven Java options for JDK 16+. *
130-
* Defaults to exporting Java compiler for rewrite-maven-plugin. *
131-
* *
132129
* extraProfiles An array of additional profiles to pass to Maven. *
133130
* Defaults to [] *
134131
* *
@@ -454,10 +451,6 @@ if (!binding.hasVariable('maven')) {
454451
if (!binding.hasVariable('mavenOpts')) {
455452
binding.setVariable('mavenOpts', '-Djansi.force')
456453
}
457-
if (!binding.hasVariable('mavenOptsJdk16')) {
458-
// See https://docs.openrewrite.org/getting-started/getting-started#running-on-jdk-16-and-newer
459-
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')
460-
}
461454
if (!binding.hasVariable('extraProfiles')) {
462455
binding.setVariable('extraProfiles', [])
463456
}
@@ -805,7 +798,7 @@ or any build that adds or removes build artifacts."""
805798
dir(projectDir) {
806799
withMaven(
807800
maven: maven,
808-
mavenOpts: "${jdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}",
801+
mavenOpts: mavenOpts,
809802
mavenLocalRepo: ".m2/repository-jdk-$jdk",
810803
jdk: "jdk-$jdk"
811804
) {
@@ -860,7 +853,7 @@ or any build that adds or removes build artifacts."""
860853
dir(projectDir) {
861854
withMaven(
862855
maven: maven,
863-
mavenOpts: "${testJdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}",
856+
mavenOpts: mavenOpts,
864857
mavenLocalRepo: ".m2/repository-jdk-$jdk",
865858
jdk: "jdk-$testJdk"
866859
) {
@@ -885,7 +878,7 @@ or any build that adds or removes build artifacts."""
885878
steps {
886879
// Steps moved to separate function to avoid "Method too large"
887880
// See https://stackoverflow.com/a/47631522
888-
deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon)
881+
deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon)
889882
}
890883
}
891884
stage('SonarQube analysis') {
@@ -901,7 +894,7 @@ or any build that adds or removes build artifacts."""
901894
steps {
902895
// Steps moved to separate function to avoid "Method too large"
903896
// See https://stackoverflow.com/a/47631522
904-
sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon)
897+
sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon)
905898
}
906899
}
907900
stage('Quality Gate') {
@@ -948,7 +941,7 @@ or any build that adds or removes build artifacts."""
948941

949942
// Steps moved to separate function to avoid "Method too large"
950943
// See https://stackoverflow.com/a/47631522
951-
void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon) {
944+
void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon) {
952945
// Make sure working tree not modified by build or test
953946
sh checkTreeUnmodifiedScriptBuild(niceCmd)
954947
dir(projectDir) {
@@ -969,7 +962,7 @@ void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk1
969962
sh moveSurefireReportsScript()
970963
withMaven(
971964
maven: maven,
972-
mavenOpts: "${deployJdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}",
965+
mavenOpts: mavenOpts,
973966
mavenLocalRepo: ".m2/repository-jdk-$deployJdk",
974967
jdk: "jdk-$deployJdk"
975968
) {
@@ -984,13 +977,13 @@ void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk1
984977

985978
// Steps moved to separate function to avoid "Method too large"
986979
// See https://stackoverflow.com/a/47631522
987-
void sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon) {
980+
void sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon) {
988981
// Not doing shallow: sh "${niceCmd}git fetch --unshallow || true" // SonarQube does not currently support shallow fetch
989982
dir(projectDir) {
990983
withSonarQubeEnv(installationName: 'AO SonarQube') {
991984
withMaven(
992985
maven: maven,
993-
mavenOpts: "${deployJdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}",
986+
mavenOpts: mavenOpts,
994987
mavenLocalRepo: ".m2/repository-jdk-$deployJdk",
995988
jdk: "jdk-$deployJdk"
996989
) {

0 commit comments

Comments
 (0)