Skip to content

Commit

Permalink
GEODE-7241 Refactor publish.gradle into -java and -war types (apache#…
Browse files Browse the repository at this point in the history
…4091)

Allows publication of Jar or War artifacts via an `apply` statement.
We then apply publish-war.gradle to our projects that build war
artifacts (and that we want to publish) and publish-java.gradle to the
jar libraries that we want to publish.

* Refactor publish.gradle into -java and -war types
* Use facets for test structures in geode-web-management

Replaces custom configuration and source-sets with the facets plug in, like we do elsewhere int he project
* geode-pulse is a WAR not a JAR. Fix its publication and expected pom.
* enable jar in build for test linking
  • Loading branch information
robbadler authored Oct 4, 2019
1 parent 0e3f884 commit 7597643
Show file tree
Hide file tree
Showing 35 changed files with 106 additions and 636 deletions.
2 changes: 1 addition & 1 deletion boms/geode-client-bom/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"

apply plugin: "io.spring.dependency-management"
apply from: "${project.projectDir}/../../gradle/publish.gradle"
apply from: "${project.projectDir}/../../gradle/publish-common.gradle"

jar.enabled = false

Expand Down
2 changes: 1 addition & 1 deletion geode-assembly/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ evaluationDependsOnChildren()
}

apply plugin: 'distribution'
apply from: "${rootDir}/${scriptDir}/publish.gradle"
apply from: "${rootDir}/${scriptDir}/publish-common.gradle"


// This subproject's 'publication' is not a jar and should not be constrained to match versions
Expand Down
2 changes: 1 addition & 1 deletion geode-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"

apply from: "${project.projectDir}/../gradle/publish.gradle"
apply from: "${project.projectDir}/../gradle/publish-java.gradle"

dependencies {
compile(platform(project(':boms:geode-all-bom')))
Expand Down
2 changes: 1 addition & 1 deletion geode-concurrency-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"

apply from: "${project.projectDir}/../gradle/publish.gradle"
apply from: "${project.projectDir}/../gradle/publish-java.gradle"

dependencies {
compile(platform(project(':boms:geode-all-bom')))
Expand Down
2 changes: 1 addition & 1 deletion geode-connectors/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ repositories {
}
}

apply from: "${project.projectDir}/../gradle/publish.gradle"
apply from: "${project.projectDir}/../gradle/publish-java.gradle"

configurations {
//Configuration used to download mysql jar
Expand Down
2 changes: 1 addition & 1 deletion geode-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ plugins {
apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"

apply plugin: 'antlr'
apply from: "${project.projectDir}/../gradle/publish.gradle"
apply from: "${project.projectDir}/../gradle/publish-java.gradle"
apply from: "${project.projectDir}/../gradle/pmd.gradle"

sourceSets {
Expand Down
2 changes: 1 addition & 1 deletion geode-cq/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"

apply from: "${project.projectDir}/../gradle/publish.gradle"
apply from: "${project.projectDir}/../gradle/publish-java.gradle"


dependencies {
Expand Down
2 changes: 1 addition & 1 deletion geode-dunit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"

apply from: "${project.projectDir}/../gradle/publish.gradle"
apply from: "${project.projectDir}/../gradle/publish-java.gradle"


dependencies {
Expand Down
2 changes: 1 addition & 1 deletion geode-experimental-driver/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"

apply from: "${project.projectDir}/../gradle/publish.gradle"
apply from: "${project.projectDir}/../gradle/publish-java.gradle"


dependencies {
Expand Down
2 changes: 1 addition & 1 deletion geode-http-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"

apply from: "${project.projectDir}/../gradle/publish.gradle"
apply from: "${project.projectDir}/../gradle/publish-java.gradle"

dependencies {
compile(platform(project(':boms:geode-all-bom')))
Expand Down
2 changes: 1 addition & 1 deletion geode-junit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"

apply from: "${project.projectDir}/../gradle/publish.gradle"
apply from: "${project.projectDir}/../gradle/publish-java.gradle"


dependencies {
Expand Down
2 changes: 1 addition & 1 deletion geode-log4j/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ plugins {

apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"

apply from: "${project.projectDir}/../gradle/publish.gradle"
apply from: "${project.projectDir}/../gradle/publish-java.gradle"

dependencies {
api(platform(project(':boms:geode-all-bom')))
Expand Down
2 changes: 1 addition & 1 deletion geode-logging/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"

apply from: "${project.projectDir}/../gradle/publish.gradle"
apply from: "${project.projectDir}/../gradle/publish-java.gradle"

dependencies {
compile(platform(project(':boms:geode-all-bom')))
Expand Down
2 changes: 1 addition & 1 deletion geode-lucene/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"

apply from: "${project.projectDir}/../gradle/publish.gradle"
apply from: "${project.projectDir}/../gradle/publish-java.gradle"


dependencies {
Expand Down
2 changes: 1 addition & 1 deletion geode-management/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"

apply from: "${project.projectDir}/../gradle/publish.gradle"
apply from: "${project.projectDir}/../gradle/publish-java.gradle"

dependencies {
compile(platform(project(':boms:geode-all-bom')))
Expand Down
2 changes: 1 addition & 1 deletion geode-memcached/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"

apply from: "${project.projectDir}/../gradle/publish.gradle"
apply from: "${project.projectDir}/../gradle/publish-java.gradle"

dependencies {
implementation(platform(project(':boms:geode-all-bom')))
Expand Down
2 changes: 1 addition & 1 deletion geode-old-client-support/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"

apply from: "${project.projectDir}/../gradle/publish.gradle"
apply from: "${project.projectDir}/../gradle/publish-java.gradle"


dependencies {
Expand Down
2 changes: 1 addition & 1 deletion geode-protobuf-messages/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ buildscript {

apply plugin: 'com.google.protobuf'
apply plugin: 'idea'
apply from: "${project.projectDir}/../gradle/publish.gradle"
apply from: "${project.projectDir}/../gradle/publish-java.gradle"

dependencies {
api(platform(project(':boms:geode-all-bom')))
Expand Down
2 changes: 1 addition & 1 deletion geode-protobuf/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"

apply from: "${project.projectDir}/../gradle/publish.gradle"
apply from: "${project.projectDir}/../gradle/publish-java.gradle"


dependencies {
Expand Down
8 changes: 5 additions & 3 deletions geode-pulse/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ evaluationDependsOn(':geode-core')
apply from: "${rootDir}/${scriptDir}/standard-subproject-configuration.gradle"
apply plugin: 'war'

apply from: "${project.projectDir}/../gradle/publish.gradle"
apply from: "${project.projectDir}/../gradle/publish-war.gradle"

jar.enabled = true

dependencies {
compile(platform(project(':boms:geode-all-bom')))
Expand All @@ -31,7 +32,7 @@ dependencies {
compile('org.springframework.security:spring-security-core')
compile('javax.servlet:javax.servlet-api')
compile('mx4j:mx4j') {
ext.optional = true
ext.optional = true
}
compile('mx4j:mx4j-remote') {
ext.optional = true
Expand All @@ -58,7 +59,7 @@ dependencies {
compile('commons-digester:commons-digester')
compile('org.apache.commons:commons-lang3')
compile('org.springframework.ldap:spring-ldap-core')

compile('org.springframework.security:spring-security-config') {
exclude module: 'aopalliance'
exclude module: 'spring-expression'
Expand Down Expand Up @@ -169,6 +170,7 @@ artifacts {
}

war {
enabled = true
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
classpath configurations.runtimeClasspath
}
Expand Down
Loading

0 comments on commit 7597643

Please sign in to comment.