Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Received status code 401 from server: Unauthorized using Maven #1576

Open
MaKoSanchez opened this issue Feb 9, 2024 · 0 comments
Open

Received status code 401 from server: Unauthorized using Maven #1576

MaKoSanchez opened this issue Feb 9, 2024 · 0 comments

Comments

@MaKoSanchez
Copy link

MaKoSanchez commented Feb 9, 2024

Hi there,
I'm trying to build a project using mapbox sdk in JavaFX. If I try to build I'm getting the following error:

[ERROR] Failed to execute goal on project interfaces: Could not resolve dependencies for project testProject:interfaces:bundle:1.0.0-SNAPSHOT: Failed to collect dependencies at com.mapbox.mapboxsdk:mapbox-sdk-services:jar:6.15.0: Failed to read artifact descriptor for com.mapbox.mapboxsdk:mapbox-sdk-services:jar:6.15.0: Could not transfer artifact com.mapbox.mapboxsdk:mapbox-sdk-services:pom:6.15.0 from/to mapbox (https://api.mapbox.com/downloads/v2/releases/maven): authentication failed for https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/mapboxsdk/mapbox-sdk-services/6.15.0/mapbox-sdk-services-6.15.0.pom, status: 401 Unauthorized

My settings.xml:
`

    <server>
        <id>mapbox</id>
        <username>mapbox</username>
		<password>Token with Downloads:READ property</password>
    </server>
</servers>`

and

<repository> <id>mapbox</id> <name>Mapbox repo</name> <url>https://api.mapbox.com/downloads/v2/releases/maven</url> </repository>

and finally POM.xml:
<dependency> <groupId>com.mapbox.mapboxsdk</groupId> <artifactId>mapbox-sdk-services</artifactId> <version>6.15.0</version> </dependency>

I also tried to use the following adress and succeeded to read the POM
https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/mapboxsdk/mapbox-sdk-services/6.15.0/mapbox-sdk-services-6.15.0.pom?access_token=MYTOKEN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant