-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathBUILDING.txt
More file actions
129 lines (90 loc) · 4.13 KB
/
BUILDING.txt
File metadata and controls
129 lines (90 loc) · 4.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
Maven
-----
Diffa is maven built using Maven. Currently version 3.0.3 is supported.
Maven Proxy
-----------
In order to download artifacts not available in Maven central, you can use the Diffa repository. To do so,
add the following to your $M2_HOME/settings.xml:
In the profiles block:
<profile>
<id>diffa-repo</id>
<repositories>
<repository>
<id>diffa</id>
<url>https://nexus.lshift.net/nexus/content/groups/public</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>diffa</id>
<url>https://nexus.lshift.net/nexus/content/groups/public</url>
</pluginRepository>
</pluginRepositories>
</profile>
And in the activeProfiles block:
<activeProfile>diffa-repo</activeProfile>
Scala
-----
Diffa is written mostly in Scala. Due to Scala's class post-processing mechanism, we tend to find that the default Perm Gen settings get exhausted quite quickly.
So before you perform any of the Maven commands, please give the JVM a little more Perm Gen:
On Unix:
export MAVEN_OPTS=-XX:MaxPermSize=512m
Or on Windows:
set MAVEN_OPTS=-XX:MaxPermSize=512m
This is also documented in the README.maven_opts.txt file for an easy copy and paste.
Building
--------
Please do not overlook the previous note about perm gen. To build Diffa, just use the mvn install command from the root directory:
$ mvn install
This will run the the test suite that comes with Diffa.
To verify against a database other than the default (hsqldb), follow the instructions below.
* Oracle DBMS
Note: please refer to the README for further details on using this profile.
Set profile to 'oracle' (-Poracle)
Set these parameters (either MAVEN_OPTS="-Dparam1 -Dparam2 ..." or mvn -Dparam1 -Dparam2 ...)
diffa.jdbc.driver=oracle.jdbc.OracleDriver
diffa.hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
diffa.jdbc.sys.url=<URL of the target Oracle database instance>
diffa.jdbc.sys.username=<username of a privileged Oracle database user>
diffa.jdbc.sys.password=<password of the above user>
diffa.jdbc.url=<same as diffa.jdbc.sys.url>
diffa.jdbc.username=<username of the owner of the diffa agent database>
diffa.jdbc.password=<the owning user's password>
Note on diffa.jdbc.sys.username
The user identified by this username must have privileges to create a schema
and grant create session and dba privileges. This user is only needed for
testing; in a production environment, the application database user is
provisioned manually with suitable privileges.
Note on diffa.jdbc.username/password
This user is created during the testing/verification process. The user MUST
NOT be the same as diffa.jdbc.sys.username.
* MySQL
Set profile to 'mysql' (-Pmysql)
Set these parameters (either MAVEN_OPTS="-Dparam1 -Dparam2 ..." or mvn -Dparam1 -Dparam2 ...)
diffa.jdbc.driver=com.mysql.jdbc.Driver
diffa.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
diffa.jdbc.dbname=<name of the diffa agent database to create>
diffa.jdbc.sys.url=<URL of the base MySQL instance (without database name)>
diffa.jdbc.sys.username=<username of a privileged MySQL database user (will
create the db owner)>
diffa.jdbc.sys.password=<password of the above user>
diffa.jdbc.url=<URL of the target MySQL database (with database name)>
diffa.jdbc.username=<username of the owner of the diffa agent database>
diffa.jdbc.password=<the owning user's password>
Booting The Agent
-----------------
The Diffa agent can be run using the Jetty plugin:
$ cd agent
$ mvn jetty:run
Booting The Demo Participants
-----------------------------
Diffa comes with a demo application that provides two fake participants. This can also be run using the Jetty plugin:
$ cd participants-web
$ mvn jetty:run
License Checking
----------------
Diffa uses the maven license plugin (http://code.google.com/p/maven-license-plugin/) to check that the license files are up to date.
To run the license check:
$ mvn -e license:format -Dyear=2010-2011
To reformat each file according to the header file:
$ mvn -e license:format -Dyear=2010-2011