Skip to content

Commit e48f7f7

Browse files
committed
import: I didn't had the time to scrub correctly the whole history, so yeah, tabula rasa
0 parents  commit e48f7f7

File tree

503 files changed

+62380
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

503 files changed

+62380
-0
lines changed

.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.classpath
2+
.project
3+
.settings
4+
target
5+
6+
# Intellij
7+
.idea/
8+
*.iml
9+
*.iws
10+
workspace.xml
11+
coverage-error.log
12+
13+
# Vagrant
14+
.vagrant/
15+
oracle-xe-11.2.0-1.0.x86_64.rpm.zip

LICENSE-GPLv3.txt

+674
Large diffs are not rendered by default.

README.txt

+209
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
README
2+
######
3+
4+
ABOUT
5+
#####
6+
7+
Lavagna is a small and easy to use agile issue/project tracking software.
8+
9+
It require : java 7 or better, mysql (5.1 or better) or postgresql. It can be deployed in a java servlet container.
10+
11+
12+
INSTALL
13+
#######
14+
15+
Lavagna support mysql (at least 5.1) / pgsql for production use and hsqldb for testing purpose.
16+
17+
It's distributed in 2 forms:
18+
19+
- simple war for deploying in your preferred web container
20+
- self contained war with embedded jetty web server
21+
22+
For trial purpose
23+
-----------------
24+
25+
If you want to test it locally, you can download the self contained war and run (java 7 or greater required):
26+
27+
>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
28+
29+
Go to http://localhost:8080 and login with "user" (password "user").
30+
31+
Setup
32+
-----
33+
34+
Lavagna require the following property to be set on the jvm:
35+
36+
- datasource.driver=org.hsqldb.jdbcDriver | com.mysql.jdbc.Driver | org.postgresql.Driver
37+
- datasource.dialect=HSQLDB | MYSQL | PGSQL
38+
- datasource.url= for example: jdbc:hsqldb:mem:lavagna | jdbc:mysql://localhost:3306/lavagna | jdbc:postgresql://localhost:5432/lavagna
39+
- datasource.username=<username>
40+
- datasource.password=<pwd>
41+
- spring.profile.active= dev | prod
42+
43+
The db user must be able to create tables and others db objects.
44+
45+
Once the application has been started/deployed, go to
46+
47+
http(s)://<your deploy>(:port)/setup/
48+
49+
There you can:
50+
51+
1: configure the application
52+
2: import a lavagna export
53+
54+
Configuration steps
55+
-------------------
56+
57+
step 1: define the base url
58+
step 2: define the initial login configuration (demo, ldap, oauth, mozilla persona)
59+
step 3: define the admin user
60+
step 4: confirm
61+
62+
63+
DEVELOP
64+
#######
65+
66+
IDE Configuration
67+
=================
68+
69+
This project use project lombok annotations, you will need to install the support in your IDE.
70+
71+
Use UTF-8 encoding.
72+
73+
74+
Execute
75+
=======
76+
77+
launch web server:
78+
79+
# mvn jetty:run
80+
81+
for launching web server + db manager (hsqldb only)
82+
83+
# mvn jetty:run -DstartDBManager
84+
85+
for launching web server with the mysql database (use mysql profile):
86+
87+
# mvn jetty:run -Pdev-mysql
88+
89+
# mvn jetty:run -Pdev-pgsql
90+
91+
- go to http://localhost:8080
92+
if you have a 403 error, you must configure the application,
93+
go to http://localhost:8080/setup, select demo + insert user "user".
94+
95+
- enter
96+
username: user
97+
password: user
98+
99+
For debugging
100+
101+
# mvndebug jetty:run
102+
103+
For running the test cases
104+
105+
# mvn test
106+
107+
For running the test cases with mysql or pgsql
108+
109+
# mvn test -Ddatasource.dialect=MYSQL
110+
111+
# mvn test -Ddatasource.dialect=PGSQL
112+
113+
114+
For running with jetty-runner:
115+
116+
# mvn clean install
117+
# 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
118+
119+
VAGRANT
120+
=============
121+
122+
Make sure that you have installed Vagrant and VirtualBox.
123+
124+
Initialization
125+
--------------
126+
127+
Fetch the submodules before:
128+
129+
# git submodule update --init
130+
131+
If you are under windows you need to ensure that the pgsql submodule is not in a broken state,
132+
ensure that the file puppet\modules\postgresql\files\validate_postgresql_connection.sh is using the
133+
unix end of line (run dos2unix).
134+
135+
To run the tests with Vagrant boot the VMs with
136+
137+
# vagrant up [optionally use pgsql / mysql to boot only one VM]
138+
139+
Once that the VM is up and running run the tests:
140+
141+
# mvn test -Ddatasource.dialect=PGSQL / MYSQL
142+
143+
144+
Connecting manually:
145+
--------------------
146+
147+
PGSQL: localhost:5432/lavagna as postgres / password
148+
149+
MySQL: localhost:3306/lavagna as root
150+
151+
Oracle: localhost:1521/XE as system / manager
152+
153+
Notes about databases:
154+
----------------------
155+
156+
The application use UTF-8 at every stage, on mysql you will need to create a database with the collation set to utf8_bin :
157+
158+
CREATE DATABASE lavagna CHARACTER SET utf8 COLLATE utf8_bin;
159+
160+
161+
162+
163+
Oracle support:
164+
---------------
165+
166+
First add the vbguest plugin:
167+
168+
# vagrant plugin install vagrant-vbguest
169+
170+
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
171+
172+
# vagrant plugin install vagrant-login
173+
174+
175+
Download Oracle Database 11g Express Edition for Linux x64 from ( http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html )
176+
177+
Place the file oracle-xe-11.2.0-1.0.x86_64.rpm.zip in the directory puppet/modules/oracle/files of this project.
178+
179+
Thanks to Hilverd Reker for his GitHub repo: https://github.com/hilverd/vagrant-ubuntu-oracle-xe .
180+
181+
182+
183+
CODE COVERAGE
184+
=============
185+
186+
Jacoco plugin is used.
187+
188+
# mvn install site
189+
190+
-> open target/site/jacoco/index.html with your browser
191+
192+
DATABASE MIGRATION
193+
==================
194+
195+
Can be disabled using the following system property: datasource.disable.migration=true
196+
197+
198+
CHECK FOR UPDATED DEPENDENCIES
199+
==============================
200+
201+
Note:
202+
203+
- hsqldb atm will not be updated to version 2.3.2 due to a bug
204+
(default null+unique clause has changed)
205+
- tomcat-jdbc will not be updated to version 8.0.9 due to a strange
206+
class loader interaction with log4j when launching with mvn jetty:run
207+
208+
mvn versions:display-dependency-updates
209+
mvn versions:display-plugin-updates

