Difference between revisions of "Peregrine Development"

From BioAssist
Jump to: navigation, search
(added code formatting rules)
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Peregrine for Developers ==
+
This text has been moved to the NBIC Trac
  
This article targets Java developers, who would like to contribute into Peregrine development.
+
Please see: https://trac.nbic.nl/data-mining/wiki/DeveloperGuide
  
You have to follow the following procedure:
+
[[Category:Peregrine]]
 
+
* Register at [https://gforge.nbic.nl/ NBIC gForge] and submit registration information to Peregrine administrators (e.g. to [[User:Dmitry Katsubo|Dmitry Katsubo]] or [[User:Bharat Singh|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: <pre>svn checkout --username yourdevelopername https://gforge.nbic.nl/svn/data-mining</pre> (you will be asked for password and permission to save server certificates locally)
+
* Now setup Maven<ref>You don't need to setup [http://maven.apache.org/plugins/maven-eclipse-plugin/ maven plugin for Eclipse]. If you do so, this plugin will handle <tt>M2_REPO</tt> variable</ref>:
+
** Download and install Maven+JDK as described [http://maven.apache.org/download.html#Installation here].
+
** Tune system variables. You need to create <tt>JAVA_HOME</tt> and <tt>M2_HOME</tt> variables and append the path to maven's bin directory to your <tt>PATH</tt>, as shown on [[:Image:Maven_Environment.gif|this screenshot]].
+
* Go to your ''data-mining'' project and execute <pre>mvn eclipse:eclipse</pre> to download all necessary artefacts<ref>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</ref>. Remove <tt>.project</tt> files for POM-type projects (namely: <tt>data-mining\.project</tt>, <tt>data-mining\ontology\.project</tt>, <tt>data-mining\peregrine\.project</tt>) - this will allow Eclipse to see correctly the list of subprojects when scanning for new projects during import step.
+
* Define a classpath variable <tt>M2_REPO</tt> in Eclipse, which should point to your local maven repository (<tt>C:\Users\me\.m2\repository</tt>).
+
* Switch your Eclipse to "Working Sets" top-level elements (as shown [[:Image:Eclipse_switch_to_workingsets.png|here]]) and create new working set Peregrine.
+
* Go to ''File -> Import'' and select ''General -> Existing projects into workspace'' as shown [[:Image:Eclipse_import_projects.png|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 [http://svn.haxx.se/subusers/archive-2006-09/0052.shtml here] and [http://www.techcrony.info/?p=29 here] for more information).
+
 
+
=== Code formatting agreement ===
+
 
+
The code of Peregrine follows well-defined standards. Please import the [[:Image:Peregrine_Eclipse_Code_Formatting.xml|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.
+
 
+
== Notes ==
+
 
+
<references />
+
 
+
[[Category:Peregrine|Development]]
+

Latest revision as of 17:59, 7 November 2012

This text has been moved to the NBIC Trac

Please see: https://trac.nbic.nl/data-mining/wiki/DeveloperGuide