[for debian-java readers: the original mail explaining the problem is attached
below]
Hi Emmanuel,
On Wed, Jun 05, 2013 at 12:15:55PM +0200, Emmanuel Bourg wrote:
The build doesn't compile the code, so you can't run the
uk.me.parabola.mkgmap.main.Main class. You probably want to run the Ant
dist target to build the project instead of using the makefile, see the
comment in ./Makefile:
# This is NOT used to build mkgmap. To build use ant.
Ahhh, it seems javahelper ist tricked by the existence of the Makefile.
I blindly assumed that javahelper would prefer ant over make which is
obviously wrong.
However, if I try ant it says:
$ ant
Buildfile: /home/tillea/debian-maintain/repack/mkgmap/mkgmap-r2640/build.xml
prepare:
[mkdir] Created dir:
/home/tillea/debian-maintain/repack/mkgmap/mkgmap-r2640/build/classes
[mkdir] Created dir:
/home/tillea/debian-maintain/repack/mkgmap/mkgmap-r2640/lib/optional
ivy-availability:
download-ivy:
[mkdir] Created dir:
/home/tillea/debian-maintain/repack/mkgmap/mkgmap-r2640/lib/build
[get] Getting:
http://repo1.maven.org/maven2/org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar
[get] To:
/home/tillea/debian-maintain/repack/mkgmap/mkgmap-r2640/lib/build/ivy-2.2.0.jar
[get] Error getting
http://repo1.maven.org/maven2/org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar to
/home/tillea/debian-maintain/repack/mkgmap/mkgmap-r2640/lib/build/ivy-2.2.0.jar
BUILD FAILED
/home/tillea/debian-maintain/repack/mkgmap/mkgmap-r2640/build.xml:109:
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
at
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
at
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
at java.net.Socket.connect(Socket.java:546)
at java.net.Socket.connect(Socket.java:495)
at sun.net.NetworkClient.doConnect(NetworkClient.java:178)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:409)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
at sun.net.www.http.HttpClient.init(HttpClient.java:240)
at sun.net.www.http.HttpClient.New(HttpClient.java:321)
at sun.net.www.http.HttpClient.New(HttpClient.java:338)
at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:935)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:876)
at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:801)
at
org.apache.tools.ant.taskdefs.Get$GetThread.openConnection(Get.java:660)
at org.apache.tools.ant.taskdefs.Get$GetThread.get(Get.java:579)
at org.apache.tools.ant.taskdefs.Get$GetThread.run(Get.java:569)
Total time: 1 second
It seems maven is somehow involved even if at least to my limited
knowledge this would use ratherpm.xml rather than build.xml. It
seems I need to edit build.xml to tell ant to use local JAR files
rather than trying to download anything. But what exactly?
PS: Don't forget to CC debian-j...@lists.debian.org for your Java
questions, there are plenty of people skilled in Java willing to help
there :)
Thanks for the additional hint - attaching a full quote of my original
mail for debian-java readers below.
Kind regards
Andreas.
begin original mail
Hi,
I updated the packaging of mkgmap in SVN
svn://svn.debian.org/svn/pkg-grass/packages/mkgmap/trunk
to recent packaging standards and latest upstream version.
Unfortunately the build failed with
/usr/bin/time --format 'Real: %E, %S+%U' java -XX:+UseCompressedOops -Xmx700m
-cp build/classes uk.me.parabola.mkgmap.main.Main --tdbfile --family-id=909
--series-name=other map --description='A test map'
/opt/data/uk-071010-1.osm.gz
Exception in thread main java.lang.NoClassDefFoundError:
uk/me/parabola/mkgmap/main/Main
Caused by: java.lang.ClassNotFoundException: uk.me.parabola.mkgmap.main.Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: uk.me.parabola.mkgmap.main.Main. Program will
exit.
Command exited with non-zero status 1
Real: 0:00.04, 0.00+0.03
make[1]: *** [makemap] Error 1
My guess is that this might be a quite simple problem for a Java expert
who is comfortable with build.xml.
Any hint to revitalise this de-facto orphaned OSM tool?
Kind regards
Andreas.
--