提交 246eaf91 编写于 作者: K kohsuke

fixed a bug in dependency handling with aggregator m2 project.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4554 71c3de6d-444a-0410-be80-ed276b4c234a
上级 07769844
......@@ -299,12 +299,18 @@ public final class MavenModule extends AbstractMavenProject<MavenModule,MavenBui
modules.put(m.getModuleName(),m);
}
// if the build style is the aggregator build, define dependencies against project,
// not module.
AbstractProject dest = getParent().isAggregatorStyleBuild() ? getParent() : this;
for (ModuleName d : dependencies) {
MavenModule src = modules.get(d);
if(src!=null)
graph.addDependency(src,dest);
if(src!=null) {
if(src.getParent().isAggregatorStyleBuild())
graph.addDependency(src.getParent(),dest);
else
graph.addDependency(src,dest);
}
}
}
......
......@@ -187,7 +187,8 @@ public final class DependencyGraph {
set = new ArrayList<AbstractProject>();
map.put(src,set);
}
set.add(dst);
if(!set.contains(dst))
set.add(dst);
}
private Map<AbstractProject, List<AbstractProject>> finalize(Map<AbstractProject, List<AbstractProject>> m) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册