File tree 1 file changed +10
-1
lines changed 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 14
14
build :
15
15
runs-on : [self-hosted]
16
16
container : maven:3.8.6-openjdk-11
17
+ env :
18
+ # This is needed, as java doesn't respect the environment variable $HOME, but gets the
19
+ # user home by other means from the system. The default user in the above container is
20
+ # 'root' with the home at '/root', while GitHub runner overrides $HOME to the mounted
21
+ # '/github/home'. As a result, maven uses the ~/.m2 at a different location than assumed
22
+ # by the standard GitHub actions like 'actions/setup-java', causing caching of the maven
23
+ # local repository not working.
24
+ # TODO(2K): This can be better solved by preparing a custom image for the container.
25
+ MAVEN_OPTS : -Duser.home=/github/home
17
26
strategy :
18
27
matrix :
19
28
java-version : [11]
27
36
distribution : ' adopt'
28
37
cache : maven
29
38
- name : Build with Maven
30
- run : mvn clean verify
39
+ run : mvn -B clean verify
31
40
- name : Run Demo App
32
41
run : |
33
42
ls -la NetLicensingClient-demo/target/
You can’t perform that action at this time.
0 commit comments