public MavenBuildInformation getMavenBuildInformation() { return new MavenBuildInformation( MavenBuild.this.getModuleSetBuild().getMavenVersionUsed()); } }
public MavenBuildInformation getMavenBuildInformation() { return new MavenBuildInformation( MavenBuild.this.getModuleSetBuild().getMavenVersionUsed()); } }
public String call(MavenBuild mavenBuild) throws IOException, InterruptedException { MavenModuleSet moduleSet = mavenBuild.getModuleSetBuild().getParent(); if (moduleSet == null) { throw new IOException("Parent build not found!"); } return moduleSet.getRootModule().getArtifactId(); } }
@Override public FilePath locate(AbstractMavenBuild build) { if (build instanceof MavenBuild) { MavenModuleSetBuild parentBuild = ((MavenBuild) build).getModuleSetBuild(); if (parentBuild != null) { build = parentBuild; } } FilePath ws = build.getWorkspace(); if (ws == null) { return null; } return ws.child(".repository"); }
@Override public void run() { execute(new MavenBuildExecution()); getProject().updateTransientActions(); MavenModuleSetBuild parentBuild = getModuleSetBuild(); if(parentBuild!=null) parentBuild.notifyModuleBuild(this); }
@Override public void run() { run(new RunnerImpl()); getProject().updateTransientActions(); MavenModuleSetBuild parentBuild = getModuleSetBuild(); if(parentBuild!=null) parentBuild.notifyModuleBuild(this); }
@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())); }
@Override public void deploy(MavenEmbedder embedder, ArtifactRepository deploymentRepository, TaskListener listener) throws MavenEmbedderException, IOException, ComponentLookupException, ArtifactDeploymentException { ArtifactHandlerManager handlerManager = embedder.lookup(ArtifactHandlerManager.class); ArtifactFactory factory = embedder.lookup(ArtifactFactory.class); PrintStream logger = listener.getLogger(); boolean maven3orLater = MavenUtil.maven3orLater(parent.getModuleSetBuild().getMavenVersionUsed()); if (!deploymentRepository.isUniqueVersion() && maven3orLater) { logger.println("uniqueVersion == false is not anymore supported in maven 3"); ((WrappedArtifactRepository) deploymentRepository).setUniqueVersion( true ); } Artifact main = mainArtifact.toArtifact(handlerManager,factory,parent); if(!isPOM()) main.addMetadata(new ProjectArtifactMetadata(main,pomArtifact.getFile(parent))); // deploy the main artifact. This also deploys the POM logger.println(Messages.MavenArtifact_DeployingMainArtifact(main.getFile().getName())); deployMavenArtifact( main, deploymentRepository, embedder ); for (MavenArtifact aa : attachedArtifacts) { Artifact a = aa.toArtifact(handlerManager,factory, parent); logger.println(Messages.MavenArtifact_DeployingAttachedArtifact(a.getFile().getName())); deployMavenArtifact( a, deploymentRepository, embedder ); } }
@Override public boolean end(MavenBuild build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { registered = false; FilePath htmlPath = new FilePath(new File(build.getProject().getRootDir(), VIOLATIONS)); FilePath targetPath = new FilePath(new File(build.getRootDir(), VIOLATIONS)); FilePath workspace = build.getWorkspace(); if (workspace == null) { MavenModuleSetBuild parent = build.getModuleSetBuild(); throw new IOException("No workspace for " + build + "; parent workspace: " + (parent != null ? parent.getWorkspace() : "N/A") + "; builtOnStr=" + build.getBuiltOnStr() + "; builtOn=" + build.getBuiltOn()); } ViolationsReport report = workspace.act(new ViolationsCollector(true, targetPath, htmlPath, config)); report.setConfig(config); report.setBuild(build); report.setBuildResult(); ViolationsBuildAction buildAction = getCreateBuildAction(build); buildAction.setReport(report); return true; }
boolean maven3orLater = MavenUtil.maven3orLater(parent.getModuleSetBuild().getMavenVersionUsed()); boolean uniqueVersion = true; if (!deploymentRepository.isUniqueVersion()) {
private void rememberModulesToBuildAgainNextTime() { MavenModuleSetBuild moduleSetBuild = getModuleSetBuild();