@Deprecated @Override public FilePath[] getModuleRoots(FilePath workspace) { final ModuleLocation[] moduleLocations = getLocations(); if (moduleLocations.length > 0) { FilePath[] moduleRoots = new FilePath[moduleLocations.length]; for (int i = 0; i < moduleLocations.length; i++) { moduleRoots[i] = workspace.child(moduleLocations[i].getLocalDir()); } return moduleRoots; } return new FilePath[] { getModuleRoot(workspace) }; }
@Override public FilePath[] getModuleRoots(FilePath workspace, AbstractBuild build) { if (build == null) { return getModuleRoots(workspace); } // TODO: can't I get the build listener here? TaskListener listener = new LogTaskListener(LOGGER, WARNING); final EnvVars env; try { env = build.getEnvironment(listener); } catch (IOException e) { throw new RuntimeException(e); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RuntimeException(e); } final ModuleLocation[] moduleLocations = getLocations(); if (moduleLocations.length > 0) { FilePath[] moduleRoots = new FilePath[moduleLocations.length]; for (int i = 0; i < moduleLocations.length; i++) { moduleRoots[i] = _getModuleRoot(workspace, moduleLocations[i].getLocalDir(), env); } return moduleRoots; } return new FilePath[] { getModuleRoot(workspace, build) }; }
@Override public FilePath[] getModuleRoots(FilePath workspace) { final ModuleLocation[] moduleLocations = getLocations(); if (moduleLocations.length > 0) { FilePath[] moduleRoots = new FilePath[moduleLocations.length]; for (int i = 0; i < moduleLocations.length; i++) { moduleRoots[i] = workspace.child(moduleLocations[i].getLocalDir()); } return moduleRoots; } return new FilePath[]{getModuleRoot(workspace)}; }
@Override public FilePath[] getModuleRoots(FilePath workspace) { final ModuleLocation[] moduleLocations = getLocations(); if (moduleLocations.length > 0) { FilePath[] moduleRoots = new FilePath[moduleLocations.length]; for (int i = 0; i < moduleLocations.length; i++) { moduleRoots[i] = workspace.child(moduleLocations[i].getLocalDir()); } return moduleRoots; } return new FilePath[]{getModuleRoot(workspace)}; }
@Override public FilePath getModuleRoot(FilePath workspace, AbstractBuild build) { if (build == null) { return getModuleRoot(workspace); } // TODO: can't I get the build listener here? TaskListener listener = new LogTaskListener(LOGGER, WARNING); final EnvVars env; try { env = build.getEnvironment(listener); } catch (IOException e) { throw new RuntimeException(e); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RuntimeException(e); } if (getLocations().length > 0) return _getModuleRoot(workspace, getLocations()[0].getLocalDir(), env); return workspace; }