Howto build Grapphopper from sourcecode

Hi all,

I want build Grapphopper from sourcecode, i was not found documents, plz help me.

Hi, just look at README.md and you find something interesting. Good luck!

It looks like the documentation explains how to start the GH server and how to setup a development environment using IntelliJ, but maybe there should still be a section about how to build from source if this is all one wants to do. Its as simple as this:

git clone git://github.com/graphhopper/graphhopper.git
cd graphhopper
mvn package -DskipTests

This requires git, mvn and jdk 8+ installed on your system and will produce an all-in-one jar in web/target/graphhopper-web-*.jar

See also the documentation where this is done using the graphhopper script:

./graphhopper.sh -a web -i europe_germany_berlin.pbf

graphhopper.sh might be useful for users not familiar with Java development, but for those who know maven it might be more clear to point to the actual build commands? Or maybe we should at least mention the build command of graphhopper.sh in case one wants to build the jar rather start the server as well?

Those who already know maven probably know the mvn install command too … but yes, probably would not hurt :slight_smile:

If you ask me we might as well remove this script. I think it does more harm than good :slight_smile:

I mean sure it can be used to start the server or run the build, but I fear for most people (including me) it will be a black box that they cannot learn much from and if something goes wrong it will be hard to find out what the problem is. Documenting what the real steps are to achieve the same tasks seems more useful to me and it will be easier to maintain as well :wink: There is already lots of outdated stuff in this script.

Ok.

It was meant as a simple “get started” tool, that I (and probably others) often used but indeed at least personally I do not use it that often anymore and instead either download the jar + config or tweak my run scripts in IntelliJ for real coding.

With the current 3-step installation this can be done already without the script and for development you will have to either download IntelliJ or maven :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.