#NEWLINE# def add_jars_for_targets( self , targets , conf , resolved_jars ) : #NEWLINE# #INDENT# 'Adds jar classpath elements to the products of the provided targets.\n\n    The resolved jars are added in a way that works with excludes.\n    ' #NEWLINE# classpath_entries = [ ] #NEWLINE# for jar in resolved_jars : #NEWLINE# #INDENT# if ( not jar . pants_path ) : #NEWLINE# #INDENT# raise TaskError ( 'Jar: {!s} has no specified path.' . format ( jar . coordinate ) ) #NEWLINE# #UNINDENT# cp_entry = ArtifactClasspathEntry ( jar . pants_path , jar . coordinate , jar . cache_path ) #NEWLINE# classpath_entries . append ( ( conf , cp_entry ) ) #NEWLINE# #UNINDENT# for target in targets : #NEWLINE# #INDENT# self . _add_elements_for_target ( target , classpath_entries )