# HG changeset patch # User Gilles Duboscq # Date 1410872792 -7200 # Node ID a4ab0b87fb343d8765db17e01f604dbcc12d930d # Parent 3ad5d7a6adb516606fe64c1f07e031a09fb5b80e Make distribution dependencies also exclude libraries diff -r 3ad5d7a6adb5 -r a4ab0b87fb34 mx/projects.deprecated --- a/mx/projects.deprecated Tue Oct 21 11:23:41 2014 +0200 +++ b/mx/projects.deprecated Tue Sep 16 15:06:32 2014 +0200 @@ -130,8 +130,7 @@ distribution@TRUFFLE-DSL-PROCESSOR@subDir=graal distribution@TRUFFLE-DSL-PROCESSOR@sourcesPath=build/truffle-dsl-processor.src.zip distribution@TRUFFLE-DSL-PROCESSOR@javaCompliance=1.7 -distribution@TRUFFLE-DSL-PROCESSOR@dependencies=\ -com.oracle.truffle.dsl.processor +distribution@TRUFFLE-DSL-PROCESSOR@dependencies=com.oracle.truffle.dsl.processor distribution@TRUFFLE-DSL-PROCESSOR@distDependencies=TRUFFLE # nfi diff -r 3ad5d7a6adb5 -r a4ab0b87fb34 mxtool/mx.py --- 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))