@ Nullable private String setupMavenLocalRepo ( ) throws IOException , InterruptedException { String expandedMavenLocalRepo ; if ( StringUtils . isEmpty ( step . getMavenLocalRepo ( ) ) ) { expandedMavenLocalRepo = null ; } else { // resolve relative/absolute with workspace as base String expandedPath = envOverride . expand ( env . expand ( step . getMavenLocalRepo ( ) ) ) ; if ( FileUtils . isAbsolutePath ( expandedPath ) ) { expandedMavenLocalRepo = expandedPath ; } else { FilePath repoPath = new FilePath ( ws , expandedPath ) ; repoPath . mkdirs ( ) ; expandedMavenLocalRepo = repoPath . getRemote ( ) ; } } LOGGER . log ( Level . FINEST , "setupMavenLocalRepo({0}): {1}" , new Object [ ] { step . getMavenLocalRepo ( ) , expandedMavenLocalRepo } ) ; return expandedMavenLocalRepo ; }
Sets the maven repo location according to the provided parameter on the agent