Cannot build 0.6 on Ubuntu 14 (LGPL Tools failed)

Any idea what’s going on here?

java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

## using java 1.7.0_95 (64bit) from 
## now building graphhopper jar: 
## using maven at /usr/share/maven
## compilation of parent failed
[INFO] Scanning for projects...
[INFO] Reactor Summary:
[INFO] 
[INFO] GraphHopper Parent Project ........................ SUCCESS [1.307s]
[INFO] GraphHopper Tools LGPL licensed ................... FAILURE [0.427s]
[INFO] GraphHopper ....................................... SKIPPED
[INFO] GraphHopper Tools ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.007s
[INFO] Finished at: Wed Mar 30 12:22:38 CEST 2016
[INFO] Final Memory: 9M/184M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project graphhopper-tools-lgpl: Compilation failure -> [Help 1]

Tried adding -e or -X to the maven command in execMvn no more helpful messages

Can you look into the full compilation log? (see the graphhopper.sh script for the exact location)

It doesn’t really say much more…

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] GraphHopper Parent Project
[INFO] GraphHopper Tools LGPL licensed
[INFO] GraphHopper
[INFO] GraphHopper Tools
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building GraphHopper Parent Project 0.6.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ graphhopper-parent ---
[INFO] 
[INFO] --- maven-failsafe-plugin:2.19:integration-test (default) @ graphhopper-parent ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-failsafe-plugin:2.19:verify (default) @ graphhopper-parent ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-install-plugin:2.3:install (default-install) @ graphhopper-parent ---
[INFO] Installing /home/www/osm/data/graphhopper-0.6/pom.xml to /home/www/.m2/repository/com/graphhopper/graphhopper-parent/0.6.0/graphhopper-parent-0.6.0.pom
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building GraphHopper Tools LGPL licensed 0.6.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ graphhopper-tools-lgpl ---
[INFO] 
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ graphhopper-tools-lgpl ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/www/osm/data/graphhopper-0.6/tools-lgpl/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ graphhopper-tools-lgpl ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /home/www/osm/data/graphhopper-0.6/tools-lgpl/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] GraphHopper Parent Project ........................ SUCCESS [7.100s]
[INFO] GraphHopper Tools LGPL licensed ................... FAILURE [2.859s]
[INFO] GraphHopper ....................................... SKIPPED
[INFO] GraphHopper Tools ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.803s
[INFO] Finished at: Thu Mar 31 13:40:31 CEST 2016
[INFO] Final Memory: 9M/184M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project graphhopper-tools-lgpl: Compilation failure -> [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/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :graphhopper-tools-lgpl

Ok, with -X -e added to the mvn call I get this (apparently my first attempt to add these 2 flags was flawed):

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project graphhopper-tools-lgpl: Compilation failure -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project graphhopper-tools-lgpl: Compilation failure
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
        at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:915)
        at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more

Some more datapoints.

I can compile on a Dev Box (basically same Ubuntu, slightly older JDK, both 64 bit)

Comparing the debug output of the compile log, I see that the following appears in the working dev box but not when compiling on the production server:

[DEBUG] Resolving plugin prefix assembly from [org.apache.maven.plugins, org.codehaus.mojo]
[DEBUG] Resolved plugin prefix assembly to org.apache.maven.plugins:maven-assembly-plugin from POM com.graphhopper:graphhopper-tools:jar:0.6.0

(loading a GH DB with a built installation as copied form the dev box didn’t work either so I tried to compile on the server)

What are the exact steps you tried? Something like?
git checkout 0.6 ./graphhopper.sh clean ./graphhopper.sh build

Yes, that’s what I did.

And now you must probably think I’m stupid, because just now it built without errors :open_mouth: Nothing really changed except probably some OS auto updates and a reboot of the server. Very strange.

Maybe something with the network or maven repository

And now you must probably think I’m stupid

Of course not. Good that is resolved and keep an eye on it as such issues are important to us to fix.