Skip to content

Commit

Permalink
Add nohttp Gradle plugin
Browse files Browse the repository at this point in the history
* Upgrade to the latest dependencies, including Checkstyle
* Fix new Checkstyle violations
* Fix typo in the `si-amqp.adoc`
  • Loading branch information
artembilan authored and garyrussell committed Jun 7, 2019
1 parent 0c85113 commit 3edcd9a
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 20 deletions.
33 changes: 20 additions & 13 deletions build.gradle
@@ -1,26 +1,28 @@
buildscript {
ext.kotlinVersion = '1.3.21'
ext.kotlinVersion = '1.3.31'
repositories {
maven { url 'https://repo.spring.io/plugins-release' }
}
dependencies {
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16'
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.18'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion"
classpath 'io.spring.nohttp:nohttp-gradle:0.0.2.RELEASE'
}
}

plugins {
id "org.sonarqube" version '2.7'
id 'org.asciidoctor.convert' version '1.5.10'
id 'org.ajoberstar.grgit' version '3.0.0'
id "org.sonarqube" version '2.7.1'
id 'org.asciidoctor.convert' version '1.6.1'
id 'org.ajoberstar.grgit' version '3.1.1'
}

description = 'Spring AMQP'

apply plugin: 'base'
apply plugin: 'project-report'
apply plugin: 'idea'
apply plugin: 'io.spring.nohttp'

ext {
isTravisBuild = System.getenv().get("TRAVIS") == 'true'
Expand All @@ -36,6 +38,11 @@ ext {
files(grgit.status().unstaged.modified).filter{ f -> f.name.endsWith('.java') || f.name.endsWith('.kt') }
}

nohttp {
source.include '**/src/**'
source.exclude '**/*.gif', '**/*.ks'
}

allprojects {
group = 'org.springframework.amqp'

Expand Down Expand Up @@ -73,9 +80,9 @@ subprojects { subproject ->
targetCompatibility=1.8

ext {
assertjVersion = '3.12.0'
assertkVersion = '0.13'
commonsHttpClientVersion = '4.5.6'
assertjVersion = '3.12.2'
assertkVersion = '0.17'
commonsHttpClientVersion = '4.5.8'
googleJsr305Version = '3.0.2'
hamcrestVersion = '1.3'
jackson2Version = '2.9.9'
Expand All @@ -85,10 +92,10 @@ subprojects { subproject ->
junitPlatformVersion = '1.4.0'
log4jVersion = '2.11.2'
logbackVersion = '1.2.3'
mockitoVersion = '2.24.0'
rabbitmqVersion = project.hasProperty('rabbitmqVersion') ? project.rabbitmqVersion : '5.7.0'
mockitoVersion = '2.28.2'
rabbitmqVersion = project.hasProperty('rabbitmqVersion') ? project.rabbitmqVersion : '5.7.1'
rabbitmqHttpClientVersion = '3.2.0.RELEASE'
reactorVersion = '3.2.6.RELEASE'
reactorVersion = '3.3.0.M1'
springDataCommonsVersion = '2.2.0.M4'

springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.2.0.M2'
Expand All @@ -103,7 +110,7 @@ subprojects { subproject ->
}

jacoco {
toolVersion = '0.8.2'
toolVersion = '0.8.3'
}

// dependencies that are common across all java projects
Expand Down Expand Up @@ -238,7 +245,7 @@ subprojects { subproject ->

checkstyle {
configFile = file("${rootDir}/src/checkstyle/checkstyle.xml")
toolVersion = "8.17"
toolVersion = "8.21"
}

artifacts {
Expand Down
Expand Up @@ -340,7 +340,9 @@ private void doSend(Event event, LogEvent logEvent, MessageProperties amqpProps)
message = new Message(msgBody.toString().getBytes(this.manager.charset),
amqpProps);
}
catch (UnsupportedEncodingException e) { /* fall back to default */ }
catch (UnsupportedEncodingException e) {
/* fall back to default */
}
}
if (message == null) {
message = new Message(msgBody.toString().getBytes(), amqpProps); //NOSONAR (default charset)
Expand Down
Expand Up @@ -159,13 +159,17 @@ public void testCachedConnectionsChannelLimit() throws Exception {
channels.add(connections.get(0).createChannel(false));
fail("Exception expected");
}
catch (AmqpTimeoutException e) { }
catch (AmqpTimeoutException e) {

}
channels.add(connections.get(1).createChannel(false));
try {
channels.add(connections.get(1).createChannel(false));
fail("Exception expected");
}
catch (AmqpTimeoutException e) { }
catch (AmqpTimeoutException e) {

}
channels.get(0).close();
channels.get(1).close();
channels.add(connections.get(0).createChannel(false));
Expand Down Expand Up @@ -422,7 +426,9 @@ public void hangOnClose() throws Exception {
socket.close();
proxy.close();
}
catch (Exception ee) { }
catch (Exception ee) {

}
}
}
});
Expand All @@ -438,7 +444,9 @@ public void hangOnClose() throws Exception {
socket.close();
proxy.close();
}
catch (Exception ee) { }
catch (Exception ee) {

}
}
}
socket.close();
Expand Down
Expand Up @@ -781,7 +781,9 @@ private void testPublisherConfirmCloseConcurrency(final int closeAfter) throws E
try {
t.convertAndSend(ROUTE, (Object) "message", new CorrelationData("abc"));
}
catch (AmqpException e) { }
catch (AmqpException e) {

}
}
return null;
});
Expand Down
2 changes: 1 addition & 1 deletion src/reference/asciidoc/si-amqp.adoc
Expand Up @@ -32,7 +32,7 @@ The following example shows how to configure an inbound channel adapter:
==== Outbound Channel Adapter

To send AMQP Messages to an exchange, you can configure an `<outbound-channel-adapter>`.
You can optionallyi provide a 'routing-key' in addition to the exchange name.
You can optionally provide a 'routing-key' in addition to the exchange name.
The following example shows how to define an outbound channel adapter:

====
Expand Down

0 comments on commit 3edcd9a

Please sign in to comment.