mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 05:22:22 +00:00
[FIXED HUDSON-4152] Maven incremental build now will rebuild modules which were failed/unstable in previous build, even if there were no changes for those modules in this build.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@20953 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
5f28cbb854
commit
bcfd3710fb
3 files changed
+58
-3
No files matched your search
@@ -418,17 +418,21 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
|
||||
List<String> changedModules = new ArrayList<String>();
|
||||
|
||||
for (MavenModule m : project.sortedActiveModules) {
|
||||
MavenBuild mb = m.newBuild();
|
||||
|
||||
// Check if incrementalBuild is selected and that there are changes -
|
||||
// we act as if incrementalBuild is not set if there are no changes.
|
||||
if (!MavenModuleSetBuild.this.getChangeSet().isEmptySet()
|
||||
&& project.isIncrementalBuild()) {
|
||||
if (!getChangeSetFor(m).isEmpty()) {
|
||||
// If there are changes for this module, add it.
|
||||
if ((!getChangeSetFor(m).isEmpty())
|
||||
// If the last actually-built build of this module wasn't a success,
|
||||
// add it - i.e., rebuild anything that failed/was unstable in the past.
|
||||
|| (mb.getPreviousBuiltBuild().getResult().isWorseThan(Result.SUCCESS))) {
|
||||
changedModules.add(m.getModuleName().toString());
|
||||
}
|
||||
}
|
||||
|
||||
MavenBuild mb = m.newBuild();
|
||||
mb.setWorkspace(getModuleRoot().child(m.getRelativePath()));
|
||||
proxies.put(m.getModuleName(), mb.new ProxyImpl2(MavenModuleSetBuild.this,slistener));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user