code: def resolve(self, executor, targets, classpath_products, confs=None, extra_args=None,
                invalidate_dependents=False):
      
      confs = confs or ('default',)
      targets_by_sets = JarDependencyManagement.global_instance().targets_by_artifact_set(targets)
      results = []
      for artifact_set, target_subset in targets_by_sets.items():
        results.append(self._resolve_subset(executor,
                                                       target_subset,
                                                       classpath_products,
                                                       confs=confs,
                                                       extra_args=extra_args,
                                                       invalidate_dependents=invalidate_dependents,
                                                       pinned_artifacts=artifact_set))
      return results
docs: Resolves external classpath products (typically jars) for the given targets.
  
      :API: public
  
      :param executor: A java executor to run ivy with.
      :type executor: :class:`pants.java.executor.Executor`
      :param targets: The targets to resolve jvm dependencies for.
      :type targets: :class:`collections.Iterable` of :class:`pants.build_graph.target.Target`
      :param classpath_products: The classpath products to populate with the results of the resolve.
      :type classpath_products: :class:`pants.backend.jvm.tasks.classpath_products.ClasspathProducts`
      :param confs: The ivy configurations to resolve; ('default',) by default.
      :type confs: :class:`collections.Iterable` of string
      :param extra_args: Any extra command line arguments to pass to ivy.
      :type extra_args: list of string
      :param bool invalidate_dependents: `True` to invalidate dependents of targets that needed to be
                                          resolved.
      :returns: The results of each of the resolves run by this call.
      :rtype: list of IvyResolveResult