README_EXECUTABLE_WAR.txt

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
A second war named lavagna-jetty-console.war will be built. Inside there is an embedded jetty.
2+
3+
You must provide the following properties:
4+
5+
- datasource.driver=org.hsqldb.jdbcDriver | com.mysql.jdbc.Driver | org.postgresql.Driver
6+
- datasource.dialect=HSQLDB | MYSQL | PGSQL
7+
- datasource.url= for example: jdbc:hsqldb:mem:lavagna | jdbc:mysql://localhost:3306/lavagna | jdbc:postgresql://localhost:5432/lavagna
8+
- datasource.username=<username>
9+
- datasource.password=<pwd>
10+
- spring.profile.active= dev | prod
11+
12+
For example:
13+
14+
>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
15+
16+
17+
You can set port and others options too, see: http://simplericity.com/2009/11/10/1257880778509.html

README_OPENSHIFT_HEROKU.txt

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Openshift:
2+
3+
using this cartridge
4+
http://cartreflect-claytondev.rhcloud.com/reflect?github=Worldline/openshift-cartridge-jetty-websocket
5+
6+
https://github.com/worldline/openshift-cartridge-jetty-websocket
7+
8+
9+
10+
Heroku:
11+
12+
Relevant urls:
13+
14+
- https://devcenter.heroku.com/articles/deploy-a-java-web-application-that-launches-with-jetty-runner
15+
- https://devcenter.heroku.com/articles/connecting-to-relational-databases-on-heroku-with-java
16+
- https://devcenter.heroku.com/articles/heroku-labs-websockets
17+
18+
Procfile content:
19+
--------------------
20+
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
21+
--------------------
22+
23+
system.properties content:
24+
--------------------
25+
java.runtime.version=1.7
26+
--------------------

