File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -944,11 +944,24 @@ def graalvm_jdk():
944
944
mx .run_mx (mx_args + ["graalvm-home" ], out = out )
945
945
return out .data .splitlines ()[- 1 ].strip ()
946
946
947
+ def get_maven_cache ():
948
+ buildnr = os .environ .get ('BUILD_NUMBER' )
949
+ # don't worry about maven.repo.local if not running on gate
950
+ return os .path .join (SUITE .get_mx_output_dir (), 'm2_cache_' + buildnr ) if buildnr else None
947
951
948
952
def deploy_local_maven_repo ():
949
953
if not DISABLE_REBUILD :
954
+ env = os .environ .copy ()
955
+ m2_cache = get_maven_cache ()
956
+ if m2_cache :
957
+ mvn_repo_local = f'-Dmaven.repo.local={ m2_cache } '
958
+ maven_opts = env .get ('MAVEN_OPTS' )
959
+ maven_opts = maven_opts + " " + mvn_repo_local if maven_opts else mvn_repo_local
960
+ env ['MAVEN_OPTS' ] = maven_opts
961
+ mx .log (f'Added { mvn_repo_local } to MAVEN_OPTS={ maven_opts } ' )
962
+
950
963
# build GraalPy and all the necessary dependencies, so that we can deploy them
951
- mx .run_mx (["build" ])
964
+ mx .run_mx (["build" ], env = env )
952
965
# deploy maven artifacts
953
966
version = GRAAL_VERSION
954
967
path = os .path .join (SUITE .get_mx_output_dir (), 'public-maven-repo' )
You can’t perform that action at this time.
0 commit comments