0

Please help me to correct these errors to build Dspace successfully on windows 7.

  • This is Installation of Dspace Digital Repository application.
  • I have tried to correct these errors by do rebuild but I failed.
  • Thank you
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error: error reading C:\Users\Abu-Elnil\.m2\repository\org\restlet\jee\o
rg.restlet\2.1.1\org.restlet-2.1.1.jar; error in opening zip file
[ERROR] error: error reading C:\Users\Abu-Elnil\.m2\repository\org\restlet\jee\o
rg.restlet.ext.servlet\2.1.1\org.restlet.ext.servlet-2.1.1.jar; error in opening
 zip file
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] DSpace Addon Modules .............................. SUCCESS [1:46.473s]
[INFO] DSpace Kernel :: Additions and Local Customizations  FAILURE [20:10.606s]

[INFO] DSpace XML-UI (Manakin) :: Local Customizations ... SKIPPED
[INFO] DSpace LNI :: Local Customizations ................ SKIPPED
[INFO] DSpace JSP-UI :: Local Customizations ............. SKIPPED
[INFO] DSpace REST (JAX RS 1 - Jersey) :: Local Customizations  SKIPPED
[INFO] DSpace SWORD :: Local Customizations .............. SKIPPED
[INFO] DSpace SWORD v2 :: Local Customizations ........... SKIPPED
[INFO] DSpace SOLR :: Local Customizations ............... SKIPPED
[INFO] DSpace OAI 2.0 :: Local Customizations ............ SKIPPED
[INFO] DSpace Assembly and Configuration ................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22:06.025s
[INFO] Finished at: Fri Aug 22 17:16:03 AST 2014
[INFO] Final Memory: 22M/68M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.
3.2:compile (default-compile) on project additions: Compilation failure: Compila
tion failure:
[ERROR] error: error reading C:\Users\Abu-Elnil\.m2\repository\org\restlet\jee\o
rg.restlet\2.1.1\org.restlet-2.1.1.jar; error in opening zip file
[ERROR] error: error reading C:\Users\Abu-Elnil\.m2\repository\org\restlet\jee\o
rg.restlet.ext.servlet\2.1.1\org.restlet.ext.servlet-2.1.1.jar; error in opening
 zip file
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExc
eption
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
Sandeep Roniyaar
  • 204
  • 1
  • 8
  • 26
user288291
  • 11
  • 1
  • 4
  • 1
    Could you add the following details:version of maven you are using (maven 3 is recommended), version of DSpace, exact maven command that you are using to start this build, including the working directory where you executed the command. It could also be handy if you post your full maven build, for example through pastebin.com – Bram Luyten Aug 23 '14 at 08:49
  • Thank you very for care the details are: maven version: maven-3.2.3/ Dspace version: 4.2/ the command is: mvn package/ the directory: C:\dspace\dspace-4.2-src-release\dspace – user288291 Aug 23 '14 at 09:37
  • Not quite sure what the cause is of your problem, because this all sounds right. But I suggest you delete your local maven cache, e.g. all folders in your C:\Users\Abu-Elnil\.m2\repository directory, and try to run mvn again. While it's probably unrelated, I also recommend to execute "mvn clean package" instead of "mvn package". – Bram Luyten Aug 23 '14 at 13:04
  • You also may want to try simply running: `mvn -U clean package` The -U should tell Maven to redownload your dependencies. It sounds like something is wrong with the "org.restlet" dependency which currently exists in your `C:\Users\Abu-Elnil\.m2\repository\org\restlet\jee\org.restlet.ext.servlet\2.1.1\` directory. – Tim Donohue Aug 25 '14 at 16:05
  • Thank you Bram Luyten, Tim Donohue, i will try that and telling the result. – user288291 Aug 25 '14 at 18:44
  • Unfortunately the problem still found after using "mvn -U clean package" , "mvn clean package". – user288291 Aug 25 '14 at 20:21
  • Hi Guys, The problem has been fixed, I just delete the folder .m2 and after that everything going well. Best regards – user288291 Aug 25 '14 at 21:50

3 Answers3

0

To fix this problem just delete the repository directory ".m2" which located in C:\Documents and Settings{your-username}.m2

user288291
  • 11
  • 1
  • 4
0

The restlet jar's are currently not offered through maven central.

Temporary workaround:

  1. make sure to build from dspace-parent (the pom next to the dspace folder)
  2. add to the dspace-parent repositories

<repository> 
     <id>restlet</id> 
     <name>restlet</name> 
     <url>http://maven.restlet.org</url> 
</repository>
Bram Luyten
  • 1,034
  • 7
  • 18
0

you need to change the version to 3.0.2 of maven-jar- plugin in pom.xml and maven-war-plugin to 3.2.0 version read the comment below`

Farhad
  • 4,119
  • 8
  • 43
  • 66