code: def _copy_artifact(self, tgt, jar, version, typename, suffix='', extension='jar',
                       artifact_ext='', override_name=None):
      
      genmap = self.context.products.get(typename)
      product_mapping = genmap.get(tgt)
      if product_mapping is None:
        raise ValueError("No product mapping in {} for {}. "
                         "You may need to run some other task first".format(typename, tgt))
      for basedir, jars in product_mapping.items():
        for artifact in jars:
          path = self.artifact_path(jar, version, name=override_name, suffix=suffix,
                                    extension=extension, artifact_ext=artifact_ext)
          safe_mkdir(os.path.dirname(path))
          shutil.copy(os.path.join(basedir, artifact), path)
docs: Copy the products for a target into the artifact path for the jar/version