docs: public static Jar getArchiveTask(Project project) {
  
          TaskCollection<Jar> existingArchiveTasks = project.getTasks().withType(Jar.class);
          Jar customArchiveTask = project.getExtensions().getByType(ThorntailExtension.class).getArchiveTask();
  
          if (customArchiveTask != null) {
              return existingArchiveTasks.getByName(customArchiveTask.getName());
  
          } else if (existingArchiveTasks.findByName(WarPlugin.WAR_TASK_NAME) != null) {
              return existingArchiveTasks.getByName(WarPlugin.WAR_TASK_NAME);
  
          } else if (existingArchiveTasks.findByName(JavaPlugin.JAR_TASK_NAME) != null) {
              return existingArchiveTasks.getByName(JavaPlugin.JAR_TASK_NAME);
          }
  
          throw new GradleException("Unable to detect Archive-Task: project contains neither 'war' nor 'jar', " +
                  "nor is custom Archive-Task specified in the \"thorntail\" extension.");
      }