Skip to content

Instantly share code, notes, and snippets.

@vegaasen
Last active April 29, 2024 01:40
Show Gist options
  • Save vegaasen/1d545aafeda867fcb48ae3f6cd8fd7c7 to your computer and use it in GitHub Desktop.
Save vegaasen/1d545aafeda867fcb48ae3f6cd8fd7c7 to your computer and use it in GitHub Desktop.
Maven 3.8.1 blocked mirror for internal repositories

Maven 3.8.1 blocked mirrors "fix"

This is not a fix, but a workaround for repositories not on HTTPS yet. Use with caution.

Error

[ERROR] (...) Could not transfer artifact no.whatever:whatever-client:pom:3.1 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [releases (http://unportected.com/nexus/content/repositories/releases, defaul)] -> [Help 1]

"Fix"

Put this section in your ~/.m2/settings.xml-file, and rerun mvn with -U option. U're done ✅.

<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd">
  ...
    <mirrors>
        <mirror>
            <id>maven-default-http-blocker</id>
            <mirrorOf>external:dont-match-anything-mate:*</mirrorOf>
            <name>Pseudo repository to mirror external repositories initially using HTTP.</name>
            <url>http://0.0.0.0/</url>
            <blocked>false</blocked>
        </mirror>
    </mirrors>
  ...
</settings>
@Disha644
Copy link

I was stuck with dependencies b/w repos for almost 2 days. This works. Thanks.

@mahuijohn
Copy link

3.8.1 works

@alokpaul
Copy link

alokpaul commented Jul 8, 2022

Perfect. this worked

@ceszkraft
Copy link

org.projectlombok:lombok:pom:unknown failed to transfer from http://0.0.0.0/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of maven-default-http-blocker has elapsed or updates are forced.
Since Maven 3.8.1 http repositories are blocked.
Using intelliJ

@feiyahan
Copy link

feiyahan commented Aug 9, 2022

Perfect!
Maven Version:3.8.1

@MartinGalnaresCA
Copy link

It worked like a charm! Version 3.8.6 on mac

@DeepakDani7
Copy link

Really Helpful, Thanks

@xuhaiL
Copy link

xuhaiL commented Oct 20, 2022

good

@jwdsy
Copy link

jwdsy commented Jan 11, 2023

☆⌒(*^-゜)v THX!!

@youfanx
Copy link

youfanx commented Jan 17, 2023

thx

@ConnorChen97
Copy link

thx, v3.9.0 workds

@chanjarster
Copy link

great!!!

@shubhamsharma24
Copy link

thanks, worked like a charm

@yuyol
Copy link

yuyol commented Apr 18, 2023

Thanks!!! It works for me

@babagay
Copy link

babagay commented Jul 4, 2023

Работает

@raylax
Copy link

raylax commented Dec 26, 2023

thx, 3.9.2

@JhonwillBao
Copy link

it worked,thx a lot

@Marlon0714
Copy link

It worked!, Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment