Linux Development Setup
See Also: MavenInfo, wiki:Developers
Required Software
- Cygwin (latest version)
- For Microsoft Windows only
- For setup details, please see CygwinSetup
- Subversion (version 1.3 or later,
version 1.4 recommended) (Online Book)
- For setup details, please see SubversionSetup
- JDK (1.5 or later)
- For setup details, please see JavaSetup
- Ant (latest version)
- For setup details, please see AntSetup
- Maven (version 2.0.8)
- For setup details, please see MavenSetup
- For collection of important links and information on Maven, see also MavenInfo
Optional Software
- Eclipse (latest version)
- For setup details, please see EclipseSetup
- Also needed to run all the services on the development machine:
- Ambra admin application needs a CMYK color profile which can be obtained here: http://java.sun.com/products/java-media/jai/downloads/download-1_1_2_01.html or a tar.gz version is attached to this page. Copy the files into lib directory of your JAVA_HOME.
Basic Build For the Impatient
svn co http://svn.topazproject.org/svn/head/ cd head mvn
Please see below for more info and if you plan on making any changes...
Subversion Repository Design
The subversion repository is located at http://svn.topazproject.org/svn/ and can be browsed directly; to check out a working copy of the latest working code:
svn co http://svn.topazproject.org/svn/head/
The repository (follows the subversion guidelines) comprises of:
- branches - Various branches to the main working code
- head - Main working code
- private - Private tree for developer's (sandbox)
- tags - Tag marking various releases
- vendor - External code/resources used by modules
Building
- To build everything under head:
mvn clean install
Note: if this is the first time you're building then just run mvn as the clean will fail in this case. - To build the RPMs, you need to be on a redhat/fedora/centos system
with rpm development tools installed. First clean out all build
directories using the following command:
mvn clean
Check that your source code tree is upto date and contains no surprises:svn stat
You should not see any files listed. Then rebuild everything with:mvn -Ppackages,rpm
This will produce rpm files. Use find head/packages -name '*.rpm' to find them.
Profiles
There are currently several maven profiles in use for controlling the build (profiles are enabled with '-P<profile1>,<profile2>,...'):
- 'packages'
- enable this to build the various packages; this is in a profile because building these takes a long time and they are not usually needed during development.
- 'rpm'
- enable this to build the rpm's; requires that the 'packages' profile also be enabled. This is in a separate profile because building rpm's only works on rpm-based linux systems.
- 'release'
- automatically enabled when building a release.
- 'it'
- enable this to run the ambra integration tests.
- 'reports'
- enable this when generating reports (i.e. the running the 'site' or 'site-deploy' goals)
There are additional profiles in various of the plos/libs packages for running various scripts via maven - see the respective poms for details. For example to run RunItql using maven, use:
mvn -Prunitql exec:java -Dargs="-ef /tmp/example.itql" -f plos/libs/runscripts/pom.xml
Installing and running stuff on your local machine in the specified order
- Build and install everything in local repository by running this under head:
- mvn clean install
- To install ESUP CAS Quick Start (ecqs) single signon server:
- mvn ant-tasks:ecqs-install
- To install Mulgara:
- mvn ant-tasks:mulgara-install
- To install Fedora:
- mvn ant-tasks:fedora-install
- To install Search:
- mvn ant-tasks:search-install
- To start the ESUP CAS Quick Start (ecqs) single signon server:
- mvn ant-tasks:ecqs-start
- To start mulgara:
- mvn ant-tasks:mulgara-start
- To start fedora (and mckoi):
- mvn ant-tasks:fedora-start
- To start Search:
- mvn ant-tasks:search-start
- To start ambra
- mvn jetty:run (in plos/webapp)
- To stop Search:
- mvn ant-tasks:search-stop
- To stop fedora (and mckoi):
- mvn ant-tasks:fedora-stop
- To stop mulgara:
- mvn ant-tasks:mulgara-stop
- To stop ecqs:
- mvn ant-tasks:ecqs-stop
Some build/run related issues
- Why don't the ecqs or fedora servers reflect the changes from an
'svn update' even after doing an 'mvn ant-tasks:ecqs-install' or
'mvn ant-tasks:fedora-install'?
- It is because, both these ant-tasks pick up the packages to install from your local maven repository (by default). Local maven repository will be updated only when you do a 'mvn install'.
- For the ambra project to work with ESUP CAS Quick Start, run
'mvn clean jetty:run' in the plos/webapp directory after
ESUP CAS Quick start has been installed and is running.
Additionally, SSL has to be setup first on ambra. The
certificate for the ambra machine has to be trusted by the CAS
server. Since these are self-signed at the moment, you must
import it into your local store. By default, ecqs and ambra are
running on the same machine. Plosone will use the cert generated
by the ecqs install process. You then just need to import that
certificate into the local store, e.g.
keytool -import -trustcacerts -alias jakarta-tomcat -storepass changeit -file ~/topazproject-install/esup-cas-quick-start-2.0.6-1/tmp/cert.pkcs7 -keystore $JAVA_HOME/jre/lib/security/cacertsPath to cacerts depends if you are using JDK or JRE. It could just be $JAVA_HOME/lib/security/cacerts if you're using the JRE. The default password is changeit, but you may have changed yours at some time in the past. The keytool program is typically in the bin directory of the JDK. - In order for jetty to reload properly (mvn jetty:run) you need
create the file src/main/resources/carol.properties in the
webapp with the following contents (see also
http://docs.codehaus.org/display/JETTY/JOTM ):
carol.start.jndi=false carol.start.rmi=false carol.jvm.rmi.local.call=true carol.jndi.java.naming.factory.url.pkgs=org.mortbay.naming
Otherwise you'll get a javax.naming.InvalidNameException: RegistryContext: can only list "".
SVN Issues
- 403 Forbidden (http://svn.topazproject.org) while doing a checkin
- Because you have not been given commit privileges. Talk to the system administrator.
Attachments
- JAICMM.tar.gz (316.3 kB) -
CMYK color profiles from Sun
, added by stevec on 12/01/06 14:42:40.
