Apache Maven 3.8.1, released on April 4, 2021, blocks external HTTP repositories by default. The build-tool upgrade can stop dependency downloads that previously worked, without an application-code change. First locate the rejected address: it may be in the project's own configuration or a dependency's project file. Apache warns that affected builds may fail and calls for checking the repositories before upgrading. [D9][S3]
Looking only at the application's pom.xml may miss the address. Maven's project object model, or POM, can declare repositories, and the release notes show that a rejected repository can come from a dependency’s POM. Maven Central contains published POMs pointing to custom repositories over HTTP. Apache says those uploaded POMs are immutable, leaving older dependency metadata in circulation. The block addresses the risk of an attacker intercepting downloads over those insecure connections; it is not a claim that a particular dependency has been compromised. [S3]
An error naming maven-default-http-blocker and http://0.0.0.0/ points to a deliberate block, not a download server to repair. Maven 3.8.1's distributed settings.xml defines that entry as a pseudo-repository, matches it against external:http:* and sets blocked to true. The release notes' example error separately lists the rejected repository's ID and original HTTP URL after “Blocked mirror for repositories.” That original address is the useful starting point for the investigation. [S3][S5]
Here, external does not mean outside the company network. The mirror selector in Maven Resolver 1.6.2, used by Maven 3.8.1, treats localhost and 127.0.0.1 as local. Its HTTP check has no exemption for other private-network addresses. A repository on an intranet server can therefore match the default blocker even though it is not on the public internet. Existing mirror configuration still matters; this is the scope of the default selector, not a claim that every customized Maven installation uses the same route. [S3][S7][S8]
Apache separates the repairs by ownership. If the repository is declared in the project's own pom.xml, fix that source configuration. If it comes from a dependency's POM, the release notes offer two routes: upgrade to a dependency version that replaces the obsolete HTTP URL with HTTPS, or keep the dependency version and define a mirror in settings. The second option changes repository routing rather than the dependency version. Before making that switch, verify that the replacement endpoint serves the needed artifacts; changing http to https alone does not establish that it works. [S3][S5]
For a targeted mirror, settings.xml uses mirrorOf to identify the original repository that the new endpoint should replace. Check which settings file the failing build actually reads before copying a laptop fix into automated builds. Maven's supplied configuration distinguishes user settings, normally at ${user.home}/.m2/settings.xml, from global settings for the Maven installation. The command-line options -s and -gs can override those locations. [S5]
Source documents
- Apache Maven 3.8.1 release notes, historical sourcehttps://raw.githubusercontent.com/apache/maven-site/69e11f82299eb4065d399b437b41bcccf8f6a548/content/markdown/docs/3.8.1/release-notes.md
- Maven 3.8.1 distributed settings.xmlhttps://raw.githubusercontent.com/apache/maven/05c21c65bdfed0f71a2f2ada8b84da59348c4c5d/apache-maven/src/conf/settings.xml
- Apache Maven release history, April 5 source revisionhttps://raw.githubusercontent.com/apache/maven-site/ac30e130edb524b37e15dc26d9ddd22149b527a3/content/markdown/docs/history.md.vm
- Maven 3.8.1 repository session factoryhttps://raw.githubusercontent.com/apache/maven/05c21c65bdfed0f71a2f2ada8b84da59348c4c5d/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
- Maven Resolver 1.6.2 mirror selectorhttps://raw.githubusercontent.com/apache/maven-resolver/11db4e360088407e6a387652b8d65d8035f87a22/maven-resolver-util/src/main/java/org/eclipse/aether/util/repository/DefaultMirrorSelector.java
