Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel

Contents

Table of Contents
outlinetrue
stylenone

See Also

The Build Cookbook if you are adding your own code to a binary distribution, or want to make use of module overlays.

...

Once you've chosen your version, check it out as follows (the below example is for DSpace 1.5):

Code Block

svn co https://scm.dspace.org/svn/repo/dspace/tags/dspace-1_5 /some/where

...

Navigate into the directory called "dspace" within your svn checkout.

Code Block

 cd /some/where/dspace/

Execute Maven using the following command

Code Block

 mvn package

Note, one previously had to execute Maven with "assembly:assembly" as an option, this is no longer necessary. Other options for executing maven include designating the database to be used, this can be executed wih the following additional option.

Code Block

 mvn -Ddb.name=[postgres|oracle] package

...

. Set up a PostgreSQL database as usual. Edit dspace/target/dspace-1.5-SNAPSHOT.dir/config/dspace.cfg as required. Run:

Code Block

 ant fresh_install

You may see errors like this, but these don't matter:

Code Block

 [java] log4j:ERROR Could not read configuration file [file:config/log4j-console.properties].
 [java] java.io.FileNotFoundException: file:config/log4j-console.properties (No such file or directory)
 [java]     at java.io.FileInputStream.open(Native Method)
 [java]     at java.io.FileInputStream.<init>(FileInputStream.java:106)
 ....

...

In your DSpace install directory (by default /dspace), you should see a webapps dir. Copy these to your Tomcat's webapps dir.

Now http://localhost:8080/jspui/Image Removed should be the 'classic' DSpace UI. http://localhost:8080/xmlui/Image Removed should be the XML UI.

...

Using Eclipse is actually very easy if you're on 3.3 and have Subclipse installed. Just create a Java project, specify 'create project from existing source' and point it at /path/to/src, i.e. the directory with dspace, dspace-api etc. in it. Eclipse picks up the source directories and JARs, and even the SVN source control info. You might like to change Eclipse's build directory and remove duplicates and dspace-*.jar from the JARs in the build path, but as far as source editing with code completion goes you're good.

To deploy your changes (you'll probably want to set up a script to do this!)

Code Block

 $CATALINA_HOME/bin/shutdown.sh
 cd /path/to/your/src/dspace
 mvn package
 cd target/dspace-1.5-SNAPSHOT.dir
 ant -Dconfig=/dspace/config/dspace.cfg update
 rm -r $CATALINA_HOME/webapps/dspace-*
 cp -r /dspace/webapps/* $CATALINA_HOME/webapps/
 $CATALINA_HOME/bin/startup.sh

...

In the top level of your checked out DSpace (i.e. the /path/to/your/src dir) do:

Code Block

   svn up

You should see messages about what's being updated. If you see 'C' or messages about conflicts by any of the files, you will need to go to the files where there were conflicts and resolve them. See the section entitled "Resolve Conflicts (Merging Others' Changes)" in the SubVersion documentation.

...

To create a patch for all changes, run

Code Block

 svn diff -u > mypatch.txt

To create a patch for only certain files, run

Code Block

 svn diff -u path/to/files > mypatch.txt

...

Wiki Markup
In general, you most likely will want to run a command _similar_ to the following from your \[dspace-source\] directory (but see the _Important Hints_ below, before running anything\!):

Code Block

   patch -p0 < mypatch.txt

Important Hints:

...