Page History
...
The code is available from SVN prototype branch at: http://scm.dspace.org/svn/repo/sandbox/installer-prototype/
This code only includes a customized version of the normal 'dspace' Assembly module from Trunk (1.8.0-SNAPSHOT).
...
Wiki Markup {{org.dspace.install.Installer}} \- This is the main executable Installer class. Currently, it essentially just uses the Apache Ant API to call a custom Installer 'installer-build.xml' file (which is based off the default DSpace {{\[installer-prototype\]/dspace/src/main/config/build.xml}} file). NOTE: Even though this installer uses the Ant API, Ant is *not* required to be installed on the local system. The Ant API is included within the Installer itself.
/src/main/resources/installer-build.xml
- This is the Ant Build file which actually tells Ant what it needs to do to actually perform the Install process.
...
Wiki Markup |
---|
Initially, I thought: "If I can embed Ant in the installer to actually create the \[dspace\] installation directory, why not go one step further and embed Maven, so that the Installer.jar just auto-builds DSpace for you via Maven". The main reason for potentially embedding Maven was to allow for a smaller Installer.jar overall (less duplication of JAR dependencies, for each of the various DSpace WARs), and to allow Maven to do what it does best (namely managing dependencies). |
Unfortunately, that is not as simple as it may sound. To properly embed Maven into the Installer.jar, you'd need to do the following:
...
- There is a 'dependency plugin' which comes with a 'dependency:go-offline' option.
- Unfortunately, this 'go-offline' option fails to download all maven plugins which are dependencies of the build process. (Or at least, from my basic testing it seems to have difficulty with this in multi-module maven projects, like DSpace)
- In addition, this 'go-offline' mode cannot be pointed at a custom repository location (so you cannot specify the location of the offline repository). Instead, it will always use your local Maven repository defined in your 'settings.xml' file.
- The only way to take Maven completely offline seems to be what is detailed in this blog post. Unfortunately, it's not an easy process to script, so it's not really plausible to use for the building of our Installer. It's possible this may be easier in the future, but it's just not good enough yet.
- This thread details more frustrations around trying to use the 'go-offline' option: http://maven.40175.n5.nabble.com/Creating-repository-for-offline-building-with-dependency-go-offline-fails-td125614.html
Wiki Markup |
---|
The Conclusion: At least at this point in time, embedding Maven into an Installer is not really a plausible solution. We'll need to find a better way of avoiding an ever growing Installer.jar file (which is already rather large as some basic dependencies, e.g. dspace-api.jar, are duplicated 7 times in that one Installer.jar, once for each of the six webapps and once in \[dspace\]/lib). |
Overview
Content Tools