/** * Check the location of the POM, alternate settings file, etc - any file. */ public FormValidation doCheckFileInWorkspace(@QueryParameter String value) throws IOException, ServletException { MavenModuleSetBuild lb = getLastBuild(); if (lb!=null) { FilePath ws = lb.getModuleRoot(); if(ws!=null) return ws.validateRelativePath(value,true,true); } return FormValidation.ok(); }
/** * Check the location of the POM, alternate settings file, etc - any file. */ public FormValidation doCheckFileInWorkspace(@QueryParameter String value) throws IOException, ServletException { MavenModuleSetBuild lb = getLastBuild(); if (lb!=null) { FilePath ws = lb.getModuleRoot(); if(ws!=null) return ws.validateRelativePath(value,true,true); } return FormValidation.ok(); }
public String call(MavenBuild mavenBuild) throws IOException, InterruptedException { return mavenBuild.getParentBuild().getModuleRoot().getRemote(); } });
/** * Retrieve from the parent pom the path to the modules of the project */ private List<String> getMavenModules(MavenModuleSetBuild mavenBuild) throws IOException, InterruptedException { FilePath pathToModuleRoot = mavenBuild.getModuleRoot(); FilePath pathToPom = new FilePath(pathToModuleRoot, mavenBuild.getProject().getRootPOM(null)); return pathToPom.act(new MavenModulesExtractor()); }
poms = getModuleRoot().act(new PomParser(listener, mvn, project, mavenVersion)); } catch (IOException e) { if (e.getCause() instanceof AbortException)
@Override protected Lease decideWorkspace(Node n, WorkspaceList wsl) throws InterruptedException, IOException { return wsl.allocate(getModuleSetBuild().getModuleRoot().child(getProject().getRelativePath())); }
@Override protected Lease decideWorkspace(Node n, WorkspaceList wsl) throws InterruptedException, IOException { return wsl.allocate(getModuleSetBuild().getModuleRoot().child(getProject().getRelativePath())); }
PomParser.Result result = getModuleRoot().act(new PomParser(listener, mvn, mavenVersion, envVars, MavenModuleSetBuild.this)); poms = result.infos; mavenBuildInformation.modelParents.putAll(result.modelParents);
private boolean changeVersions(MavenModuleSetBuild mavenBuild, ReleaseAction release, boolean releaseVersion, String scmUrl) throws IOException, InterruptedException { FilePath moduleRoot = mavenBuild.getModuleRoot(); // get the active modules only Collection<MavenModule> modules = mavenBuild.getProject().getDisabledModules(false); Map<ModuleName, String> modulesByName = Maps.newHashMap(); for (MavenModule module : modules) { String version = releaseVersion ? release.getReleaseVersionFor(module.getModuleName()) : release.getNextVersionFor(module.getModuleName()); modulesByName.put(module.getModuleName(), version); } boolean modified = false; for (MavenModule mavenModule : modules) { FilePath pomPath = new FilePath(moduleRoot, getRelativePomPath(mavenModule, mavenBuild)); debuggingLogger.fine("Changing version of pom: " + pomPath); scmCoordinator.edit(pomPath); modified |= pomPath.act( new PomTransformer(mavenModule.getModuleName(), modulesByName, scmUrl, releaseVersion)); } return modified; }
MavenInformation mavenInformation = getModuleRoot().act( new MavenVersionCallable( mvn.getHome() )); mb.setWorkspace(getModuleRoot().child(m.getRelativePath())); proxies.put(moduleName, mb.new ProxyImpl2(MavenModuleSetBuild.this,slistener)); FilePath pom = getModuleRoot().child(rootPOM); FilePath parentLoc = getWorkspace().child(rootPOM); if(!pom.exists() && parentLoc.exists())
MavenInformation mavenInformation = getModuleRoot().act( new MavenVersionCallable( mvn.getHome() )); mb.setWorkspace(getModuleRoot().child(m.getRelativePath())); proxies.put(m.getModuleName(), mb.new ProxyImpl2(MavenModuleSetBuild.this,slistener)); FilePath pom = getModuleRoot().child(rootPOM); FilePath parentLoc = getWorkspace().child(rootPOM); if(!pom.exists() && parentLoc.exists()) margs.add("-s").add(project.getAlternateSettings()); } else { FilePath mrSettings = getModuleRoot().child(project.getAlternateSettings()); FilePath wsSettings = getWorkspace().child(project.getAlternateSettings()); if (!wsSettings.exists() && mrSettings.exists())