|
51 | 51 | import org.eclipse.aether.util.graph.visitor.PreorderNodeListGenerator;
|
52 | 52 | import org.sonatype.plexus.build.incremental.BuildContext;
|
53 | 53 |
|
54 |
| -import java.io.*; |
| 54 | +import java.io.Closeable; |
| 55 | +import java.io.File; |
| 56 | +import java.io.IOException; |
55 | 57 | import java.net.MalformedURLException;
|
56 | 58 | import java.net.URL;
|
57 | 59 | import java.net.URLClassLoader;
|
@@ -453,34 +455,6 @@ protected Plugin.Engine.Summary transform(List<? extends String> classPath,
|
453 | 455 | }
|
454 | 456 | }
|
455 | 457 |
|
456 |
| - /** |
457 |
| - * Discovers plugins from an input stream representing a <i>META-INF/net.bytebuddy/build.plugins</i> file. |
458 |
| - * |
459 |
| - * @param inputStream The input stream to read from. |
460 |
| - * @param undiscoverable A set of undiscoverable plugins. |
461 |
| - * @param transformers The list of transformers to add discovered plugins to. |
462 |
| - * @param classPath The class path elements to add if a plugin is loaded from the class path or {@code null} if the plugin is discovered as a dependency |
463 |
| - * @throws IOException If an I/O exception occurs. |
464 |
| - */ |
465 |
| - private void discover(InputStream inputStream, Set<String> undiscoverable, List<Transformer> transformers, @MaybeNull List<String> classPath) throws IOException { |
466 |
| - BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, "UTF-8")); |
467 |
| - try { |
468 |
| - String line; |
469 |
| - while ((line = reader.readLine()) != null) { |
470 |
| - if (undiscoverable.add(line)) { |
471 |
| - transformers.add(classPath == null |
472 |
| - ? new Transformer.ForDiscoveredPlugin(line) |
473 |
| - : new Transformer.ForDiscoveredPlugin.FromClassLoader(line, classPath)); |
474 |
| - getLog().debug("Registered discovered plugin: " + line); |
475 |
| - } else { |
476 |
| - getLog().info("Skipping discovered plugin " + line + " which was previously discovered or registered"); |
477 |
| - } |
478 |
| - } |
479 |
| - } finally { |
480 |
| - reader.close(); |
481 |
| - } |
482 |
| - } |
483 |
| - |
484 | 458 | /**
|
485 | 459 | * Makes a best effort of locating the configured Java version.
|
486 | 460 | *
|
|
0 commit comments