changeset 9847:931f9ced42ad

omit projects from distributions where the project's Java compliance level is too high
author Doug Simon <doug.simon@oracle.com>
date Mon, 03 Jun 2013 18:27:43 +0200
parents 91a1041ec905
children a5d3e0973e83
files mxtool/mx.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mxtool/mx.py	Sat Jun 01 20:42:22 2013 -0400
+++ b/mxtool/mx.py	Mon Jun 03 18:27:43 2013 +0200
@@ -1700,6 +1700,11 @@
             try:
                 zf = zipfile.ZipFile(tmp, 'w')
                 for p in sorted_deps(d.deps):
+                    # skip a  Java project if its Java compliance level is "higher" than the configured JDK
+                    if java().javaCompliance < p.javaCompliance:
+                        log('Excluding {0} from {2} (Java compliance level {1} required)'.format(p.name, p.javaCompliance, d.path))
+                        continue
+
                     outputDir = p.output_dir()
                     for root, _, files in os.walk(outputDir):
                         relpath = root[len(outputDir) + 1:]