not build modules in incremental Maven builds are now recognized early

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@33985 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kutzi committed 2010-08-19 20:38:05 +00:00
1 parent a044698cc7
commit f63c8801e2
1 file changed
+16 -1
@@ -712,8 +712,23 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
}
}
@Override
void preBuild(MavenSession session, ReactorManager rm, EventDispatcher dispatcher) throws BuildFailureException, LifecycleExecutionException, IOException, InterruptedException {
// TODO
// set all modules which are not actually being build (in incremental builds) to NOT_BUILD
@SuppressWarnings("unchecked")
List<MavenProject> projects = rm.getSortedProjects();
Set<ModuleName> buildingProjects = new HashSet<ModuleName>();
for (MavenProject p : projects) {
buildingProjects.add(new ModuleName(p));
}
for (Entry<ModuleName,MavenBuildProxy2> e : this.proxies.entrySet()) {
if (! buildingProjects.contains(e.getKey())) {
e.getValue().setResult(Result.NOT_BUILT);
e.getValue().end();
}
}
}
void postBuild(MavenSession session, ReactorManager rm, EventDispatcher dispatcher) throws BuildFailureException, LifecycleExecutionException, IOException, InterruptedException {