2121 workflow_call :
2222 inputs :
2323 maven_args :
24- description : The arguments to pass to Maven when building the code
24+ description : ' The arguments to pass to Maven when building the code'
2525 required : false
26- default : --batch-mode --errors --show-version verify javadoc:javadoc
26+ default : ' --batch-mode --errors --show-version verify javadoc:javadoc'
27+ type : string
28+
29+ maven-version :
30+ description : ' The Maven version used during build job'
31+ required : false
32+ default : ' 3.9.6'
2733 type : string
2834
2935 os-matrix :
5157 type : string
5258
5359 jdk-distribution-matrix :
54- description : " jdk distribution matrix"
60+ description : ' jdk distribution matrix'
5561 required : false
5662 default : ' [ "temurin" ]'
5763 type : string
5864
5965 jdk-fast-fail-build :
60- description : " jdk fast fail build"
66+ description : ' jdk fast fail build'
6167 required : false
6268 default : ' 17'
6369 type : string
6470
6571 jdk-distribution-fast-fail-build :
66- description : " jdk distribution fast fail build"
72+ description : ' jdk distribution fast fail build'
6773 required : false
6874 default : ' temurin'
6975 type : string
8490 distribution : ${{ inputs.jdk-distribution-fast-fail-build }}
8591 cache : ' maven'
8692
93+ - name : Set up Maven
94+ run : mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.2.0:wrapper "-Dtype=only-script" "-Dmaven=${{ inputs.maven-version }}"
95+
8796 - name : Build with Maven
88- run : mvn ${{ inputs.maven_args }}
97+ run : ./mvnw ${{ inputs.maven_args }}
8998
9099 build-experimental :
91100 name : Experimental Java 21 build
@@ -96,18 +105,21 @@ jobs:
96105 fail-fast : false
97106 continue-on-error : true
98107 steps :
99- - name : Checkout
100- uses : actions/checkout@v4
108+ - name : Checkout
109+ uses : actions/checkout@v4
101110
102- - name : Set up JDK
103- uses : actions/setup-java@v4
104- with :
105- java-version : ' 21'
106- distribution : ' corretto'
107- cache : ' maven'
111+ - name : Set up JDK
112+ uses : actions/setup-java@v4
113+ with :
114+ java-version : ' 21'
115+ distribution : ' corretto'
116+ cache : ' maven'
108117
109- - name : Build with Maven
110- run : mvn ${{ inputs.maven_args }}
118+ - name : Set up Maven
119+ run : mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.2.0:wrapper "-Dtype=only-script" "-Dmaven=${{ inputs.maven-version }}"
120+
121+ - name : Build with Maven
122+ run : ./mvnw ${{ inputs.maven_args }}
111123
112124 verify :
113125 needs : build
@@ -134,6 +146,9 @@ jobs:
134146 distribution : ${{ matrix.distribution }}
135147 cache : ' maven'
136148
149+ - name : Set up Maven
150+ run : mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.2.0:wrapper "-Dtype=only-script" "-Dmaven=${{ inputs.maven-version }}"
151+
137152 - name : Build with Maven
138- run : mvn ${{ inputs.maven_args }}
153+ run : ./mvnw ${{ inputs.maven_args }}
139154
0 commit comments