Source:
public void prepare() throws Exception { synchronized (this) { try { if (inited) return; inited = true; Workspace workspace = registry.getPlugin(Workspace.class); HttpClient client = registry.getPlugin(HttpClient.class); localRepo = IO.getFile(configuration.local(MAVEN_REPO_LOCAL)); File location = workspace.getFile(getLocation()); if (configuration.snapshotUrl() != null && configuration.snapshotUrls() != null) { status("snapshotUrl and snapshotUrls property is set. Please only use snapshotUrl."); } if (configuration.releaseUrl() != null && configuration.releaseUrls() != null) { status("releaseUrl and releaseUrls property is set. Please only use releaseUrl."); } if (!isOk()) { return; } String releaseUrl = configuration.releaseUrl() != null ? configuration.releaseUrl() : configuration.releaseUrls(); String snapshotUrl = configuration.snapshotUrl() != null ? configuration.snapshotUrl() : configuration.snapshotUrls(); List<MavenBackingRepository> release = MavenBackingRepository.create(releaseUrl, reporter, localRepo, client); List<MavenBackingRepository> snapshot = MavenBackingRepository.create(snapshotUrl, reporter, localRepo, client); MavenRepository repository = new MavenRepository(localRepo, name, release, snapshot, client.promiseFactory() .executor(), reporter); boolean transitive = configuration.transitive(true); if (pomFiles != null) { repoImpl = new PomRepository(repository, client, location, transitive).uris(pomFiles); } else if (revisions != null) { repoImpl = new PomRepository(repository, client, location, transitive).revisions(revisions); } else if (query != null) { repoImpl = new SearchRepository(repository, location, query, queryUrl, workspace, client, transitive); } else { repository.close(); status("We have neither a pom, revision, or query set!"); return; } bridge = new BridgeRepository(repoImpl); startPoll(); } catch (Exception e) { reporter.exception(e, "Init for BndPomRepository failed %s", configuration); status(Exceptions.causes(e)); } } }

Target:
public void prepare() throws Exception { if (configuration.name() == null) { status("Must get a name"); } this.name = configuration.name(); if (configuration.snapshotUrl() != null && configuration.snapshotUrls() != null) { status("snapshotUrl and snapshotUrls property is set. Please only use snapshotUrl."); } if (configuration.releaseUrl() != null && configuration.releaseUrls() != null) { status("releaseUrl and releaseUrls property is set. Please only use releaseUrl."); } if (configuration.pom() != null) { pomFiles = Strings.split(configuration.pom()) .stream() .map(part -> { File f = IO.getFile(part); return f.isFile() ? f.toURI() : URI.create(part); }) .collect(toList()); if (pomFiles.isEmpty()) { status("Pom is neither a file nor a revision " + configuration.pom()); } } else if (configuration.revision() != null) { revisions = Strings.split(configuration.revision()) .stream() .map(Revision::valueOf) .filter(Objects::nonNull) .collect(toList()); if (revisions.isEmpty()) { status("Revision is neither a file nor a revision " + configuration.revision()); } } else if (configuration.query() != null) { this.query = configuration.query(); this.queryUrl = configuration.queryUrl("<LINK_0>"); } else { status("Neither pom, revision nor query property are set"); } initialized = Processor.getPromiseFactory() .submit(this::internalInitialize); }