# HG changeset patch # User Doug Simon # Date 1435058155 -7200 # Node ID 0f969fd3a7d3ae74671e44f7e31af054073423a0 # Parent 97ad67783fbb81546f835d41fe98982ba340d737 create missing distribution jars irrespective of whether any constituent projects were rebuilt diff -r 97ad67783fbb -r 0f969fd3a7d3 mxtool/mx.py --- a/mxtool/mx.py Tue Jun 23 13:15:48 2015 +0200 +++ b/mxtool/mx.py Tue Jun 23 13:15:55 2015 +0200 @@ -3145,25 +3145,27 @@ log('Compiling {0} failed'.format(t.proj.name)) abort('{0} Java compilation tasks failed'.format(len(failed))) - if len(tasks) != 0: - if args.java and not args.only: - files = [] - rebuiltProjects = frozenset([t.proj for t in tasks.itervalues()]) - for dist in sorted_dists(): - if dist not in updatedAnnotationProcessorDists: - projectsInDist = dist.sorted_deps() - n = len(rebuiltProjects.intersection(projectsInDist)) - if n != 0: - log('Updating jars for {0} [{1} constituent projects (re)built]'.format(dist.name, n)) - dist.make_archive() - else: - logv('[all constituent projects for {0} are up to date - skipping jar updating]'.format(dist.name)) - if args.check_distributions and not dist.isProcessorDistribution: - with zipfile.ZipFile(dist.path, 'r') as zf: - files.extend([member for member in zf.namelist() if not member.startswith('META-INF')]) - dups = set([x for x in files if files.count(x) > 1]) - if len(dups) > 0: - abort('Distributions overlap! duplicates: ' + str(dups)) + if args.java and not args.only: + files = [] + rebuiltProjects = frozenset([t.proj for t in tasks.itervalues()]) + for dist in sorted_dists(): + if not exists(dist.path): + log('Creating jar for {0}'.format(dist.name)) + dist.make_archive() + elif dist not in updatedAnnotationProcessorDists: + projectsInDist = dist.sorted_deps() + n = len(rebuiltProjects.intersection(projectsInDist)) + if n != 0: + log('Updating jar for {0} [{1} constituent projects (re)built]'.format(dist.name, n)) + dist.make_archive() + else: + logv('[all constituent projects for {0} are up to date - skipping jar updating]'.format(dist.name)) + if args.check_distributions and not dist.isProcessorDistribution: + with zipfile.ZipFile(dist.path, 'r') as zf: + files.extend([member for member in zf.namelist() if not member.startswith('META-INF')]) + dups = set([x for x in files if files.count(x) > 1]) + if len(dups) > 0: + abort('Distributions overlap! duplicates: ' + str(dups)) if suppliedParser: return args