diff --git a/spring-integration-cassandra/build.gradle b/spring-integration-cassandra/build.gradle index c56fd69..17f9749 100644 --- a/spring-integration-cassandra/build.gradle +++ b/spring-integration-cassandra/build.gradle @@ -1,15 +1,14 @@ plugins { - id 'java' + id 'java-library' id 'eclipse' id 'idea' id 'jacoco' id 'org.sonarqube' version '2.8' id 'checkstyle' id 'io.spring.dependency-management' version '1.0.9.RELEASE' + id 'com.jfrog.artifactory' version '4.15.2' } -apply from: "${rootProject.projectDir}/publish-maven.gradle" - description = 'Spring Integration Cassandra Support' group = 'org.springframework.integration' @@ -23,13 +22,13 @@ repositories { } ext { - assertjVersion = '3.15.0' + assertjVersion = '3.16.1' cassandraUnitVersion = '4.3.1.0' - junitVersion = '5.6.0' - reactorVersion = 'Dysprosium-SR4' + junitVersion = '5.6.2' + reactorVersion = 'Dysprosium-SR7' slf4jVersion = '1.7.30' - springDataVersion = 'Neumann-BUILD-SNAPSHOT' - springIntegrationVersion = '5.3.0.BUILD-SNAPSHOT' + springDataVersion = 'Neumann-SR1' + springIntegrationVersion = '5.3.1.RELEASE' idPrefix = 'cassandra' @@ -67,6 +66,11 @@ compileJava { eclipse.project.natures += 'org.springframework.ide.eclipse.core.springnature' +java { + withJavadocJar() + withSourcesJar() +} + sourceSets { test { resources { @@ -80,29 +84,31 @@ jacoco { } checkstyle { - configFile = file("${rootDir}/src/checkstyle/checkstyle.xml") - toolVersion = '8.29' + configDirectory.set(rootProject.file("src/checkstyle")) + toolVersion = '8.32' } dependencies { - compile 'org.springframework.integration:spring-integration-core' - compile 'org.springframework.data:spring-data-cassandra' + api 'org.springframework.integration:spring-integration-core' + api ('org.springframework.data:spring-data-cassandra') { + exclude group: 'org.codehaus.groovy' + } - testCompile ('org.springframework.integration:spring-integration-test') { + testImplementation ('org.springframework.integration:spring-integration-test') { exclude group: 'junit' } - testCompile "org.assertj:assertj-core:$assertjVersion" - testCompile ("org.cassandraunit:cassandra-unit-spring:$cassandraUnitVersion") { + testImplementation "org.assertj:assertj-core:$assertjVersion" + testImplementation ("org.cassandraunit:cassandra-unit-spring:$cassandraUnitVersion") { exclude group: 'junit' } - testCompile 'io.projectreactor:reactor-test' - testCompile 'org.junit.jupiter:junit-jupiter-api' + testImplementation 'io.projectreactor:reactor-test' + testImplementation 'org.junit.jupiter:junit-jupiter-api' - testRuntime "org.slf4j:jcl-over-slf4j:$slf4jVersion" - testRuntime 'org.junit.jupiter:junit-jupiter-engine' - testRuntime 'org.junit.platform:junit-platform-launcher' + testRuntimeOnly "org.slf4j:jcl-over-slf4j:$slf4jVersion" + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } // enable all compiler warnings; individual projects may customize further @@ -121,24 +127,13 @@ jacocoTestReport { reports { xml.enabled false csv.enabled false - html.destination file("${buildDir}/reports/jacoco/html") + html.destination file("$buildDir/reports/jacoco/html") } } check.dependsOn javadoc build.dependsOn jacocoTestReport - -task sourcesJar(type: Jar) { - archiveClassifier = 'sources' - from sourceSets.main.allJava -} - -task javadocJar(type: Jar) { - archiveClassifier = 'javadoc' - from javadoc -} - sonarqube { properties { property 'sonar.jacoco.reportPath', "${buildDir.name}/jacoco.exec" @@ -200,7 +195,7 @@ task docsZip(type: Zip) { include 'changelog.txt' } - from(api) { + from(javadoc) { into 'api' } } @@ -263,15 +258,9 @@ task depsZip(type: Zip, dependsOn: distZip) { zipTask -> } } -artifacts { - archives sourcesJar - archives javadocJar - archives distZip - archives docsZip - archives schemaZip -} - task dist(dependsOn: assemble) { group = 'Distribution' description = 'Builds -dist, -docs and -schema distribution archives.' } + +apply from: "${rootProject.projectDir}/publish-maven.gradle" diff --git a/spring-integration-cassandra/gradle/wrapper/gradle-wrapper.jar b/spring-integration-cassandra/gradle/wrapper/gradle-wrapper.jar index f3d88b1..62d4c05 100644 Binary files a/spring-integration-cassandra/gradle/wrapper/gradle-wrapper.jar and b/spring-integration-cassandra/gradle/wrapper/gradle-wrapper.jar differ diff --git a/spring-integration-cassandra/gradle/wrapper/gradle-wrapper.properties b/spring-integration-cassandra/gradle/wrapper/gradle-wrapper.properties index 1b16c34..622ab64 100644 --- a/spring-integration-cassandra/gradle/wrapper/gradle-wrapper.properties +++ b/spring-integration-cassandra/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/spring-integration-cassandra/gradlew b/spring-integration-cassandra/gradlew index 2fe81a7..fbd7c51 100755 --- a/spring-integration-cassandra/gradlew +++ b/spring-integration-cassandra/gradlew @@ -82,6 +82,7 @@ esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then @@ -129,6 +130,7 @@ fi if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath diff --git a/spring-integration-cassandra/gradlew.bat b/spring-integration-cassandra/gradlew.bat index 24467a1..a9f778a 100644 --- a/spring-integration-cassandra/gradlew.bat +++ b/spring-integration-cassandra/gradlew.bat @@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @@ -81,6 +84,7 @@ set CMD_LINE_ARGS=%* set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% diff --git a/spring-integration-cassandra/publish-maven.gradle b/spring-integration-cassandra/publish-maven.gradle index b958e98..a058a78 100644 --- a/spring-integration-cassandra/publish-maven.gradle +++ b/spring-integration-cassandra/publish-maven.gradle @@ -1,86 +1,60 @@ -apply plugin: 'maven' +apply plugin: 'maven-publish' -ext.optionalDeps = [] -ext.providedDeps = [] - -ext.optional = { optionalDeps << it } -ext.provided = { providedDeps << it } - -install { - repositories.mavenInstaller { - customizePom(pom, project) - } -} - -def customizePom(pom, gradleProject) { - pom.whenConfigured { generatedPom -> - - // sort to make pom dependencies order consistent to ease comparison of older poms - generatedPom.dependencies = generatedPom.dependencies.sort { dep -> - "$dep.scope:$dep.groupId:$dep.artifactId" - } - - def managedVersions = dependencyManagement.managedVersions - generatedPom.dependencies.findAll{dep -> !dep.version }.each { dep -> - dep.version = managedVersions["${dep.groupId}:${dep.artifactId}"] - } - - // respect 'optional' and 'provided' dependencies - gradleProject.optionalDeps.each { dep -> - generatedPom.dependencies.find { it.artifactId == dep.name }?.optional = true - } - gradleProject.providedDeps.each { dep -> - generatedPom.dependencies.find { it.artifactId == dep.name }?.scope = 'provided' - } - - // eliminate test-scoped dependencies (no need in maven central poms) - generatedPom.dependencies.removeAll { dep -> - dep.scope == 'test' - } - - // add all items necessary for maven central publication - generatedPom.project { - name = gradleProject.description - description = gradleProject.description - url = linkHomepage - organization { - name = 'SpringIO' - url = 'https://spring.io' - } - licenses { - license { - name 'The Apache Software License, Version 2.0' - url 'https://www.apache.org/licenses/LICENSE-2.0.txt' - distribution 'repo' +publishing { + publications { + mavenJava(MavenPublication) { + suppressAllPomMetadataWarnings() + from components.java + artifact docsZip + artifact schemaZip + artifact distZip + pom { + afterEvaluate { + name = project.description + description = project.description } - } - - scm { url = linkScmUrl - connection = "scm:git:$linkScmConnection" - developerConnection = "scm:git:$linkScmDevConnection" - } - - issueManagement { - system = 'GutHub' - url = linkIssue - } - - developers { - developer { - id = 'abilan' - name = 'Artem Bilan' - email = 'abilan@pivotal.io' - roles = ['project lead'] + organization { + name = 'Spring IO' + url = 'https://spring.io/projects/spring-integration' } - developer { - id = 'garyrussell' - name = 'Gary Russell' - email = 'grussell@pivotal.io' - roles = ["project lead emeritus"] + licenses { + license { + name = 'Apache License, Version 2.0' + url = 'https://www.apache.org/licenses/LICENSE-2.0' + distribution = 'repo' + } + } + scm { + url = linkScmUrl + connection = linkScmConnection + developerConnection = linkScmDevConnection + } + developers { + developer { + id = 'artembilan' + name = 'Artem Bilan' + email = 'abilan@pivotal.io' + roles = ['project lead'] + } + } + issueManagement { + system = 'GitHub' + url = linkIssue + } + } + versionMapping { + usage('java-api') { + fromResolutionResult() + } + usage('java-runtime') { + fromResolutionResult() } - } } } } + +artifactoryPublish { + publications(publishing.publications.mavenJava) +} diff --git a/spring-integration-cassandra/src/checkstyle/checkstyle.xml b/spring-integration-cassandra/src/checkstyle/checkstyle.xml index f0aeb0f..2c50c77 100644 --- a/spring-integration-cassandra/src/checkstyle/checkstyle.xml +++ b/spring-integration-cassandra/src/checkstyle/checkstyle.xml @@ -3,17 +3,15 @@ - + - + - - - +