List of usage examples for com.fasterxml.jackson.core JsonProcessingException printStackTrace
public void printStackTrace(PrintStream s)
From source file:io.fabric8.devops.projects.finder.gogs.Main.java
public void run() { try {//from ww w . ja v a2s. co m String host = Systems.getEnvVarOrSystemProperty("GOGS_SERVICE_HOST", "gogs.vagrant.f8"); String port = Systems.getEnvVarOrSystemProperty("GOGS_SERVICE_PORT", ""); address = "http://" + host + (Strings.isNotBlank(port) ? ":" + port : ""); username = Systems.getEnvVarOrSystemProperty("JENKINS_GOGS_USER", "gogsadmin"); password = Systems.getEnvVarOrSystemProperty("JENKINS_GOGS_PASSWORD", "RedHat$1"); LOG.info("Logging into gogs at address: " + address + " with user " + username); GitRepoClient client = new GitRepoClient(address, username, password); List<RepositoryDTO> repos = client.listRepositories(); System.out.println(JsonHelper.toJson(repos)); } catch (JsonProcessingException e) { System.err.println("Failed to find repos: " + e); e.printStackTrace(System.err); } }