提交 bd8e8ec8 编写于 作者: K kohsuke

first build of newly created MavenModules need to use the consistent build...

first build of newly created MavenModules need to use the consistent build number aligned with those of the MavenModuleSetBuild.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2307 71c3de6d-444a-0410-be80-ed276b4c234a
上级 a008b1c8
......@@ -68,9 +68,10 @@ public final class MavenModule extends AbstractProject<MavenModule,MavenBuild> i
*/
private transient /*final*/ List<Action> transientActions = new Vector<Action>();
/*package*/ MavenModule(MavenModuleSet parent, PomInfo pom) {
/*package*/ MavenModule(MavenModuleSet parent, PomInfo pom, int firstBuildNumber) throws IOException {
super(parent, pom.name.toFileSystemName());
reconfigure(pom);
updateNextBuildNumber(firstBuildNumber);
}
/**
......
......@@ -199,7 +199,7 @@ public final class MavenModuleSet extends AbstractProject<MavenModuleSet,MavenMo
return nextBuildNumber;
}
/*package*/ void updateNextBuildNumber() throws IOException {
private void updateNextBuildNumber() throws IOException {
int next = this.nextBuildNumber;
for (MavenModule m : modules.values())
next = Math.max(next,m.getNextBuildNumber());
......
......@@ -113,7 +113,7 @@ public final class MavenModuleSetBuild extends AbstractBuild<MavenModuleSet,Mave
mm.reconfigure(pom);
modules.put(pom.name,mm);
} else {// this looks like a new module
mm = new MavenModule(project,pom);
mm = new MavenModule(project,pom,getNumber());
modules.put(mm.getModuleName(),mm);
}
mm.save();
......@@ -126,6 +126,7 @@ public final class MavenModuleSetBuild extends AbstractBuild<MavenModuleSet,Mave
modules.putAll(old);
}
// we might have added new modules
Hudson.getInstance().rebuildDependencyGraph();
// start the build
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册