[GraphHopper] Looking for an engine for horse (and hiking) routing
Peter K
peathal at yahoo.de
Mon May 27 08:48:59 UTC 2013
Hi Nop,
>>> I extended the oneWay test, but it's true for all of them. The test
>>> manually takes apart the Graph and that much harder to understand for
>>> me than the parsing code.
>>
>> What do you mean with 'takes apart'?
>
> It checks nodes and parses through the graph to basically test for the
> presence of ways and flags. That's rather hard to analyze.
Still don't understand what you mean ... do you have an example or even
better a pull request to improve this :) ?
>>> Due to the Maven setup I could run the tests, but not enter them with
>>> the debugger to have a closer look at what the data means.
>>
>> What is so difficult with a maven setup? In NetBeans
>> running/debugging/profiling or even compile on save works out of the
>> box, just open the project!
>> and eclipse with some maven plugin should also be easy, but I don't know
>> eclipse enough to recommend a setup.
>
> Its a black box to me. IntelliJ's maven plugin has recognized the
> configuration and i can run lifecycle jobs to build stuff and run the
> tests.
>
> I built a runtime configuration in the IDE with parameters taken from
> graphhopper.sh so I can run graphhopper with the debugger in the IDE.
>
> But I have no idea what maven does to run the tests or how to
> intercept that and run it directly in the debugger.
Hmmh, sorry to here this complication. In NetBeans all is the same be it
an ant, gradle or maven project ...
> If found something that looks like it a jetty:run build target in the
> web project, but if I try and run that, I get [WARNING] The POM for
> com.graphhopper:graphhopper:jar:0.1-20130525.080839-10 is missing, no
> dependency information available
Hmmh, you'll need to build the parent project before (but if not it
should download it from our maven repo). See also below in the email.
> That was the first thing I tried, even before he mentioned it. Just
> gives some error messages:
> ./graphhopper.sh: Zeile 2: $'\r': Kommando nicht gefunden.
> ./graphhopper.sh: Zeile 50: Syntaxfehler beim unerwarteten Wort `$'{\r''
> '/graphhopper.sh: Zeile 50: `function ensureMaven {
Could you try to do
bash graphhopper.sh import <your_osm_file>
?
>> you can also try 'mvn jetty:run', no need to download jetty. if
>> everything fails you'll need to create a war file and deploy this to
>> tomcat or jetty, but this procedure is extremly slow.
>> And for the ease of development you should really make sure that you can
>> start the web service (and the import + miniUI) right from within your
>> IDE, to make debugging etc easier.
>
> Of course, I would love that. Import and mini UI work just fine -
> thats just starting a Java application from a classpath.
> But I have no idea how to get at the stuff thats wrapped in command
> line maven.
Hmmh, ok. That is indeed probably very IDE dependent.
In NetBeans I've created a custom nbaction entry which you can call by
right-clicking the web project -> Custom -> jetty:run debug
The maven opts for that are somehow cryptic: -Xdebug
-Xrunjdwp:transport=dt_socket,server=y,address=8000
( nbactions.xml -> <Env.MAVEN_OPTS>-Xms1500m -Xms1500m -XX:PermSize=50m
-XX:MaxPermSize=50m -Xdebug
-Xrunjdwp:transport=dt_socket,server=y,address=8000</Env.MAVEN_OPTS> )
Or this looks like a good and relative recent description:
https://gist.github.com/naaman/1053217 where you can also use jettys
nice save+compile feature ...
Also try to search for 'intellij maven debug [jetty]'. I got some hits.
If all this fails to work for you, I'll try to ping my colleague using
intellij with jetty. Finally if you got this working you should
definitely add an intelliJ section to the wiki!
Regards,
Peter.
More information about the GraphHopper
mailing list