fix xbib upload

This commit is contained in:
Jörg Prante 2019-05-08 11:31:06 +02:00
parent 793cda09b1
commit 098fc46687
4 changed files with 6 additions and 31 deletions

View file

@ -35,17 +35,15 @@ subprojects {
configurations {
asciidoclet
wagon
}
dependencies {
testImplementation "org.junit.jupiter:junit-jupiter-api:${project.property('junit.version')}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${project.property('junit.version')}"
testImplementation "org.apache.logging.log4j:log4j-core:${project.property('log4j.version')}"
testImplementation "org.apache.logging.log4j:log4j-jul:${project.property('log4j.version')}"
testImplementation "org.apache.logging.log4j:log4j-slf4j-impl:${project.property('log4j.version')}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${project.property('junit.version')}"
asciidoclet "org.xbib:asciidoclet:${project.property('asciidoclet.version')}"
wagon "org.apache.maven.wagon:wagon-ssh:${project.property('wagon.version')}"
}
compileJava {

View file

@ -49,13 +49,6 @@ public abstract class HttpAction<R extends ActionRequest, T extends ActionRespon
public abstract GenericAction<R, T> getActionInstance();
/*public final ActionFuture<T> execute(HttpActionContext<R, T> httpActionContext) {
PlainActionFuture<T> future = PlainActionFuture.newFuture();
//HttpActionFuture<T, T> future = new HttpActionFuture<>();
execute(httpActionContext, future);
return future;
}*/
final void execute(HttpActionContext<R, T> httpActionContext, ActionListener<T> listener) throws IOException {
try {
ActionRequestValidationException validationException = httpActionContext.getRequest().validate();
@ -66,11 +59,12 @@ public abstract class HttpAction<R extends ActionRequest, T extends ActionRespon
RequestBuilder httpRequestBuilder =
createHttpRequest(httpActionContext.getUrl(), httpActionContext.getRequest());
Request httpRequest = httpRequestBuilder.build();
logger.log(Level.DEBUG, "action = {} request = {}", this.getClass().getName(), httpRequest.toString());
httpRequest.setResponseListener(fullHttpResponse -> {
logger.log(Level.DEBUG, "got response: " + fullHttpResponse.status().code() +
" headers = " + fullHttpResponse.headers().entries() +
" content = " + fullHttpResponse.content().toString(StandardCharsets.UTF_8));
if (logger.isDebugEnabled()) {
logger.log(Level.DEBUG, "got response: " + fullHttpResponse.status().code() +
" headers = " + fullHttpResponse.headers().entries() +
" content = " + fullHttpResponse.content().toString(StandardCharsets.UTF_8));
}
httpActionContext.setHttpResponse(fullHttpResponse);
if (fullHttpResponse.status().equals(HttpResponseStatus.OK)) {
listener.onResponse(parseToResponse(httpActionContext));

View file

@ -11,7 +11,6 @@ xbib-netty-http.version = 4.1.35.0
# test
junit.version = 5.4.2
wagon.version = 3.3.2
asciidoclet.version = 1.6.0.0
org.gradle.warning.mode = all

View file

@ -5,22 +5,6 @@ ext {
scmDeveloperConnection = 'scm:git:git://github.com/jprante/elx.git'
}
task xbibUpload(type: Upload, dependsOn: build) {
group = 'publish'
configuration = configurations.archives
uploadDescriptor = true
repositories {
if (project.hasProperty("xbibUsername")) {
mavenDeployer {
configuration = configurations.wagon
repository(url: uri(project.property('xbibUrl'))) {
authentication(userName: xbibUsername, privateKey: xbibPrivateKey)
}
}
}
}
}
task sonaTypeUpload(type: Upload, dependsOn: build) {
group = 'publish'
configuration = configurations.archives