forked from alphazero/jredis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
117 lines (80 loc) · 3.64 KB
/
README
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
(This README is mainly addressing the project structure and build. For information
about JRedis, please see the RELEASE-NOTES.)
----------------------------------------------------------
BUILD
----------------------------------------------------------
* Requirements:
- maven
Project uses Maven 2 as the build management system. You
will need maven to conveniently build and package the
project jars.
Project master is built on Mac OS X 10.5 using maven 2.0.9.
* howto
Project is not yet using assemblies, but is a multi-module
maven build with master POM in root directory (where you
found this document).
Each module has its own pom, but you will need to run maven
with specific goals at the level of a major sub-module. As
of now (intial release alpha.0-04152009) that translates to
a 'Core' and an 'Examples'.
If you wish to use JRedis only you will need the product of
the Core-RI (reference implementation).
If you wish to run benchmarks + use JRedis, you will also
need to build the Core-BENCHMARK.
Simplest thing to do is to run maven with goal package at
the Core module level. This will initiate and build each
module in Core:
API - The specifications, which are mostly interfaces.
RI - The reference implementation, which is you will use.
BENCH - The benchmark classes
ALL - A convenience virtual module that will build a
unified jar of all modules besides itself in Core.
On command line in ~/core/., issue:
mvn install
This will compile, test, package, and install JRedis
core artifacts in your local repository and create a
set of jars in each core module's 'target' directory.
The pom of the Core as well as the super pom in the root
folder use a source attachment plugin, so a source jar
will also be created for each module.
The poms of core-ri, core-bench, and core-all use a
include dependencies mechanism which will build, besides
the individual module's jar, an aggregate unified jar of
the module's classes + the classes of any dependency it
has declared. (Only install goal will do this -- package
goal will simply create the module's own jar file(s)).
For example, issuing mvn install from core will create
in module core-bench's target directory the class and
source jars for the BENCH module + a single jar containing
all dependencies, which for BENCH are 'API' and 'RI'.
The build system uses a structured naming convention
which results in longish names, but it is very effective.
(You can obviously simply change the jar names when you
deploy to your application's lib or jvm classpath as you
see fit.)
The super pom in project root will initiate the same for
all modules of JRedis, which as of now are CORE, and
EXAMPLES. (Same considerations apply here.)
**** IMPORTANT NOTE REGARDING UNIT TEST ****
Running unit tests is absolutely critical to a sane process
for developing JRedis, given that it is subject to a very
demanding refactoring regime (as it is a work in progress).
That means testing is critical for the master copy and
accordingly ALL poms in the project require SUCCESSFUL
tests after compile before continuing.
**** REDIS MUST BE RUNNING ON LOCALHOST *****
So, as tests on a connector without a server are fairly
pointless, this project will NOT build unless you have
your localhost (6379) Redis server running.
**** BUILD USES PASSWORD 'jredis' ****
If you do not have password set on your redis, no
worries.
If you do, the build will fail, unless you do one
of the following:
1) Change the password in core/pom.xml to match your
password in redis.conf
2) Alternatively tell maven to skip tests:
mvn -Dmaven.test.skip=true install
**** REMEMBER: TESTS WILL FLUSH DBS 13 AND 10 *****
-
04-21-09