# HG changeset patch # User Doug Simon # Date 1434918280 -7200 # Node ID 770fdbe70bb3facdc910de121e755dc2bbf8f7ed # Parent db48a62aba3624e5076412161521c1a3cced15f8 only (re)make archives from build command for distributions with at least one constituent project that was (re)compiled diff -r db48a62aba36 -r 770fdbe70bb3 mxtool/mx.py --- a/mxtool/mx.py Sun Jun 21 21:43:13 2015 +0200 +++ b/mxtool/mx.py Sun Jun 21 22:24:40 2015 +0200 @@ -3123,9 +3123,16 @@ 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: - archive(['@' + dist.name]) + 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')])