Peregrine for Developers
This article targets Java developers, who would like to contribute into Peregrine development.
You have to follow the following procedure:
- Register at NBIC gForge and submit registration information to Peregrine administrators (e.g. to Dmitry Katsubo or Bharat Singh).
- In a while you will be granted an access to SVN. In Eclipse you should checkout the project using URL https://gforge.nbic.nl/svn/data-mining or using CLI:
svn checkout --username yourdevelopername https://gforge.nbic.nl/svn/data-mining(you will be asked for password and permission to save server certificates locally)
- Now setup Maven:
- Go to your data-mining project and execute
mvn eclipse:eclipseto download all necessary artefacts. Remove .project files for POM-type projects (namely: data-mining\.project, data-mining\ontology\.project, data-mining\peregrine\.project) - this will allow Eclipse to see correctly the list of subprojects when scanning for new projects during import step.
- Define a classpath variable M2_REPO in Eclipse, which should point to your local maven repository (C:\Users\me\.m2\repository).
- Switch your Eclipse to "Working Sets" top-level elements (as shown here) and create new working set Peregrine.
- Go to File -> Import and select General -> Existing projects into workspace as shown here, press Next and import all projects into Peregrine workspace.
- Now head project can be closed unless you wish to use some information from it.
Switching SVN credentials
It might happen, that you would like to change authentication information for SVN access. Subclipse running over SVNKit stores authentication information in configuration\org.eclipse.core.runtime\.keyring (see here and here for more information).
Code formatting agreement
The code of Peregrine follows well-defined standards. Please import the following profile into Eclipse before starting to code and/or commit to Peregrine SVN. Formatting of source code is obligatory, if you don't follow it, you will be asked to re-commit with code appropriately formatted.
- You don't need to setup maven plugin for Eclipse. If you do so, this plugin will handle M2_REPO variable
- Sometimes in Linux (Ubuntu), you may receive errors due to problems in maven dependencies and permission setting.
- solution #1 is to run "sudo mvn eclipse:eclipse"
- solution #2 (seems better) is to remove the M2_HOME system variable