comparison mxtool/mx.py @ 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 cff647969dfa
children 394f38496856
comparison
equal deleted inserted replaced
9846:91a1041ec905 9847:931f9ced42ad
1698 fd, tmp = tempfile.mkstemp(suffix='', prefix=basename(d.path) + '.', dir=dirname(d.path)) 1698 fd, tmp = tempfile.mkstemp(suffix='', prefix=basename(d.path) + '.', dir=dirname(d.path))
1699 services = tempfile.mkdtemp(suffix='', prefix=basename(d.path) + '.', dir=dirname(d.path)) 1699 services = tempfile.mkdtemp(suffix='', prefix=basename(d.path) + '.', dir=dirname(d.path))
1700 try: 1700 try:
1701 zf = zipfile.ZipFile(tmp, 'w') 1701 zf = zipfile.ZipFile(tmp, 'w')
1702 for p in sorted_deps(d.deps): 1702 for p in sorted_deps(d.deps):
1703 # skip a Java project if its Java compliance level is "higher" than the configured JDK
1704 if java().javaCompliance < p.javaCompliance:
1705 log('Excluding {0} from {2} (Java compliance level {1} required)'.format(p.name, p.javaCompliance, d.path))
1706 continue
1707
1703 outputDir = p.output_dir() 1708 outputDir = p.output_dir()
1704 for root, _, files in os.walk(outputDir): 1709 for root, _, files in os.walk(outputDir):
1705 relpath = root[len(outputDir) + 1:] 1710 relpath = root[len(outputDir) + 1:]
1706 if relpath == join('META-INF', 'services'): 1711 if relpath == join('META-INF', 'services'):
1707 for f in files: 1712 for f in files: