I tried to run the shell script following the directions mentioned in the README file.
But I am encountering the following error:
I am using Mac OS X 10.11, JDK 1.8 and Maven 3.3.9.
I am pretty new to Maven so I am having trouble in resolving dependency issues.
Surajs-MacBook-Pro:map-matching-master suraj$ ./map-matching.sh action=import datasource=./map-data/WashingtonDC.osm.pbf vehicle=bike
using /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/bin/java
ls: matching-core/target/graphhopper-map-matching--dependencies.jar: No such file or directory
[INFO] Scanning for projects…
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building hmm-lib 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] — maven-resources-plugin:2.6:resources (default-resources) @ hmm-lib —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/suraj/Downloads/map-matching-master/hmm-lib/src/main/resources
[INFO]
[INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ hmm-lib —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ hmm-lib —
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/suraj/Downloads/map-matching-master/hmm-lib/src/test/resources
[INFO]
[INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ hmm-lib —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-surefire-plugin:2.19.1:test (default-test) @ hmm-lib —
[INFO] Tests are skipped.
[INFO]
[INFO] — maven-jar-plugin:2.6:jar (default-jar) @ hmm-lib —
[INFO]
[INFO] — maven-failsafe-plugin:2.19.1:integration-test (default) @ hmm-lib —
[INFO] Tests are skipped.
[INFO]
[INFO] — maven-failsafe-plugin:2.19.1:verify (default) @ hmm-lib —
[INFO] Tests are skipped.
[INFO]
[INFO] — maven-install-plugin:2.4:install (default-install) @ hmm-lib —
[INFO] Installing /Users/suraj/Downloads/map-matching-master/hmm-lib/target/hmm-lib-1.0.0-SNAPSHOT.jar to /Users/suraj/.m2/repository/com/graphhopper/external/hmm-lib/1.0.0-SNAPSHOT/hmm-lib-1.0.0-SNAPSHOT.jar
[INFO] Installing /Users/suraj/Downloads/map-matching-master/hmm-lib/pom.xml to /Users/suraj/.m2/repository/com/graphhopper/external/hmm-lib/1.0.0-SNAPSHOT/hmm-lib-1.0.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.563 s
[INFO] Finished at: 2016-10-18T23:47:50-04:00
[INFO] Final Memory: 12M/155M
[INFO] ------------------------------------------------------------------------
[INFO] Scanning for projects…
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GraphHopper Map Matching 0.9-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.graphhopper:graphhopper-reader-osm:jar:0.9-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.404 s
[INFO] Finished at: 2016-10-18T23:47:51-04:00
[INFO] Final Memory: 6M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project graphhopper-map-matching-core: Could not resolve dependencies for project com.graphhopper:graphhopper-map-matching-core:jar:0.9-SNAPSHOT: Failed to collect dependencies at com.graphhopper.external:hmm-lib:jar:1.0.0-SNAPSHOT: Failed to read artifact descriptor for com.graphhopper.external:hmm-lib:jar:1.0.0-SNAPSHOT: Could not find artifact com.graphhopper:graphhopper-map-matching-parent:pom:0.9-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
ls: matching-core/target/graphhopper-map-matching--dependencies.jar: No such file or directory
Error: Unable to access jarfile action=import
I tried checking out branch 0.8 but the error that I encountered now is as follows:
[WARNING] The POM for com.graphhopper:graphhopper-reader-osm:jar:0.8.2 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] GraphHopper Map Matching Parent Project … SUCCESS [ 0.555 s]
[INFO] hmm-lib … SUCCESS [ 0.829 s]
[INFO] GraphHopper Map Matching … FAILURE [ 0.071 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.604 s
[INFO] Finished at: 2016-10-19T15:13:44-04:00
[INFO] Final Memory: 12M/226M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project graphhopper-map-matching-core: Could not resolve dependencies for project com.graphhopper:graphhopper-map-matching-core:jar:0.8.2: Failure to find com.graphhopper:graphhopper-reader-osm:jar:0.8.2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
I tried using 0.7 version and it worked.
But the 0.8 version and master are no longer working.
I faced a similar issue in building the map-matching core module as graphhopper-reader-osm and graphhopper-web libraries were missing. I fixed by building those libraries from graphhopper git and copied them in maven like locations. However, this trick works for, me but I’m sure this is not the ideal way to go. Am I missing something?
There shouldn’t be such issues. Not with the latest master nor with 0.8. But as we soon plan to merge both projects (where you then also build GH core) I won’t investigate this further here.
Sure. System config: Ubuntu 16.04, JDK 1.8.0_111. The error was due to missing jar files for graphhopper-reader-osm and graphhopper-web. I compiled these two jar files from the graphhopper project and copied to the location where maven stores the cached binaries.
Thanks Karussell. Would look forward to use the merged one.
Just another comment here: I have the same problem with the master branch.
[ERROR] Failed to execute goal on project graphhopper-map-matching-core: Could not resolve dependencies for project com.graphhopper:graphhopper-map-matching-core:jar:0.9-SNAPSHOT: Could not find artifact com.graphhopper:graphhopper-reader-osm:jar:0.9-SNAPSHOT → [Help 1]
but since the graphhopper project master seems to be at 0.8.2 (i.e. a graphhopper build just produced a graphhopper-reader-osm-0.8.2.jar in my .m2 cache) I really don’t know where com.graphhopper:graphhopper-reader-osm:jar:0.9-SNAPSHOT should be coming from?
I can wait for the merge of the 2 projects, though, no big deal.
I just had the same error today, from the master (Ubuntu 16.04, maven 3.3.9, jdk 1.8.0_131) :
[ERROR] Failed to execute goal on project graphhopper-map-matching-core: Could not resolve dependencies for project com.graphhopper:graphhopper-map-matching-core:jar:0.9-SNAPSHOT: Could not find artifact com.graphhopper:graphhopper-reader-osm:jar:0.9-SNAPSHOT -> [Help 1]
I’m a complete noob in maven, so I’m not sure (I tested different things), but apparently I managed to get it work like this:
As I don’t know the proper way of doing it, I just added the following lines in the matching-core/pom.xml (for exemple under “<name>GraphHopper Map Matching</name>”):
@robin-loche this is indeed required if you did not switch to a stable branch like 0.8 or 0.9. When you switch to those branches it should not be necessary and you are on a safer side regarding bugs.
Ok thanks, I confirm, a little “git checkout 0.8” (I don’t see any 0.9 branch) and everything is ok. I just wanted to test the very last version
Oh and thank you for your work!