@Test void resolvefromDescriptor() throws IOException { try (final InputStream stream = new ByteArrayInputStream("The following files have been resolved:\njunit:junit:jar:4.12:compile" .getBytes(StandardCharsets.UTF_8))) { final Collection<File> deps = new ResolverImpl(null, coord -> PathFactory.get("maven2").resolve(coord)) .resolveFromDescriptor(stream); assertEquals(1, deps.size()); assertEquals("maven2" + File.separator + "junit" + File.separator + "junit" + File.separator + "4.12" + File.separator + "junit-4.12.jar", deps.iterator().next().getPath()); } }
@Override public Collection<File> resolveFromDescriptor(final InputStream descriptor) { try { return new MvnDependencyListLocalRepositoryResolver(null, fileResolver) .resolveFromDescriptor(descriptor) .map(Artifact::toPath) .map(fileResolver) .map(Path::toFile) .collect(toList()); } catch (final IOException e) { throw new IllegalArgumentException(e); } }
ResolverImpl implements Resolver, Serializable { @Override public Collection<File> resolveFromDescriptor(final InputStream descriptor) { try { return new MvnDependencyListLocalRepositoryResolver(null, fileResolver) .resolveFromDescriptor(descriptor) .map(Artifact::toPath) .map(fileResolver) .map(Path::toFile) .collect(toList()); } catch (final IOException e) { throw new IllegalArgumentException(e); } } }
ResolverImpl implements Resolver, Serializable { @Override public Collection<File> resolveFromDescriptor(final InputStream descriptor) { try { return new MvnDependencyListLocalRepositoryResolver(null, fileResolver) .resolveFromDescriptor(descriptor) .map(Artifact::toPath) .map(fileResolver) .map(Path::toFile) .collect(toList()); } catch (final IOException e) { throw new IllegalArgumentException(e); } }  }
ResolverImpl implements Resolver, Serializable { @Override public Collection<File> resolveFromDescriptor(final InputStream descriptor) { try { return new MvnDependencyListLocalRepositoryResolver(null, fileResolver) .resolveFromDescriptor(descriptor) .map(Artifact::toPath) .map(fileResolver) .map(Path::toFile) .collect(toList()); } catch (final IOException e) { throw new IllegalArgumentException(e); } }  @Override ClassLoaderDescriptor mapDescriptorToClassLoader(final InputStream descriptor); @Override Collection<File> resolveFromDescriptor(final InputStream descriptor); }
ResolverImpl implements Resolver, Serializable { @Override public Collection<File> resolveFromDescriptor(final InputStream descriptor) { try { return new MvnDependencyListLocalRepositoryResolver(null, fileResolver) .resolveFromDescriptor(descriptor) .map(Artifact::toPath) .map(fileResolver) .map(Path::toFile) .collect(toList()); } catch (final IOException e) { throw new IllegalArgumentException(e); } }  @Override ClassLoaderDescriptor mapDescriptorToClassLoader(final InputStream descriptor); @Override Collection<File> resolveFromDescriptor(final InputStream descriptor);  }