[Dspace-tech] Maven build error

44 views
Skip to first unread message

Andy Kirkyla

unread,
Aug 26, 2015, 1:22:50 PM8/26/15
to dspac...@lists.sourceforge.net
Folks,

        I trust all is well.

        We are trying to install DSpace 4.2 on our Linux server an we are having issues with the maven build. I am getting the following error: 

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.431 s
[INFO] Finished at: 2014-07-23T16:28:04-04:00
[INFO] Final Memory: 11M/119M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (native2ascii-utf8) on project modules: Error executing ant tasks: /home/dspace/DSpace-dspace-4.2/dspace/modules/target/antrun/build-Encode any UTF-8 chars in properties.xml (No such file or directory) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (native2ascii-utf8) on project modules: Error executing ant tasks: /home/dspace/DSpace-dspace-4.2/dspace/modules/target/antrun/build-Encode any UTF-8 chars in properties.xml (No such file or directory)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
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:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
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: Error executing ant tasks: /home/dspace/DSpace-dspace-4.2/dspace/modules/target/antrun/build-Encode any UTF-8 chars in properties.xml (No such file or directory)
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:360)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.io.FileNotFoundException: /home/dspace/DSpace-dspace-4.2/dspace/modules/target/antrun/build-Encode any UTF-8 chars in properties.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:110)
at org.codehaus.plexus.util.FileUtils.fileWrite(FileUtils.java:470)
at org.apache.maven.plugin.antrun.AntRunMojo.writeTargetToProjectFile(AntRunMojo.java:608)
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:263)
... 21 more
[ERROR] 
[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:

     I believe this is caused by an error in the top level POM.xml file. But I am afraid I do not know what changes need to be made.

     Does anybody know what I am doing wrong?

     Thanks.

Andy

Andrea Schweer

unread,
Aug 26, 2015, 1:22:51 PM8/26/15
to dspac...@lists.sourceforge.net
Hi Andy,

I built a DSpace 4.2 on a Linux server just fine a few hours ago, so I think it's something in your set-up rather than in the DSpace pom.

which directory are you running maven in? https://wiki.duraspace.org/display/DSDOC4x/Installing+DSpace#InstallingDSpace-Installation point 7 says it should be either [dspace-source] or [dspace-source]/dspace -- also see here: https://wiki.duraspace.org/display/DSDOC4x/Installing+DSpace#InstallingDSpace-OverviewofDSpaceDirectories

Also, which maven version is this? DSpace 4 requires maven 3: https://wiki.duraspace.org/display/DSDOC4x/Installing+DSpace#InstallingDSpace-ApacheMaven3.x%28Javabuildtool%29
Finally, you might like to double-check you Java version to ensure you're using Java 7 or newer: https://wiki.duraspace.org/display/DSDOC4x/Installing+DSpace#InstallingDSpace-OracleJavaJDK7%28standardSDKisfine,youdon%27tneedJ2EE%29orOpenJDK7

mvn -version
will show you the maven and Java versions in use on your system.

cheers,
Andrea
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds


_______________________________________________
DSpace-tech mailing list
DSpac...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

-- 
Dr Andrea Schweer
IRR Technical Specialist, ITS Information Systems
The University of Waikato, Hamilton, New Zealand
+64-7-838 4466 ext. 6972

Andy Kirkyla

unread,
Aug 26, 2015, 1:23:02 PM8/26/15
to dspac...@lists.sourceforge.net
Folks,

     I trust all is well.

     I was able to resolve the issue.

     The problem was that the /home/dspace/DSpace-dspace-4.2/dspace/modules was owned by root and needed to be changed to dspace.

     Thanks everyone for their help.

Andy
Reply all
Reply to author
Forward
0 new messages