Mercurial > hg > graal-compiler
diff mxtool/mx.py @ 18393:a4ab0b87fb34
Make distribution dependencies also exclude libraries
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 16 Sep 2014 15:06:32 +0200 |
parents | c88ab4f1f04a |
children | e97e1f07a3d6 |
line wrap: on
line diff
--- a/mxtool/mx.py Tue Oct 21 11:23:41 2014 +0200 +++ b/mxtool/mx.py Tue Sep 16 15:06:32 2014 +0200 @@ -136,6 +136,16 @@ arc.zf.writestr("META-INF/MANIFEST.MF", manifest) for dep in self.sorted_deps(includeLibs=True): + isCoveredByDependecy = False + for d in self.distDependencies: + if dep in _dists[d].sorted_deps(includeLibs=True, transitive=True): + logv("Excluding {0} from {1} because it's provided by the dependency {2}".format(dep.name, self.path, d)) + isCoveredByDependecy = True + break + + if isCoveredByDependecy: + continue + if dep.isLibrary(): l = dep # merge library jar into distribution jar @@ -160,16 +170,6 @@ elif dep.isProject(): p = dep - isCoveredByDependecy = False - for d in self.distDependencies: - if p in _dists[d].sorted_deps(): - logv("Excluding {0} from {1} because it's provided by the dependency {2}".format(p.name, self.path, d)) - isCoveredByDependecy = True - break - - if isCoveredByDependecy: - continue - if self.javaCompliance: if p.javaCompliance > self.javaCompliance: abort("Compliance level doesn't match: Distribution {0} requires {1}, but {2} is {3}.".format(self.name, self.javaCompliance, p.name, p.javaCompliance))