Set up a PickCells development environment
This page describes how to install third-party tools and packages required to develop PickCells and how to get the PickCells source code.
Contents
- Terminology
- Install prerequisites
- Create and register an SSH key with Framagit
- Get PickCells repositories
- Build PickCells release
- Build PickCells release from the repositories
Terminology
In the following, when we say “open a bash window”:
- Ubuntu users, open a terminal window.
- Windows 7 users, open Git Bash.
Install prerequisites
We assumes you have already downloaded, installed and run PickCells, as described in our documentation on how to Get Started.
Install Java 1.8 JDK
You can use either OpenJDK or Oracle Java
64-bit Java is highly recommended for 64-bit operating systems.
PickCells has not been tested on Java 1.9.
For full installation instructions for Java, consult the relevant third-party documentation.
Install OpenJDK
Ubuntu users
-
Run:
sudo apt-get install openjdk-8-jdk javac -version
-
You should see something like:
javac 1.8.0_131
-
Edit
/etc/environment
:sudo nano /etc/environment
-
Add the line:
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"
-
Run:
source /etc/environment echo $JAVA_HOME
-
You should see something like:
/usr/lib/jvm/java-8-openjdk-amd64/
Install Oracle Java
Windows 7 users
Install Oracle Java
-
Visit Oracle Java SE Development Kit 8 Downloads.
-
Click Accept License Agreement.
-
Download Windows x64 version e.g.
jdk-8u144-windows-x64.exe
. -
Double-click
exe
e.g.jdk-8u144-windows-x64.exe
. -
Follow installer instructions.
-
Open a command prompt.
-
Run:
"C:\Program Files\Java\jdk1.8.0_144\bin\javac" -version
-
You should see something like:
javac 1.8.0_144
Update environment variables:
-
Select Start => Control Panel.
-
Enter
environment
in search field. -
Select Edit the system environment variables.
-
Click Advanced tab
-
Click Environment Variables…
-
Under User variables, click New…
-
Enter Variable name:
JAVA_HOME
-
Enter Variable value:
C:\Program Files\Java\jdk1.8.0_144\
-
Click OK
-
Select PATH
-
Click Edit…
-
Add to the end of the value:
;C:\Program Files\Java\jdk1.8.0_144\bin
-
Click OK
-
Click OK
-
Click OK
-
Open a command prompt.
-
Run:
javac -version
-
You should see something like:
javac 1.8.0_144
Install Maven 3.3+
PickCells source code is built and tested using the Apache Maven software project managment tool.
To install Maven may require that you have administrator access to install and configure software. If you do not have administrator access, a local system administrator may be able to give you this, or install Maven for you.
Ubuntu users
-
Run:
sudo apt-get install maven mvn -v
-
You should see something like:
Apache Maven 3.3.9 Maven home: /usr/share/maven Java version: 1.8.0_131, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "4.8.0-36-generic", arch: "amd64", family: "unix"
The value of Java version
and Java home
should match the location and version of Java you installed earlier.
Windows 7 users
- Visit Downloading Apache Maven.
- Download binary zip archive e.g.
apache-maven-3.5.0-bin.zip
. - Right-click zip archive e.g.
apache-maven-3.5.0-bin.zip
. - Select Extract All…
- Move
apache-maven-3.5.0-bin\apache-maven-3.5.0
toC:\Program Files
.
Update environment variables:
-
Select Start => Control Panel.
-
Enter
environment
in search field. -
Select Edit the system environment variables.
-
Click Advanced tab
-
Click Environment Variables…
-
Under System variables, click New…
-
Select Path
-
Click Edit…
-
Add to the end of the value:
;C:\Program Files\apache-maven-3.5.0\bin
-
Click OK
-
Click OK
-
Click OK
-
Open a command prompt.
-
Run:
mvn -v
-
You should see something like:
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T20:39:06+01:00) Maven home: C:\Program Files\apache-maven-3.5.0\bin\.. Java version: 1.8.0_144, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk1.8.0_144\jre Default locale: en_GB, platform encoding: Cp1252 OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
The value of Java version
and Java home
should match the location and version of Java you installed earlier.
Install GraphViz
GraphViz can be used to create images of Maven dependency trees.
To install GraphViz may require that you have administrator access to install and configure software. If you do not have administrator access, a local system administrator may be able to give you this, or install GraphViz for you.
Any recent version of GraphViz should be OK.
Ubuntu users
-
Run:
sudo apt-get install graphviz dot -V
-
You should see something like:
dot - graphviz version 2.38.0 (20140413.2041)
Windows 7 users
- Visit GraphViz Download.
- Download a stable Windows MSI file e.g.
graphviz-2.38.msi
. - Double-click MSI file e.g.
graphviz-2.38.msi
. - Accept installer defaults.
- Select Start.
- Enter
gvedit.exe
. - GVEdit should appear
Update environment variables:
-
Select Start => Control Panel.
-
Enter
environment
in search field. -
Select Edit the system environment variables.
-
Click Advanced tab
-
Click Environment Variables…
-
Under System variables, click New…
-
Select Path
-
Click Edit…
-
Add to the end of the value:
;C:\Program Files (x86)\Graphviz2.38\bin
-
Click OK
-
Click OK
-
Click OK
-
Open a command prompt.
-
Run:
dot -v
-
You should see something like:
dot - graphviz version 2.38.0 (20140413.2041)
Install Git
Git is a source code version control tool.
To install Git requires that you have administrator access to install and configure software. If you do not have administrator access, a local system administrator may be able to give you this, or install Git for you.
Any recent version of Git should be OK.
Ubuntu users
-
Run:
sudo apt-get install git git --version
-
You should see something like:
git version 2.7.4
Windows 7 users
Git for Windows is recommended. It provides both Git and a bash shell.
-
Visit Git for Windows.
-
Click the Download button.
-
Double-click installer
.exe
e.g.Git-2.15.1.2-64-bit.exe
. -
Git Bash and Git GUI will both be installed.
-
Open the Git Bash command prompt.
-
Run:
git --version
-
You should see something like:
git version 2.15.1.windows.2
-
Set your user name and email:
git config --global user.name "<YOUR-NAME>" git config --global user.email "<YOUR-EMAIL-ADDRESS>"
Create and register an SSH key with Framagit
-
Open a bash window.
-
Run:
ssh-keygen -t rsa
-
When prompted, enter a pass-phrase.
-
A public key (
id_rsa.pub
) and private key (id_rsa
) will be created in.ssh
, which you can check by running:ls ~/.ssh/
-
Log in to Framagit.
-
Select user profile (avatar icon on top right) => Settings.
-
Click SSH Keys (key icon).
-
Paste in the contents of the file
id_rsa.pub
into Key. -
Title should fill itself in automatically.
-
Click Add key.
Get PickCells repositories
For more information of what each of the PickCells components does, see their individual README.md files which can be found at the top of each component repository, e.g. https://framagit.org/pickcellslab/foundationj/blob/master/README.md for the foundationj component.
For a public, open source project such as PickCells, it is useful if developers are able to work on their own personal copies of the original, public server-side repository, without the danger of deleting anything by mistake in the latter.
Only the PickCells maintainers are able to make change to the code in the PickCells source code repositories. Other developers work on their own forked versions of these repositories. For more information on this concept, the “forking workflow” please see Managing multiple developers and version control in our page on Collaborative Development.
Here we describe how to get access to PickCells source code using the “forking workflow”.
Fork a PickCells repository
-
Log in to Framagit.
-
Visit the pickcellslab project.
-
Go to the repository you want to work upon e.g. pickcells-assembly.
-
Click the “Fork” button.
-
Framagit will ask you to select a namespace in which to fork the repository. Click the one corresponding to your user name.
-
Framagit should fork the repository into your own personal space. Once complete you should see a message:
The project was successfully forked.
-
Your fork will be at the URL
https://framagit.org/<YOUR-USER-NAME>/<REPOSITORY-NAME>
e.g.https://framagit.org/jo12345/pickcells-assembly
.
Clone a PickCells repository
Now you can clone your PickCells repository onto your local computer.
-
Open a bash window.
-
Run:
git clone git@framagit.org:<YOUR-USER-NAME>/<REPOSITORY-NAME>.git
For example:
git clone git@framagit.org:jo12345/pickcells-assembly.git
-
When prompted, enter your passphrase that you provided when creating your SSH key.
-
Change into the folder with the clone;
cd <REPOSITORY-NAME>
For example:
cd pickcells-assembly
-
Create an ‘upstream remote’ to be able to track, and access, developments of the official PickCells repository you forked:
git remote add upstream https://framagit.org/pickcellslab/<REPOSITORY-NAME>
For example:
git remote add upstream https://framagit.org/pickcellslab/pickcells-assembly
-
Check the currently configured remote repositories for your fork. You should see something like, for example:
git remote -v origin git@framagit.org:<YOUR-USER-NAME>/pickcells-assembly.git (fetch) origin git@framagit.org:<YOUR-USER-NAME>/pickcells-assembly.git (push) upstream https://framagit.org/pickcellslab/pickcells-assembly (fetch) upstream https://framagit.org/pickcellslab/pickcells-assembly (push)
-
Check if the repository uses git submodules by checking if it has a
.gitmodules
file. If so then initialise the submodule:ls .gitmodules
If you get
.gitmodules
then initialise the submodule:
git submodule init git submodule update
Currently this is only required by the docs repository.
Build PickCells release
To build a PickCells release:
-
Fork and clone all the PickCells repositories, if you have not already done so.
-
Run:
cd pickcells-assembly mvn install
If any problems arise, see Troubleshooting.
Build PickCells release from the repositories
To build a PickCells release from the repositories:
-
Fork and clone all the PickCells repositories.
-
In each of the following repositories:
foundationj/ pickcells-api/pickcells-api-build/ pickcells-j3d/ pickcells-jfree/ pickcells-jzy3d/ pickcells-neodb/ pickcells-prefuse/ pickcells-rjava/ pickcells-essentials/
Run:
mvn install
-
In
pickcells-assembly/
, run:mvn package
-
A PickCells release will be available in, for example,
pickcells-assembly/target/PickCells-0.7.0.zip
.
If any problems arise, see Troubleshooting.