-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Building.txt
43 lines (26 loc) · 1.64 KB
/
Building.txt
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
0. Unit test in IDE under Windows
==========================================================
Run redis in docker:
docker run --rm -it -p 6379-6381:6379-6381 -p 26379-26381:26379-26381 areyouok/redis-sentinel
It starts 3 sentinel instances (port 16379,16380,16381) and 3 redis servers(port 6379,6380,6381) and can be connected from 127.0.0.1
Then you can run tests in IDE or command line, but all tests which need redis cluster mode will be skipped.
1. Unit test (to run all tests)
==========================================================
1.1 Run redis
At first we run redis server using Docker, under jetcache directory, run:
docker compose up
This will run 1 redis server with 2 slaves, 3 sentinels, and 6 redis cluster node (3 masters, 3 slaves).
1.2.a Run tests in Linux
mvn clean test
1.2.b Run tests in macOS
docker run -it --rm --network host -v $HOME/.m2:/root/.m2 -v `pwd`:/usr/src/mymaven -w /usr/src/mymaven maven:3.9-eclipse-temurin-17 mvn clean test
1.2.c Run tests in Windows
docker run -it --rm --network host -v /c/Users/hl_20/.m2:/root/.m2 -v /c/Users/hl_20/IdeaProjects/jetcache/jetcache:/usr/src/mymaven -w /usr/src/mymaven maven:3.9-eclipse-temurin-17 mvn clean test
You need change /c/Users/hl_20 and /c/Users/hl_20/IdeaProjects/jetcache/jetcache to your local path.
2. Change pom version
==========================================================
Use this command to change version in all pom file:
mvn versions:set -DnewVersion=x.x.x-SNAPSHOT -DprocessAllModules=true
3. Building your own version
===========================================================
mvn -DskipTests clean install