@@ -132,6 +132,8 @@ function personality_modules
132132 local repostatus=$1
133133 local testtype=$2
134134 local extra=" "
135+ local branch1jdk8=()
136+ local jdk8module=" "
135137 local MODULES=(" ${CHANGED_MODULES[@]} " )
136138
137139 yetus_info " Personality: ${repostatus} ${testtype} "
@@ -170,6 +172,21 @@ function personality_modules
170172 return
171173 fi
172174
175+ # This list should include any modules that require jdk8. Maven should be configured to only
176+ # include them when a proper JDK is in use, but that doesn' work if we specifically ask for the
177+ # module to build as yetus does if something changes in the module. Rather than try to
178+ # figure out what jdk is in use so we can duplicate the module activation logic, just
179+ # build at the top level if anything changes in one of these modules and let maven sort it out.
180+ branch1jdk8=(hbase-error-prone hbase-tinylfu-blockcache)
181+ if [[ " ${PATCH_BRANCH} " = branch-1* ]]; then
182+ for jdk8module in " ${branch1jdk8[@]} " ; do
183+ if [[ " ${MODULES[*]} " =~ ${jdk8module} ]]; then
184+ MODULES=(.)
185+ break
186+ fi
187+ done
188+ fi
189+
173190 if [[ ${testtype} == findbugs ]]; then
174191 # Run findbugs on each module individually to diff pre-patch and post-patch results and
175192 # report new warnings for changed modules only.
@@ -190,7 +207,8 @@ function personality_modules
190207 return
191208 fi
192209
193- if [[ ${testtype} == compile ]] && [[ " ${SKIP_ERRORPRONE} " != " true" ]]; then
210+ if [[ ${testtype} == compile ]] && [[ " ${SKIP_ERRORPRONE} " != " true" ]] &&
211+ [[ " ${PATCH_BRANCH} " != branch-1* ]] ; then
194212 extra=" ${extra} -PerrorProne"
195213 fi
196214
0 commit comments