提交 6f1cdeda 编写于 作者: M mode

Merged revisions 32154-32155,32157 via svnmerge from

https://svn.dev.java.net/svn/hudson/branches/rc

........
  r32154 | kohsuke | 2010-06-18 20:38:45 -0700 (Fri, 18 Jun 2010) | 1 line
  
  fixed a bug in the logic of aggregating multiple dependency edges.
........
  r32155 | kohsuke | 2010-06-18 21:41:33 -0700 (Fri, 18 Jun 2010) | 1 line
  
  [maven-release-plugin] prepare release hudson-1_363
........
  r32157 | kohsuke | 2010-06-18 21:41:47 -0700 (Fri, 18 Jun 2010) | 1 line
  
  [maven-release-plugin] prepare for next development iteration
........


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@32161 71c3de6d-444a-0410-be80-ed276b4c234a
上级 80d2bd2d
......@@ -4,7 +4,7 @@
<parent>
<artifactId>pom</artifactId>
<groupId>org.jvnet.hudson.main</groupId>
<version>1.363-SNAPSHOT</version>
<version>1.364-SNAPSHOT</version>
</parent>
<artifactId>cli</artifactId>
<name>Hudson CLI</name>
......
......@@ -28,7 +28,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jvnet.hudson.main</groupId>
<artifactId>pom</artifactId>
<version>1.363-SNAPSHOT</version>
<version>1.364-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -41,6 +41,7 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
......@@ -276,14 +277,14 @@ public final class DependencyGraph implements Comparator<AbstractProject> {
for (ListIterator<Dependency> it = set.listIterator(); it.hasNext();) {
Dependency d = it.next();
// Check for existing edge that connects the same two projects:
if (d.equals(dep)) {
if (d.getUpstreamProject()==dep.getUpstreamProject() && d.getDownstreamProject()==dep.getDownstreamProject()) {
if (d.equals(dep))
return; // identical with existing edge
if (d instanceof DependencyGroup)
((DependencyGroup)d).add(dep);
else {
DependencyGroup group = new DependencyGroup(d);
group.add(dep);
it.set(group);
}
else
it.set(new DependencyGroup(d,dep));
return;
}
}
......@@ -448,6 +449,13 @@ public final class DependencyGraph implements Comparator<AbstractProject> {
return true;
}
/**
* Does this method point to itself?
*/
public boolean pointsItself() {
return upstream==downstream;
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
......@@ -475,11 +483,12 @@ public final class DependencyGraph implements Comparator<AbstractProject> {
* Collect multiple dependencies between the same two projects.
*/
private static class DependencyGroup extends Dependency {
private List<Dependency> group = new ArrayList<Dependency>();
private Set<Dependency> group = new LinkedHashSet<Dependency>();
DependencyGroup(Dependency first) {
DependencyGroup(Dependency first, Dependency second) {
super(first.getUpstreamProject(), first.getDownstreamProject());
group.add(first);
group.add(second);
}
void add(Dependency next) {
......
......@@ -27,7 +27,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jvnet.hudson.main</groupId>
<artifactId>pom</artifactId>
<version>1.363-SNAPSHOT</version>
<version>1.364-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -27,7 +27,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jvnet.hudson.main</groupId>
<artifactId>pom</artifactId>
<version>1.363-SNAPSHOT</version>
<version>1.364-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -27,7 +27,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jvnet.hudson.main</groupId>
<artifactId>pom</artifactId>
<version>1.363-SNAPSHOT</version>
<version>1.364-SNAPSHOT</version>
</parent>
<artifactId>maven-plugin</artifactId>
......
......@@ -401,10 +401,10 @@ public final class MavenModule extends AbstractMavenProject<MavenModule,MavenBui
for (ModuleDependency d : dependencies) {
MavenModule src = modules.get(d);
if(src!=null) {
if(src.getParent().isAggregatorStyleBuild())
graph.addDependency(new DependencyGraph.Dependency(src.getParent(),dest));
else
graph.addDependency(new DependencyGraph.Dependency(src,dest));
DependencyGraph.Dependency dep = new DependencyGraph.Dependency(
src.getParent().isAggregatorStyleBuild() ? src.getParent() : src,dest);
if (!dep.pointsItself())
graph.addDependency(dep);
}
}
}
......
......@@ -33,7 +33,7 @@ THE SOFTWARE.
<groupId>org.jvnet.hudson.main</groupId>
<artifactId>pom</artifactId>
<version>1.363-SNAPSHOT</version>
<version>1.364-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Hudson main module</name>
......
......@@ -27,7 +27,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jvnet.hudson.main</groupId>
<artifactId>pom</artifactId>
<version>1.363-SNAPSHOT</version>
<version>1.364-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
......@@ -27,7 +27,7 @@ THE SOFTWARE.
<parent>
<artifactId>pom</artifactId>
<groupId>org.jvnet.hudson.main</groupId>
<version>1.363-SNAPSHOT</version>
<version>1.364-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jvnet.hudson.main</groupId>
......
......@@ -27,7 +27,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jvnet.hudson.main</groupId>
<artifactId>pom</artifactId>
<version>1.363-SNAPSHOT</version>
<version>1.364-SNAPSHOT</version>
</parent>
<artifactId>ui-samples-plugin</artifactId>
......
......@@ -27,7 +27,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jvnet.hudson.main</groupId>
<artifactId>pom</artifactId>
<version>1.363-SNAPSHOT</version>
<version>1.364-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册