Skip to content
This repository has been archived by the owner on Nov 19, 2019. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
dhoepelman committed Jan 10, 2014
2 parents 44912a8 + c6aebbd commit 686b068
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 33 deletions.
35 changes: 18 additions & 17 deletions IDE.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,49 @@
## Working with IDEs

The following instructions have been tested and confirmed working
The following instructions have been tested and confirmed working
with Eclipse Kepler (4.3) and IntelliJ 12.1 on MacOSX.

### Eclipse
1. Checkout the project from its repository, for example

```git clone [email protected]:istlab/Alitheia-Core.git```

2. Do the following
```
`git clone [email protected]:istlab/Alitheia-Core.git`

2. Do the following
```bash
mvn clean install
mvn -DdownloadJavadoc -Ddownloadsources eclipse:eclipse
```
```

3. In Eclipse, choose Import->General->Existing Projects into Workspace.
3. In Eclipse, choose `Import->General->Existing` Projects into Workspace.
In the next dialogue,
you enter the checkout directory and a list of project modules appears. Here
you should select only the modules you will be working with.

4. To debug, you run the debug.sh script from the top-level directory. This
4. To debug, you run the `debug.sh` script from the top-level directory. This
will start Alitheia Core in debug mode; initialisation will stop until an
external debug is attached. To attach the eclipse debugger, click on the
Run menu->Debug configurations, then select the Remote Java Application from
`Run menu->Debug configurations`, then select the `Remote Java Application` from
the list and click on the new launch configuration button. Add a name click
debug. Eclipse will connect to the waiting virtual machine and will stop
at any breakpoint you have set in the code.

### IntelliJ

1. Checkout the project from its repository, for example
```git clone [email protected]:istlab/Alitheia-Core.git```

2. Do the following
```
`git clone [email protected]:istlab/Alitheia-Core.git`

2. Do the following

```bash
mvn clean install
mvn -DdownloadJavadoc -Ddownloadsources intellij:intellij
```
3. In IntelliJ, go to File->Open project and choose the Alitheia Core top-level
```

3. In IntelliJ, go to `File->Open` project and choose the Alitheia Core top-level
directory. Importing will start.

4. To debug, create a debug configuration (Run->Debug->Edit Configurations) and
then click on + and select Remote. Set port to 8000 and click Debug. Then run
the debug.sh script on the top-level directory.
the `debug.sh` script on the top-level directory.

81 changes: 70 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Introduction


This is the source tree for Alitheia Core, a platform for
This is the source tree for Alitheia Core, a platform for
software analytics and software engineering research.

The README gives an overview of how the source tree is organised and sort
Expand All @@ -24,7 +24,7 @@ You can find the following files and directories here:
version 2.

`pom.xml`
As any other modern Java project, Alitheia Core uses maven for building.
As any other modern Java project, Alitheia Core uses maven for building.
We also use the Pax OSGi tools. You need to have those installed if
you plan to add functionality or external libraries to Alitheia Core

Expand Down Expand Up @@ -54,33 +54,91 @@ Git must be installed. Git can be downloaded from: http://git-scm.com/download

Without a Github account, the code can be checked out as follows:

git clone git://github.com/istlab/Alitheia-Core.git
`git clone git://github.com/istlab/Alitheia-Core.git`

Courtesy of Github, a zip of the current latest version of the software
can be downloaded.

https://github.com/istlab/Alitheia-Core/zipball/master
can be downloaded from https://github.com/istlab/Alitheia-Core/zipball/master.

### Compiling, running and developing
Note: More instructions can be found at the online Quickstart guide at http://www.sqo-oss.org/quickstart.

Alitheia Core is build using Maven (tested with version > 3). You can download
Maven from the following link: http://maven.apache.org/
Maven from the following link: http://maven.apache.org/.

#### Choosing the Database Backend

Alitheia Core supports two database backends: H2 and MySQL.

**Note: The configuration should always be enabled prior to compilation.**

By default, Alitheia Core uses H2 (http://www.h2database.com/html/main.html) as
its database backend. This should be ok for a local installation and experimentation, but in general it is recommended to use MySQL.

##### Enabling Support for MySQL

To enable support for MySQL the following steps must be followed:

1. Edit the file `Alitheia­‐Core/pom.xml`:

a. Comment out the following lines:
```xml
<eu.sqooss.db>H2</eu.sqooss.db>
<eu.sqooss.db.host>localhost</eu.sqooss.db.host>
<eu.sqooss.db.schema>alitheia;LOCK_MODE=3;MULTI_THREADED=true</eu.sqooss.db.sche
ma>
<eu.sqooss.db.user>sa</eu.sqooss.db.user>
<eu.sqooss.db.passwd></eu.sqooss.db.passwd>
<eu.sqooss.db.conpool>c3p0</eu.sqooss.db.conpool>
```
b. Uncomment the following lines:
```xml
<eu.sqooss.db>MySQL</eu.sqooss.db>
<eu.sqooss.db.host>localhost</eu.sqooss.db.host>
<eu.sqooss.db.schema>alitheia</eu.sqooss.db.schema>
<eu.sqooss.db.user>alitheia</eu.sqooss.db.user>
<eu.sqooss.db.passwd>alitheia</eu.sqooss.db.passwd>
<eu.sqooss.db.conpool>c3p0</eu.sqooss.db.conpool>
```
2. Edit the MySQL main configuration file (usually named `/etc/my.cnf`) and add the
following lines:
```
default-­‐storage-­‐engine=innodb
transaction_isolation=READ-­‐COMMITTED
```
The above lines enable innodb as default.

3. Create an empty database named `alitheia`. Then create a database user named
`alitheia` with password `alitheia` and grant full control over the database
(@localhost):
```sql
CREATE USER 'alitheia'@'localhost' IDENTIFIED BY 'alitheia';
CREATE DATABASE alitheia;
GRANT ALL PRIVILEGES ON alitheia.* TO alitheia@'localhost';
```

#### Building the project

* To build the project, do:

`mvn install`

* To run Alitheia Core, you need to configure a database first. Consult the
online Quickstart guide at http://www.sqo-oss.org/quickstart
on how to do it. Then, run:
#### Run the project

* To run Alitheia Core, run:

`mvn pax:provision`

Then visit the web interface: [http://localhost:8080](http://localhost:8080)

* To see the results of runned plugins of projects, run the following from the web folder:

```mvn jetty:run```

Then visit the web interface: [http://localhost:8081](http://localhost:8081)

* To debug Alitheia Core (on Unix-based systems):
```
mvn install pax:provision`
mvn install pax:provision
[quit the OSGi prompt]
./debug.sh
```
Expand All @@ -94,3 +152,4 @@ Maven from the following link: http://maven.apache.org/
Any tool can be used to write code for Alitheia Core, but using Eclipse will
simplify things a lot. Instructions can be found in IDE.md


Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package eu.sqoooss.admin.test;
package eu.sqooss.admin.test;

import static org.junit.Assert.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package eu.sqoooss.admin.test;
package eu.sqooss.admin.test;

import eu.sqooss.service.admin.AdminActionBase;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package eu.sqoooss.admin.test;
package eu.sqooss.admin.test;

import eu.sqooss.service.admin.AdminActionBase;

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@
<configuration>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
<source>1.6</source>
<target>1.6</target>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit 686b068

Please sign in to comment.