@Test public void processDownloadsSourcesAndSetsTheSourceFileFact() throws Exception { when(httpHelper.downloadFile(eq("https: .thenReturn(new File("artifact0.zip")); Artifact artifact0 = new Artifact(); artifact0.addFact(new ArtifactSourceUrl("https: Artifact artifact1 = new Artifact(); Collection<Artifact> artifacts = Arrays.asList(artifact0, artifact1); resolver.process(artifacts); assertThat(artifact0.askForGet(ArtifactSourceFile.class).isPresent()).isTrue(); assertThat(artifact0.askForGet(ArtifactSourceFile.class).get().toString()).isEqualTo("artifact0.zip"); assertThat(artifact1.askForGet(ArtifactSourceFile.class).isPresent()).isFalse(); }
@Override public Collection<Artifact> process(Collection<Artifact> artifacts) { LOGGER.debug("Resolve source urls..."); resolveSourceUrls(artifacts); LOGGER.debug("Resolve source urls... done"); return artifacts; }
SourceUrlResolver extends AbstractProcessor { @Override public Collection<Artifact> process(Collection<Artifact> artifacts) { LOGGER.debug("Resolve source urls..."); resolveSourceUrls(artifacts); LOGGER.debug("Resolve source urls... done"); return artifacts; } }
SourceUrlResolver extends AbstractProcessor { @Override public Collection<Artifact> process(Collection<Artifact> artifacts) { LOGGER.debug("Resolve source urls..."); resolveSourceUrls(artifacts); LOGGER.debug("Resolve source urls... done"); return artifacts; } SourceUrlResolver(); }
SourceUrlResolver extends AbstractProcessor { @Override public Collection<Artifact> process(Collection<Artifact> artifacts) { LOGGER.debug("Resolve source urls..."); resolveSourceUrls(artifacts); LOGGER.debug("Resolve source urls... done"); return artifacts; } SourceUrlResolver(); @Override Collection<Artifact> process(Collection<Artifact> artifacts); @Override void configure(Map<String,String> configMap); }
SourceUrlResolver extends AbstractProcessor { @Override public Collection<Artifact> process(Collection<Artifact> artifacts) { LOGGER.debug("Resolve source urls..."); resolveSourceUrls(artifacts); LOGGER.debug("Resolve source urls... done"); return artifacts; } SourceUrlResolver(); @Override Collection<Artifact> process(Collection<Artifact> artifacts); @Override void configure(Map<String,String> configMap);  }