I’m getting an error trying to build the Map Matching recent core branch. The master branches builds OK but I’m trying to build a version with the recent update to fix the bike routing issue on bridleways.
I’m running the following build command:
mvn package -DskipTests clean install
and I’m getting the following error:
[ERROR] Failed to execute goal on project graphhopper-map-matching-core: Could n
ot resolve dependencies for project com.graphhopper:graphhopper-map-matching-cor
e:jar:2.0-SNAPSHOT: Failed to collect dependencies at com.graphhopper:graphhoppe
r-reader-osm:jar:4da82d9226e1ff9c5525fa3936204c7effc2fc8a: Failed to read artifa
ct descriptor for com.graphhopper:graphhopper-reader-osm:jar:4da82d9226e1ff9c552
5fa3936204c7effc2fc8a: Could not transfer artifact com.graphhopper:graphhopper-r
eader-osm:pom:4da82d9226e1ff9c5525fa3936204c7effc2fc8a from/to github (https://m aven.pkg.github.com/graphhopper/graphhopper): Authentication failed for https:// maven.pkg.github.com/graphhopper/graphhopper/com/graphhopper/graphhopper-reader-
osm/4da82d9226e1ff9c5525fa3936204c7effc2fc8a/graphhopper-reader-osm-4da82d9226e1
ff9c5525fa3936204c7effc2fc8a.pom 401 Unauthorized -> [Help 1]
Thanks, I’ve spent several hours trying to figure out how to add the GitHub credentials but it’s still not working so maybe I’ve not done it correctly!
Thanks for sharing that. I’ve replaced my settings.xml with your one putting in my GitHub username and password but the build still fails. I don’t get the 401 Unauthorized error now but instead get a Bad Request error:
[ERROR] Failed to execute goal on project graphhopper-map-matching-core: Could n
ot resolve dependencies for project com.graphhopper:graphhopper-map-matching-cor
e:jar:2.0-SNAPSHOT: Failed to collect dependencies at com.graphhopper:graphhoppe
r-reader-osm:jar:4da82d9226e1ff9c5525fa3936204c7effc2fc8a: Failed to read artifa
ct descriptor for com.graphhopper:graphhopper-reader-osm:jar:4da82d9226e1ff9c552
5fa3936204c7effc2fc8a: Could not transfer artifact com.graphhopper:graphhopper-r
eader-osm:pom:4da82d9226e1ff9c5525fa3936204c7effc2fc8a from/to github (https://m aven.pkg.github.com/graphhopper/graphhopper): Transfer failed for https://maven. pkg.github.com/graphhopper/graphhopper/com/graphhopper/graphhopper-reader-osm/4d
a82d9226e1ff9c5525fa3936204c7effc2fc8a/graphhopper-reader-osm-4da82d9226e1ff9c55
25fa3936204c7effc2fc8a.pom 400 Bad Request -> [Help 1]
Success! I tried accessing the .pom file in the browser as suggested. It asked for my login details which I entered, then I got the following message:
Unable to download maven package : "graphql call failed: Your token has not been granted the required scopes to execute this query. The ‘id’ field requires one of the following scopes: [‘read:packages’], but your token has only been granted the: [’’] scopes. Please modify your token’s scopes at: https://github.com/settings/tokens."
So, I went to the tokens link provided and set up a Personal Access Token with read packages permissions. I then replaced my password with the Personal Access Token in the settings.xml file and ran the build command again. This time it worked! Thanks for your help. Hopefully my experience will be useful to others.
Generated my gitHub token with permissions to write/read packages and some other scopes.
Apply that token to Intellij
Still have got problem when try to download dependencies for last map-matching tool from last commit be5a176ec78ee7cca6730f93e4ea57ced65eb788.
I’ve got problem during building: Cannot resolve com.graphhopper:graphhopper-reader-osm:1f5419977ed205d48d5507b65fae231592e52c5b
But in pom.xml I can see that the same problem I’ve got at least with graphhopper-web-bundle
and graphhopper-web-api
Am I doing it right?
Fork graphhopper/map-matching to my local giHub account
Use https cloning in my Intellij to get repo locally.
Still have the same problem with resolving artifacts.