This page contains instructions on how to set up your computer such that you can:
- program your assignments,
- make sure you keep track of your work with a version control system,
- submit your labs for grading, and
- use our black-box testing system.
Step 1) Installing and Configuring Eclipse
You are by no means required to use an IDE. If you wish to do so, we recommend that you use Eclipse with the Scala plug-in. Skip this step if you are not going to use Eclipse.
We suggest that you download directly the version of Eclipse that contains Scala already. Make sure you get the version for Scala 2.11.
Step 2) Creating a Public/Private SSH Key Pair
Authentication to the git repository works by using a SSH key. If you do not already have a private/public key combination for your computer, follow these instructions. Note that you typically generate one key pair per computer that you use.
From the Command Line
ssh-keygen -t rsa -b 2048.
- Type enter to save it in the default location.
- Choose a passphrase, or type enter to ignore it.
- Your public key is now stored in a file (typically, in ~/.ssh/id_rsa.pub). You will need to copy-paste the content of this file into our webservice.
Step 3) Project Web Interface
The web interface for your project will be directly linked to your git repository. It will allow you to run tests, submit deliverables, receive feedback, etc..
The web interface is located at http://larasrv09.epfl.ch:9000/clp16 (Tequila authentication required.)
All labs will be done individually. Despite what the interface suggests, you need to create groups of 1 person each.
- Go to http://larasrv09.epfl.ch:9000/clp16 and authenticate yourself
- The first time you go there, you can either create a group or wait until somebody created a group with you.
- Once you are within a group, go to the YourName > SSH Keys tab, and register the Public SSH key you just generated. Make sure you copy your entire key, including the `ssh-rsa` prefix and the key identifier at the end.
Step 4) Setting up Your Project
You should start by installing Git and sbt for your platform.
From the Command Line
The first step is to clone the git repository:
$ git clone firstname.lastname@example.org:clp2016-group??
(Exact URI is provided in the web interface under Repository)
Then, use sbt 0.13 (http://www.scala-sbt.org/) to compile your project:
$ cd clp2016-group?? $ sbt > compile > ... > run examples/Pi.tool
Create an Eclipse Project
To create an Eclipse project corresponding to your sbt project, install and run sbt, then:
$ sbt > eclipse
Note: if you encounter dependencies error related to sbteclipse, make sure you are running sbt 0.13!
You can then import this project from Eclipse, under File → Import… → General > Existing projects into Workspace
To run your project, you need to add a new Run Configuration based on Scala Application, use toolc.Main as Main class, and pass e.g. examples/Pi.tool as argument.
Dependency for sbt-eclipse not found
Make sure you are running sbt 0.13!
The Git repository is asking you for a password
No password will ever work. This simply means that the ssh key-pair is not properly installed.
Make sure the public key can be accessed under
~/.ssh/id_rsa.pub and that you copied the entire key to the web interface:
ssh-rsa AASDFFOOBAR… email@example.com