Blocked mirror for repositories in @QuarkusTest

491 views
Skip to first unread message

Den

unread,
Dec 24, 2021, 4:25:08 AM12/24/21
to Quarkus Development mailing list
Hi,
I've configured maven wrapper to unblock http repositories and I can build and run the application. However, @QuarkusTest tries to download dependencies on its own and fails to do so with 'Blocked mirror for repositories'.

Is there any workaround or setting for tests to honor settings from .mvn directory?

Quarkus 2.6.0, maven 3.8.4, java 17

Thanks and Merry Christmas to everyone!

Den

unread,
Dec 24, 2021, 5:40:09 AM12/24/21
to Quarkus Development mailing list
solved. This worked for me:
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <environmentVariables>
                        <MAVEN_CMD_LINE_ARGS>--settings .mvn/local-settings.xml</MAVEN_CMD_LINE_ARGS>

Guillaume Smet

unread,
Dec 24, 2021, 7:31:13 AM12/24/21
to denni...@gmail.com, Quarkus Development mailing list
Hi,

Could you provide more details about your setup (and what you're trying to define in your settings.xml)? I don't think this is normal behavior.

Thanks.

--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/ac0fd9a3-f27e-41a8-ba38-11ef13abd519n%40googlegroups.com.

Den

unread,
Dec 24, 2021, 8:05:24 AM12/24/21
to Quarkus Development mailing list
I have to unblock some http-only repository and I want to do it in the project .mvn and not in ~/.m2/settings.xml
cat .mvn/maven.config

--settings .mvn/local-settings.xml


cat .mvn/local-settings.xml

<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>dummy</mirrorOf>
        <name>unblblocks http</name>
        <url>http://0.0.0.0/</url>
    </mirror>
</mirrors>

Max Rydahl Andersen

unread,
Dec 25, 2021, 4:35:47 AM12/25/21
to Den, Quarkus Development mailing list

I assume this only happens when you run from the IDE not when running via mvn
or is it happening all the time ?

In any case it is a bug/missing feature - can you open an issue with as many details you can to reproduce it?
/max


Alexey Loubyansky

unread,
Dec 25, 2021, 5:15:40 AM12/25/21
to denni...@gmail.com, Quarkus Development mailing list
This is not a recommended way of passing the settings. It may ignore other options you pass. Something like 

--

Den

unread,
Dec 27, 2021, 3:16:45 AM12/27/21
to Quarkus Development mailing list
Hi Alexey,

yes, this one works as well:
                <configuration>
                    <systemPropertyVariables>
                        <maven.settings>.mvn/local-settings.xml</maven.settings>

Thanks!
Reply all
Reply to author
Forward
0 new messages