The below MAven build failure occurs when building a Mule application:
[ERROR] Failed to execute goal on project test: Could not resolve dependencies for project xxx: Failed to collect dependencies at my.test:dependency:version -> my.test.transitive:transitive:version: Failed to read artifact descriptor for my.test.transitive:transitive:jar:version: Could not transfer artifact my.test.transitive:transitive:pom:version from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [blocked-repository-id (http://blocked.repository.org, default, releases+snapshots)]
The latest versions of Apache Maven (3.8.1+) are blocking non HTTPS connections. So if an application pom.xml refers to a repository using HTTP instead of HTTPS it can get blocked with the error as seen above and the build will fail.
According to Maven documentation in HTTP Repository Blocked one can take one of the following options:
<settings> ... <repositories> ... <repository> <id>mulesoft-release</id> <name>muleSoft release repository</name> <url>http://repository.mulesoft.org/releases/</url> ==> replace with HTTPS URL https://repository.mulesoft.org/releases/ <layout>default</layout> </repository> ... </repositories> ... </settings>
<settings> ... <mirrors> ... <mirror> <id>https-mirror</id> <name>HTTPS Mirror Repository for Mule</name> <url>https://repository.mulesoft.org/releases/</url> <mirrorOf>mulesoft-release</mirrorOf> </mirror> ... </mirrors> ... </settings>
<settings> ... <mirrors> ... <mirror> <id>my-repository-http-unblocker1</id> <mirrorOf>mulesoft-release</mirrorOf> <name></name> <url>http://repository.mulesoft.org/releases/</url> <blocked>false</blocked> </mirror> ... </mirrors> ... </settings>The <blocked>false</blocked> property will allow this HTTP repository to be used as an exception.
Apache Maven documentation for How to fix when I get a HTTP repository blocked?
001121394

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.