Skip to content

Commit b8fd6e9

Browse files
committed
Cache Maven dependencies in CircleCI
1 parent e19f530 commit b8fd6e9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.circleci/config.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,22 @@ jobs:
66
- image: cimg/openjdk:8.0
77
steps:
88
- checkout
9+
- restore_cache:
10+
keys:
11+
# when lock file changes, use increasingly general patterns to restore cache
12+
- maven-repo-v1-{{ .Branch }}-{{ checksum "pom.xml" }}
13+
- maven-repo-v1-{{ .Branch }}-
14+
- maven-repo-v1-
915
- run:
1016
name: Build
1117
command: mvn -B -DskipTests clean package
1218
- run:
1319
name: Test
1420
command: mvn verify
21+
- save_cache:
22+
paths:
23+
- ~/.m2
24+
key: maven-repo-v1-{{ .Branch }}-{{ checksum "pom.xml" }}
1525

1626
workflows:
1727
ci:

0 commit comments

Comments
 (0)