Skip to content

Commit b56fe64

Browse files
committed
Removed support for rewrite-maven-plugin.
1 parent d688687 commit b56fe64

File tree

3 files changed

+27
-48
lines changed

3 files changed

+27
-48
lines changed

Jenkinsfile

+9-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env groovy
22
/*
33
* ao-encoding - High performance streaming character encoding.
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
@@ -117,9 +117,6 @@ def upstreamProjects = [
117117
* mavenOpts The Maven Java options. *
118118
* Defaults to '-Djansi.force' for colorful logs *
119119
* *
120-
* mavenOptsJdk16 The Maven Java options for JDK 16+. *
121-
* Defaults to exporting Java compiler for rewrite-maven-plugin. *
122-
* *
123120
* extraProfiles An array of additional profiles to pass to Maven. *
124121
* Defaults to [] *
125122
* *
@@ -445,10 +442,6 @@ if (!binding.hasVariable('maven')) {
445442
if (!binding.hasVariable('mavenOpts')) {
446443
binding.setVariable('mavenOpts', '-Djansi.force')
447444
}
448-
if (!binding.hasVariable('mavenOptsJdk16')) {
449-
// See https://docs.openrewrite.org/getting-started/getting-started#running-on-jdk-16-and-newer
450-
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')
451-
}
452445
if (!binding.hasVariable('extraProfiles')) {
453446
binding.setVariable('extraProfiles', [])
454447
}
@@ -796,7 +789,7 @@ or any build that adds or removes build artifacts."""
796789
dir(projectDir) {
797790
withMaven(
798791
maven: maven,
799-
mavenOpts: "${jdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}",
792+
mavenOpts: mavenOpts,
800793
mavenLocalRepo: ".m2/repository-jdk-$jdk",
801794
jdk: "jdk-$jdk"
802795
) {
@@ -851,7 +844,7 @@ or any build that adds or removes build artifacts."""
851844
dir(projectDir) {
852845
withMaven(
853846
maven: maven,
854-
mavenOpts: "${testJdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}",
847+
mavenOpts: mavenOpts,
855848
mavenLocalRepo: ".m2/repository-jdk-$jdk",
856849
jdk: "jdk-$testJdk"
857850
) {
@@ -876,7 +869,7 @@ or any build that adds or removes build artifacts."""
876869
steps {
877870
// Steps moved to separate function to avoid "Method too large"
878871
// See https://stackoverflow.com/a/47631522
879-
deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon)
872+
deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon)
880873
}
881874
}
882875
stage('SonarQube analysis') {
@@ -892,7 +885,7 @@ or any build that adds or removes build artifacts."""
892885
steps {
893886
// Steps moved to separate function to avoid "Method too large"
894887
// See https://stackoverflow.com/a/47631522
895-
sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon)
888+
sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon)
896889
}
897890
}
898891
stage('Quality Gate') {
@@ -939,7 +932,7 @@ or any build that adds or removes build artifacts."""
939932

940933
// Steps moved to separate function to avoid "Method too large"
941934
// See https://stackoverflow.com/a/47631522
942-
void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon) {
935+
void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon) {
943936
// Make sure working tree not modified by build or test
944937
sh checkTreeUnmodifiedScriptBuild(niceCmd)
945938
dir(projectDir) {
@@ -960,7 +953,7 @@ void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk1
960953
sh moveSurefireReportsScript()
961954
withMaven(
962955
maven: maven,
963-
mavenOpts: "${deployJdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}",
956+
mavenOpts: mavenOpts,
964957
mavenLocalRepo: ".m2/repository-jdk-$deployJdk",
965958
jdk: "jdk-$deployJdk"
966959
) {
@@ -975,13 +968,13 @@ void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk1
975968

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

book/Jenkinsfile

+9-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env groovy
22
/*
33
* ao-encoding - High performance streaming character encoding.
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
) {

devel/Jenkinsfile

+9-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env groovy
22
/*
33
* ao-encoding - High performance streaming character encoding.
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
@@ -115,9 +115,6 @@ def upstreamProjects = [
115115
* mavenOpts The Maven Java options. *
116116
* Defaults to '-Djansi.force' for colorful logs *
117117
* *
118-
* mavenOptsJdk16 The Maven Java options for JDK 16+. *
119-
* Defaults to exporting Java compiler for rewrite-maven-plugin. *
120-
* *
121118
* extraProfiles An array of additional profiles to pass to Maven. *
122119
* Defaults to [] *
123120
* *
@@ -443,10 +440,6 @@ if (!binding.hasVariable('maven')) {
443440
if (!binding.hasVariable('mavenOpts')) {
444441
binding.setVariable('mavenOpts', '-Djansi.force')
445442
}
446-
if (!binding.hasVariable('mavenOptsJdk16')) {
447-
// See https://docs.openrewrite.org/getting-started/getting-started#running-on-jdk-16-and-newer
448-
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')
449-
}
450443
if (!binding.hasVariable('extraProfiles')) {
451444
binding.setVariable('extraProfiles', [])
452445
}
@@ -794,7 +787,7 @@ or any build that adds or removes build artifacts."""
794787
dir(projectDir) {
795788
withMaven(
796789
maven: maven,
797-
mavenOpts: "${jdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}",
790+
mavenOpts: mavenOpts,
798791
mavenLocalRepo: ".m2/repository-jdk-$jdk",
799792
jdk: "jdk-$jdk"
800793
) {
@@ -849,7 +842,7 @@ or any build that adds or removes build artifacts."""
849842
dir(projectDir) {
850843
withMaven(
851844
maven: maven,
852-
mavenOpts: "${testJdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}",
845+
mavenOpts: mavenOpts,
853846
mavenLocalRepo: ".m2/repository-jdk-$jdk",
854847
jdk: "jdk-$testJdk"
855848
) {
@@ -874,7 +867,7 @@ or any build that adds or removes build artifacts."""
874867
steps {
875868
// Steps moved to separate function to avoid "Method too large"
876869
// See https://stackoverflow.com/a/47631522
877-
deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon)
870+
deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon)
878871
}
879872
}
880873
stage('SonarQube analysis') {
@@ -890,7 +883,7 @@ or any build that adds or removes build artifacts."""
890883
steps {
891884
// Steps moved to separate function to avoid "Method too large"
892885
// See https://stackoverflow.com/a/47631522
893-
sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon)
886+
sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon)
894887
}
895888
}
896889
stage('Quality Gate') {
@@ -937,7 +930,7 @@ or any build that adds or removes build artifacts."""
937930

938931
// Steps moved to separate function to avoid "Method too large"
939932
// See https://stackoverflow.com/a/47631522
940-
void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon) {
933+
void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mvnCommon) {
941934
// Make sure working tree not modified by build or test
942935
sh checkTreeUnmodifiedScriptBuild(niceCmd)
943936
dir(projectDir) {
@@ -958,7 +951,7 @@ void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk1
958951
sh moveSurefireReportsScript()
959952
withMaven(
960953
maven: maven,
961-
mavenOpts: "${deployJdk == '11' ? mavenOpts : "$mavenOpts $mavenOptsJdk16"}",
954+
mavenOpts: mavenOpts,
962955
mavenLocalRepo: ".m2/repository-jdk-$deployJdk",
963956
jdk: "jdk-$deployJdk"
964957
) {
@@ -973,13 +966,13 @@ void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk1
973966

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

0 commit comments

Comments
 (0)