APISonar


io.spring.concourse.releasescripts.system.ConsoleLogger.log

> io > spring > concourse > releasescripts > system > ConsoleLogger > log
io APIs spring APIs concourse APIs releasescripts APIs system APIs ConsoleLogger APIs log APIs

Example 1
private static final ConsoleLogger console = new ConsoleLogger();

	public void publishGradlePlugin(ReleaseInfo releaseInfo) {
		RequestEntity<String> requestEntity = RequestEntity
				.post(URI.create(BINTRAY_URL + "packages/" + this.bintrayProperties.getSubject() + "/"
						+ this.bintrayProperties.getRepo() + "/" + releaseInfo.getGroupId() + "/versions/"
						+ releaseInfo.getVersion() + "/attributes"))
				.contentType(MediaType.APPLICATION_JSON).body(GRADLE_PLUGIN_REQUEST);
		try {
			this.restTemplate.exchange(requestEntity, Object.class);
		}
		catch (HttpClientErrorException ex) {
			console.log("Failed to add attribute to gradle plugin.");
			throw ex;
		}
	}
Example 2
private static final ConsoleLogger console = new ConsoleLogger();

	public boolean artifactsPublished(ReleaseInfo releaseInfo) {
		try {
			ResponseEntity<Object> entity = this.restTemplate
					.getForEntity(String.format(SONATYPE_REPOSITORY_URI + "%s/spring-boot-%s.jar.sha1",
							releaseInfo.getVersion(), releaseInfo.getVersion()), Object.class);
			if (HttpStatus.OK.equals(entity.getStatusCode())) {
				console.log("Already published to Sonatype.");
				return true;
			}
		}
		catch (HttpClientErrorException ex) {

		}
		return false;
	}