server.setUsername( interpolatedTrimmed( parser.nextText(), "username" ) );
/** * Set the username used to authenticate. * @param username */ public FluentServerBuilder withUsername(String username) { server.setUsername(username); return this; }
server.setUsername( interpolatedTrimmed( parser.nextText(), "username" ) );
/** * 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; }
String bintrayUser = wizard.promptForValueIfMissing(null, "your Bintray username"); String bintrayApiKey = wizard.promptForPasswordIfMissing(null, "your Bintray API key (can be found under API keys at https://bintray.com/profile/edit after you log in)"); bintray.setUsername(bintrayUser); bintray.setPassword(bintrayApiKey); settingsManager.apply(); String bintrayUser = wizard.promptForValueIfMissing(this.bintrayUsername, "your Bintray username"); String bintrayApiKey = wizard.promptForPasswordIfMissing(this.bintrayApiKey, "your Bintray API key"); bintray.setUsername(bintrayUser); bintray.setPassword(bintrayApiKey);