-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makesurefile
60 lines (46 loc) · 1.45 KB
/
Makesurefile
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
@options silent
@define PROJ_NAME="cmltemplate"
@define MYSQL="cmltemplate-mysql"
@define POSTGRES="cmltemplate-postgres"
@define MONGO="cmltemplate-mongo"
@define RABBIT="cmltemplate-rabbit"
@goal mvnw_update
@doc 'updates mvnw'
./mvnw wrapper:wrapper # https://maven.apache.org/wrapper/index.html
@goal mysqld
@doc 'runs Mysql server'
docker-compose --project-name "$MYSQL" -f docker-compose/mysql.yml up
@goal mysql
@doc 'connects to Mysql CLI'
docker exec -it "$MYSQL" mysql "$PROJ_NAME" -u"$PROJ_NAME" -p"$PROJ_NAME"
@goal postgresd
@doc 'runs Postgresql server'
docker-compose --project-name "$POSTGRES" -f docker-compose/postgresql.yml up
@goal postgres
@doc 'connects to Postgresql CLI'
docker exec -it "$POSTGRES" psql --username="$PROJ_NAME" --dbname="$PROJ_NAME"
@goal rabbitmq
@doc 'runs RabbitMQ server'
docker-compose --project-name "$RABBIT" -f docker-compose/rabbitmq.yml up
@goal mongod
@doc 'runs Mongodb server'
docker-compose --project-name "$MONGO" -f docker-compose/mongo.yml up
@goal mongo
@doc 'connects to mongo CLI'
docker exec -it "$MONGO" mongo
@goal run
@doc 'runs the app'
export JAVA_HOME=~/.sdkman/candidates/java/current/
./mvnw spring-boot:run
@goal test
@doc 'runs tests'
./mvnw test
@goal clean
@doc 'cleans the project'
./mvnw clean
@goal deps
@doc 'displays maven dependency updates'
./mvnw versions:display-dependency-updates
@goal dependency_tree
@doc 'display dependency tree'
./mvnw dependency:tree