server.setId( interpolatedTrimmed( parser.nextText(), "id" ) );
/** * Set the id field. * @param id */ public FluentServerBuilder withId(String id) { server.setId(id); return this; }
server.setId( interpolatedTrimmed( parser.nextText(), "id" ) );
/** * Stores credential information in settings, without persisting them * @param force * @param id * @param username * @param password * @param prefix * @param config */ protected boolean updateCredentials(boolean force, String id, String username, String password, String prefix, Dictionary<String, Object> config) throws IOException { if (!force && !confirm("Maven settings will be updated and org.ops4j.pax.url.mvn.settings property will change. Continue? (y/N) ")) { return false; } Optional<Server> existingServer = mavenSettings.getServers().stream() .filter((s) -> id.equals(s.getId())).findAny(); Server server = null; if (existingServer.isPresent()) { server = existingServer.get(); } else { server = new Server(); server.setId(id); mavenSettings.getServers().add(server); } server.setUsername(username); server.setPassword(password); return true; }
wizard.showMessage("No Bintray server configuration found, you have to provide Bintray credentials to proceed"); bintray = new Server(); bintray.setId(BINTRAY_SERVER_ID); String bintrayUser = wizard.promptForValueIfMissing(this.bintrayUsername, "your Bintray username"); String bintrayApiKey = wizard.promptForPasswordIfMissing(this.bintrayApiKey, "your Bintray API key");