I've been trying to build Geonetwork development environment using the steps from https://github.com/geonetwork/core-geonetwork/tree/develop/software_development

Here is the stacktrace, when building common utils:

INFO] [findbugs:check {execution: default}]
[INFO] BugInstance size is 1
[INFO] Error size is 0
[INFO] Total bugs: 1
[INFO] Exception is caught when Exception is not thrown in org.fao.geonet.utils.nio.NioPathAwareCatalogResolver.resolve(String, String) ["org.fao.geonet.utils.nio.NioPathAwareCatalogResolver"] At NioPathAwareCatalogResolver.java:[lines 32-117]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] failed with 1 bugs and 0 errors 
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: failed with 1 bugs and 0 errors 
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
    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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: failed with 1 bugs and 0 errors 
    at org.codehaus.gmaven.mojo.GroovyMojo.fail(GroovyMojo.java:72)
    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.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)
    at org.codehaus.mojo.findbugs.FindbugsViolationCheckMojo.execute(FindbugsViolationCheckMojo.groovy:521)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
    ... 17 more

Here is the output from mvn -v:

Apache Maven 2.2.1 (rdebian-14)
Java version: 1.7.0_80
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "3.13.0-57-generic" arch: "amd64" Family: "unix"

Using Ubuntu Desktop 14.04 64.

I've already deleted my /home/.m2 directory,and even tried from a fresh vagrant box with Ubuntu 12.04 with the same error.

Also tried for the branch 3.0.x and 3.0.1 tag, all of them seems to fail.

Any ideas, on how to get the development environment up?

up vote 1 down vote accepted

That's weird, you have the same environment as me and I can do it.

Did you install the jdk version of Java or only the jre? Try javac -version to check it.

Check also with this steps: https://www.geocat.net/how-to-compile-and-run-geonetwork/

UPDATE: As stated in this issue you should use Maven 3 https://github.com/geonetwork/core-geonetwork/issues/1111#issuecomment-123562337

  • I have jdk installed, javac -version outputs javac 1.7.0_80. Also checked the java and javac being used by default, they are /usr/lib/jvm/java-7-oracle/jre/bin/java and /usr/lib/jvm/java-7-oracle/bin/javac – Luiz Fernando Barbosa Vital Jul 21 '15 at 16:10
  • The difference between your steps and what i did is the mvn command. I'll try package install skiping tests instead of clean install with tests. – Luiz Fernando Barbosa Vital Jul 21 '15 at 16:16
  • 1
    package install now works!!!! Had to replace Maven 2.2.1 to Maven 3.2.1. Was getting [FATAL ERROR] org.codehaus.groovy.maven.plugin.execute.ExecuteMojo#execute() caused a linkage error (java.lang.NoSuchMethodError) and may be out-of-date when Building GeoNetwork schema plugins. Thanks for the help – Luiz Fernando Barbosa Vital Jul 21 '15 at 18:31

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.