1

Just tried to build geonetwork on my ubuntu machine, following this and this tutorial.

Unfortunately I ran into a problem, I don't know how to fix. I managed to get the geonetwork clone from github and did

mvn package install -DskipTests

This finished the build of common utils with an error, after having done all the downloads. Here's the stacktrace from running with -e switch.

[INFO] Reactor Summary:
[INFO]
[INFO] GeoNetwork opensource ............................. SUCCESS [0.341s]
[INFO] common utils ...................................... FAILURE [0.756s]
[INFO] Caching xslt module ............................... SKIPPED

...

[ERROR] Failed to execute goal org.zeroturnaround:jrebel-maven-plugin:1.1.5:generate (generate-rebel-xml) on project common: Failed writing rebel.xml: /srv/git/repos/geonetwork/core-geonetwork/common/target/classes/rebel.xml (No such file or directory) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.zeroturnaround:jrebel-maven-plugin:1.1.5:generate (generate-rebel-xml) on project common: Failed writing rebel.xml
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
        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.MojoExecutionException: Failed writing rebel.xml
        at org.zeroturnaround.javarebel.maven.GenerateRebelMojo.execute(GenerateRebelMojo.java:224)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
Caused by: java.io.FileNotFoundException: /srv/git/repos/geonetwork/core-geonetwork/common/target/classes/rebel.xml (No such file or directory)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
        at org.zeroturnaround.javarebel.maven.GenerateRebelMojo.execute(GenerateRebelMojo.java:220)

Any ideas how to create the missing rebel.xml or work around it? Tried mvn clean and mvn clean install as well, but without success.

UPDATE: I updated maven version from 3.0.4 to 3.3.9, which was helpful according to this post, but without success, I still get the same error

0

After I got several different error messages, it seemed that the folder target could not be created during the build (there were no errors on failed creation of the directory). So the build failed due to missing permissions and I built with sudo, which worked fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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