File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -203,6 +203,20 @@ test "$FETCH_HEAD" = HEAD ||
203203test " $FETCH_HEAD " = " $( git merge-base $FETCH_HEAD $HEAD ) " ||
204204 die " '$defaultBranch ' is not up-to-date"
205205
206+ # Ensure that schema location URL uses HTTPS, not HTTP.
207+ if grep -q http://maven.apache.org/xsd/maven-4.0.0.xsd pom.xml > /dev/null 2> /dev/null
208+ then
209+ echo " ====================================================================="
210+ echo " NOTE: Your POM's schema location uses HTTP, not HTTPS. Fixing it now."
211+ echo " ====================================================================="
212+ sed ' s;http://maven.apache.org/xsd/maven-4.0.0.xsd;https://maven.apache.org/xsd/maven-4.0.0.xsd;' pom.xml > pom.new &&
213+ mv -f pom.new pom.xml &&
214+ git commit pom.xml \
215+ -m ' POM: use HTTPS for schema location URL' \
216+ -m ' Maven no longer supports plain HTTP for the schema location.' \
217+ -m ' And using HTTP now generates errors in Eclipse (and probably other IDEs).'
218+ fi
219+
206220# Ensure license headers are up-to-date.
207221test " $SKIP_LICENSE_UPDATE " -o -z " $licenseName " -o " $licenseName " = " N/A" || {
208222 mvn license:update-project-license license:update-file-header &&
You can’t perform that action at this time.
0 commit comments