I found my self with the "blocked mirror" error when building the maven project, we have a repository that works only on the local network so it does not have https, just a simple server (JFrog artificatory).
I can deploy to it, but I can't download the dependency in any other machine cause it always block the mirror.
Looking into it, one should be able to unblock the http with the mirror settings, either in the .m2 settings file or in the prject /.mvn/local-settings.xml
But I simply can't make it work. Either of them just keep spiting "blocked mirror"...
Blocked mirror for repositories: [repo1 (http://192.168.90.87:8082/artifactory/repo1, default, releases+snapshots)] -> [Help 1]
project folder
project
| -- .mvn
| -- local-settings.xml
| -- maven.config
...
| -- pom.xml
maven.config
--settings ./.mvn/local-settings.xml
local-settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>repo1-mirror/id>
<mirrorOf>repo1</mirrorOf>
<url>http://192.168.90.87:8082/artifactory/repo1</url>
<blocked>false</blocked>
</mirror>
</mirrors>
</settings>
the url and repository id are ok cause I can deploy to it. If I move the local-settings content to the settings.xml in the {user}.m2/repository it changes nothing.
<distributionManagement>
<repository>
<id>repo1</id>
<name>repo1 deve test</name>
<url>http://192.168.90.87:8082/artifactory/repo1/</url>
</repository>
</distributionManagement>
I'm running maven from the windows prompt with this line:
call R:\maven\bin\mvn --f R:\WorkSpace\App\project\pom.xml clean package
I have tried with -f and the folder but than the maven.config never find the local-settings
call R:\maven\bin\mvn -f R:\WorkSpace\App\project clean package
I'm using a fresh maven version that I have just downloaded from: apache-maven-3.8.1-bin
References: Unblock maven mirror