Vagrantfile

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
VAGRANTFILE_API_VERSION = "2"
2+
3+
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
4+
5+
config.vm.define 'pgsql' do |pgsql|
6+
pgsql.vm.box = 'precise64'
7+
pgsql.vm.box_url = "http://files.vagrantup.com/precise64.box"
8+
9+
pgsql.vm.network 'forwarded_port', guest: 5432, host: 5432
10+
11+
pgsql.vm.provision 'puppet' do |puppet|
12+
puppet.module_path = 'puppet/modules'
13+
puppet.manifests_path = 'puppet/manifests'
14+
puppet.manifest_file = 'pgsql.pp'
15+
puppet.facter = {
16+
'db' => 'lavagna'
17+
}
18+
end
19+
20+
end
21+
22+
config.vm.define 'mysql' do |mysql|
23+
mysql.vm.box = 'precise64'
24+
mysql.vm.box_url = "http://files.vagrantup.com/precise64.box"
25+
26+
mysql.vm.network "forwarded_port", guest: 3306, host: 3306
27+
28+
mysql.vm.provision "puppet" do |puppet|
29+
puppet.module_path = 'puppet/modules'
30+
puppet.manifests_path = 'puppet/manifests'
31+
puppet.manifest_file = 'mysql.pp'
32+
puppet.facter = {
33+
'db' => 'lavagna'
34+
}
35+
end
36+
37+
end
38+
39+
config.vm.define 'oracle' do |oracle|
40+
oracle.vm.box = 'precise64'
41+
oracle.vm.box_url = "http://files.vagrantup.com/precise64.box"
42+
oracle.vm.hostname = "oracle"
43+
44+
oracle.vm.network :forwarded_port, guest: 1521, host: 1521
45+
46+
oracle.vm.provider :virtualbox do |vb|
47+
vb.customize ["modifyvm", :id,
48+
"--name", "oracle",
49+
"--memory", "512",
50+
"--natdnshostresolver1", "on"]
51+
end
52+
53+
oracle.vm.provision :shell, :inline => "echo \"America/New_York\" | sudo tee /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata"
54+
55+
oracle.vm.provision :puppet do |puppet|
56+
puppet.manifests_path = "puppet/manifests"
57+
puppet.module_path = "puppet/modules"
58+
puppet.manifest_file = "oracle.pp"
59+
puppet.options = "--verbose --trace"
60+
end
61+
62+
end
63+
end

misc/NOTES.txt

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
REST API return data
2+
3+
GET:
4+
- success: data / failure: exception
5+
6+
DELETE:
7+
- success: 1/0 / failure: exception
8+
9+
ADD (no duplicates):
10+
- success: nothing / failure: exception
11+
12+
ADD (duplicates):
13+
- success: IDs / failure: exception
14+
15+
UPDATE:
16+
- success: nothing / failure: exception
17+
18+
this will affect the return types of the services/controllers.

misc/OAUTH_LOGIN.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
For google, you should enable the following apis:
2+
3+
- Google+ API
4+
- Google+ Domains API

0 commit comments

Comments
 (0)