mapbox / mapbox-java

The Mapbox Java SDK – Java wrappers around Mapbox APIs and other location data
https://docs.mapbox.com/android/java/overview/
MIT License
415 stars 121 forks source link

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

Open MaKoSanchez opened 6 months ago

MaKoSanchez commented 6 months ago

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

`

mapbox Mapbox repo https://api.mapbox.com/downloads/v2/releases/maven ` and finally POM.xml: ` com.mapbox.mapboxsdk mapbox-sdk-services 6.15.0 ` 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
sunny0092 commented 1 month ago

I also had the same problem

shellta commented 1 month ago

see #1494 @sunny0092