Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
import: I didn't had the time to scrub correctly the whole history, s…
…o yeah, tabula rasa
- Loading branch information
0 parents
commit e48f7f7
Showing
503 changed files
with
62,380 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.classpath | ||
.project | ||
.settings | ||
target | ||
|
||
# Intellij | ||
.idea/ | ||
*.iml | ||
*.iws | ||
workspace.xml | ||
coverage-error.log | ||
|
||
# Vagrant | ||
.vagrant/ | ||
oracle-xe-11.2.0-1.0.x86_64.rpm.zip |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,209 @@ | ||
README | ||
###### | ||
|
||
ABOUT | ||
##### | ||
|
||
Lavagna is a small and easy to use agile issue/project tracking software. | ||
|
||
It require : java 7 or better, mysql (5.1 or better) or postgresql. It can be deployed in a java servlet container. | ||
|
||
|
||
INSTALL | ||
####### | ||
|
||
Lavagna support mysql (at least 5.1) / pgsql for production use and hsqldb for testing purpose. | ||
|
||
It's distributed in 2 forms: | ||
|
||
- simple war for deploying in your preferred web container | ||
- self contained war with embedded jetty web server | ||
|
||
For trial purpose | ||
----------------- | ||
|
||
If you want to test it locally, you can download the self contained war and run (java 7 or greater required): | ||
|
||
>java -Ddatasource.driver=org.hsqldb.jdbcDriver -Ddatasource.dialect=HSQLDB -Ddatasource.url=jdbc:hsqldb:mem:lavagna -Ddatasource.username=sa -Ddatasource.password= -Dspring.profile.active=dev -jar lavagna-jetty-console.war --headless | ||
|
||
Go to http://localhost:8080 and login with "user" (password "user"). | ||
|
||
Setup | ||
----- | ||
|
||
Lavagna require the following property to be set on the jvm: | ||
|
||
- datasource.driver=org.hsqldb.jdbcDriver | com.mysql.jdbc.Driver | org.postgresql.Driver | ||
- datasource.dialect=HSQLDB | MYSQL | PGSQL | ||
- datasource.url= for example: jdbc:hsqldb:mem:lavagna | jdbc:mysql://localhost:3306/lavagna | jdbc:postgresql://localhost:5432/lavagna | ||
- datasource.username=<username> | ||
- datasource.password=<pwd> | ||
- spring.profile.active= dev | prod | ||
|
||
The db user must be able to create tables and others db objects. | ||
|
||
Once the application has been started/deployed, go to | ||
|
||
http(s)://<your deploy>(:port)/setup/ | ||
|
||
There you can: | ||
|
||
1: configure the application | ||
2: import a lavagna export | ||
|
||
Configuration steps | ||
------------------- | ||
|
||
step 1: define the base url | ||
step 2: define the initial login configuration (demo, ldap, oauth, mozilla persona) | ||
step 3: define the admin user | ||
step 4: confirm | ||
|
||
|
||
DEVELOP | ||
####### | ||
|
||
IDE Configuration | ||
================= | ||
|
||
This project use project lombok annotations, you will need to install the support in your IDE. | ||
|
||
Use UTF-8 encoding. | ||
|
||
|
||
Execute | ||
======= | ||
|
||
launch web server: | ||
|
||
# mvn jetty:run | ||
|
||
for launching web server + db manager (hsqldb only) | ||
|
||
# mvn jetty:run -DstartDBManager | ||
|
||
for launching web server with the mysql database (use mysql profile): | ||
|
||
# mvn jetty:run -Pdev-mysql | ||
|
||
# mvn jetty:run -Pdev-pgsql | ||
|
||
- go to http://localhost:8080 | ||
if you have a 403 error, you must configure the application, | ||
go to http://localhost:8080/setup, select demo + insert user "user". | ||
|
||
- enter | ||
username: user | ||
password: user | ||
|
||
For debugging | ||
|
||
# mvndebug jetty:run | ||
|
||
For running the test cases | ||
|
||
# mvn test | ||
|
||
For running the test cases with mysql or pgsql | ||
|
||
# mvn test -Ddatasource.dialect=MYSQL | ||
|
||
# mvn test -Ddatasource.dialect=PGSQL | ||
|
||
|
||
For running with jetty-runner: | ||
|
||
# mvn clean install | ||
# java -Ddatasource.dialect=HSQLDB -Ddatasource.driver=org.hsqldb.jdbcDriver -Ddatasource.url=jdbc:hsqldb:mem:lavagna -Ddatasource.username=sa -Ddatasource.password= -Dspring.profiles.active=dev -jar target/dependency/jetty-runner.jar --port 8080 target/*.war | ||
|
||
VAGRANT | ||
============= | ||
|
||
Make sure that you have installed Vagrant and VirtualBox. | ||
|
||
Initialization | ||
-------------- | ||
|
||
Fetch the submodules before: | ||
|
||
# git submodule update --init | ||
|
||
If you are under windows you need to ensure that the pgsql submodule is not in a broken state, | ||
ensure that the file puppet\modules\postgresql\files\validate_postgresql_connection.sh is using the | ||
unix end of line (run dos2unix). | ||
|
||
To run the tests with Vagrant boot the VMs with | ||
|
||
# vagrant up [optionally use pgsql / mysql to boot only one VM] | ||
|
||
Once that the VM is up and running run the tests: | ||
|
||
# mvn test -Ddatasource.dialect=PGSQL / MYSQL | ||
|
||
|
||
Connecting manually: | ||
-------------------- | ||
|
||
PGSQL: localhost:5432/lavagna as postgres / password | ||
|
||
MySQL: localhost:3306/lavagna as root | ||
|
||
Oracle: localhost:1521/XE as system / manager | ||
|
||
Notes about databases: | ||
---------------------- | ||
|
||
The application use UTF-8 at every stage, on mysql you will need to create a database with the collation set to utf8_bin : | ||
|
||
CREATE DATABASE lavagna CHARACTER SET utf8 COLLATE utf8_bin; | ||
|
||
|
||
|
||
|
||
Oracle support: | ||
--------------- | ||
|
||
First add the vbguest plugin: | ||
|
||
# vagrant plugin install vagrant-vbguest | ||
|
||
Note: if you have an error while installing the vagrant-vbguest plugin, see https://github.com/WinRb/vagrant-windows/issues/193 , install before the vagrant-login plugin with | ||
|
||
# vagrant plugin install vagrant-login | ||
|
||
|
||
Download Oracle Database 11g Express Edition for Linux x64 from ( http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html ) | ||
|
||
Place the file oracle-xe-11.2.0-1.0.x86_64.rpm.zip in the directory puppet/modules/oracle/files of this project. | ||
|
||
Thanks to Hilverd Reker for his GitHub repo: https://github.com/hilverd/vagrant-ubuntu-oracle-xe . | ||
|
||
|
||
|
||
CODE COVERAGE | ||
============= | ||
|
||
Jacoco plugin is used. | ||
|
||
# mvn install site | ||
|
||
-> open target/site/jacoco/index.html with your browser | ||
|
||
DATABASE MIGRATION | ||
================== | ||
|
||
Can be disabled using the following system property: datasource.disable.migration=true | ||
|
||
|
||
CHECK FOR UPDATED DEPENDENCIES | ||
============================== | ||
|
||
Note: | ||
|
||
- hsqldb atm will not be updated to version 2.3.2 due to a bug | ||
(default null+unique clause has changed) | ||
- tomcat-jdbc will not be updated to version 8.0.9 due to a strange | ||
class loader interaction with log4j when launching with mvn jetty:run | ||
|
||
mvn versions:display-dependency-updates | ||
mvn versions:display-plugin-updates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
A second war named lavagna-jetty-console.war will be built. Inside there is an embedded jetty. | ||
|
||
You must provide the following properties: | ||
|
||
- datasource.driver=org.hsqldb.jdbcDriver | com.mysql.jdbc.Driver | org.postgresql.Driver | ||
- datasource.dialect=HSQLDB | MYSQL | PGSQL | ||
- datasource.url= for example: jdbc:hsqldb:mem:lavagna | jdbc:mysql://localhost:3306/lavagna | jdbc:postgresql://localhost:5432/lavagna | ||
- datasource.username=<username> | ||
- datasource.password=<pwd> | ||
- spring.profile.active= dev | prod | ||
|
||
For example: | ||
|
||
>java -Ddatasource.driver=org.hsqldb.jdbcDriver -Ddatasource.dialect=HSQLDB -Ddatasource.url=jdbc:hsqldb:mem:lavagna -Ddatasource.username=sa -Ddatasource.password= -Dspring.profile.active=dev -jar lavagna-jetty-console.war --headless | ||
|
||
|
||
You can set port and others options too, see: http://simplericity.com/2009/11/10/1257880778509.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Openshift: | ||
|
||
using this cartridge | ||
http://cartreflect-claytondev.rhcloud.com/reflect?github=Worldline/openshift-cartridge-jetty-websocket | ||
|
||
https://github.com/worldline/openshift-cartridge-jetty-websocket | ||
|
||
|
||
|
||
Heroku: | ||
|
||
Relevant urls: | ||
|
||
- https://devcenter.heroku.com/articles/deploy-a-java-web-application-that-launches-with-jetty-runner | ||
- https://devcenter.heroku.com/articles/connecting-to-relational-databases-on-heroku-with-java | ||
- https://devcenter.heroku.com/articles/heroku-labs-websockets | ||
|
||
Procfile content: | ||
-------------------- | ||
web: java $JAVA_OPTS -Ddatasource.dialect=PGSQL -Ddatasource.driver=org.postgresql.Driver -Ddatasource.url=$DATABASE_URL -Dspring.profiles.active=prod -jar target/dependency/jetty-runner.jar --port $PORT target/*.war | ||
-------------------- | ||
|
||
system.properties content: | ||
-------------------- | ||
java.runtime.version=1.7 | ||
-------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
VAGRANTFILE_API_VERSION = "2" | ||
|
||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | ||
|
||
config.vm.define 'pgsql' do |pgsql| | ||
pgsql.vm.box = 'precise64' | ||
pgsql.vm.box_url = "http://files.vagrantup.com/precise64.box" | ||
|
||
pgsql.vm.network 'forwarded_port', guest: 5432, host: 5432 | ||
|
||
pgsql.vm.provision 'puppet' do |puppet| | ||
puppet.module_path = 'puppet/modules' | ||
puppet.manifests_path = 'puppet/manifests' | ||
puppet.manifest_file = 'pgsql.pp' | ||
puppet.facter = { | ||
'db' => 'lavagna' | ||
} | ||
end | ||
|
||
end | ||
|
||
config.vm.define 'mysql' do |mysql| | ||
mysql.vm.box = 'precise64' | ||
mysql.vm.box_url = "http://files.vagrantup.com/precise64.box" | ||
|
||
mysql.vm.network "forwarded_port", guest: 3306, host: 3306 | ||
|
||
mysql.vm.provision "puppet" do |puppet| | ||
puppet.module_path = 'puppet/modules' | ||
puppet.manifests_path = 'puppet/manifests' | ||
puppet.manifest_file = 'mysql.pp' | ||
puppet.facter = { | ||
'db' => 'lavagna' | ||
} | ||
end | ||
|
||
end | ||
|
||
config.vm.define 'oracle' do |oracle| | ||
oracle.vm.box = 'precise64' | ||
oracle.vm.box_url = "http://files.vagrantup.com/precise64.box" | ||
oracle.vm.hostname = "oracle" | ||
|
||
oracle.vm.network :forwarded_port, guest: 1521, host: 1521 | ||
|
||
oracle.vm.provider :virtualbox do |vb| | ||
vb.customize ["modifyvm", :id, | ||
"--name", "oracle", | ||
"--memory", "512", | ||
"--natdnshostresolver1", "on"] | ||
end | ||
|
||
oracle.vm.provision :shell, :inline => "echo \"America/New_York\" | sudo tee /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata" | ||
|
||
oracle.vm.provision :puppet do |puppet| | ||
puppet.manifests_path = "puppet/manifests" | ||
puppet.module_path = "puppet/modules" | ||
puppet.manifest_file = "oracle.pp" | ||
puppet.options = "--verbose --trace" | ||
end | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
REST API return data | ||
|
||
GET: | ||
- success: data / failure: exception | ||
|
||
DELETE: | ||
- success: 1/0 / failure: exception | ||
|
||
ADD (no duplicates): | ||
- success: nothing / failure: exception | ||
|
||
ADD (duplicates): | ||
- success: IDs / failure: exception | ||
|
||
UPDATE: | ||
- success: nothing / failure: exception | ||
|
||
this will affect the return types of the services/controllers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
For google, you should enable the following apis: | ||
|
||
- Google+ API | ||
- Google+ Domains API |
Oops, something went wrong.