code: private List<MavenPluginDescriptor> createMavenPluginDescriptors(List<Plugin> plugins, ScannerContext context) {
          Store store = context.getStore();
          List<MavenPluginDescriptor> pluginDescriptors = new ArrayList<>();
          for (Plugin plugin : plugins) {
              MavenPluginDescriptor mavenPluginDescriptor = store.create(MavenPluginDescriptor.class);
              MavenArtifactDescriptor artifactDescriptor = getArtifactResolver(context).resolve(new PluginCoordinates(plugin), context);
              mavenPluginDescriptor.setArtifact(artifactDescriptor);
              mavenPluginDescriptor.setInherited(plugin.isInherited());
              mavenPluginDescriptor.getDeclaresDependencies()
                      .addAll(getDependencies(mavenPluginDescriptor, plugin.getDependencies(), PluginDependsOnDescriptor.class, context));
              addPluginExecutions(mavenPluginDescriptor, plugin, store);
              addConfiguration(mavenPluginDescriptor, (Xpp3Dom) plugin.getConfiguration(), store);
              pluginDescriptors.add(mavenPluginDescriptor);
          }
          return pluginDescriptors;
      }
docs: Create plugin descriptors for the given plugins.
  
  @param plugins
  The plugins.
  @param context
  The scanner context.
  @return The plugin descriptors.