GEODE-1513: Remove duplicate jars from war files

Remove duplicate jar files from the lib directory of the
geode-web, geode-web-api, and geode-pulse war archives. Gradle
doesn't appear to be doing the correct thing, so force it using
a duplicates strategy.  In addition, do not create geode-web-api
or geode-pulse jar files.  These don't seem to be used anywhere.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/36273278
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/36273278
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/36273278

Branch: refs/heads/develop
Commit: 362732786eae2fa206df2b818ce553b70323fee1
Parents: 4562e46
Author: Anthony Baker <aba...@apache.org>
Authored: Sun Sep 18 18:05:24 2016 -0700
Committer: Anthony Baker <aba...@apache.org>
Committed: Wed Sep 21 12:39:51 2016 -0700

----------------------------------------------------------------------
 geode-assembly/build.gradle | 7 +------
 geode-pulse/build.gradle    | 9 +--------
 geode-web-api/build.gradle  | 8 +++-----
 geode-web/build.gradle      | 2 +-
 4 files changed, 6 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/36273278/geode-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle
index 3ed864b..a83b7a9 100755
--- a/geode-assembly/build.gradle
+++ b/geode-assembly/build.gradle
@@ -342,9 +342,6 @@ distributions {
         from { project(":geode-core").raJar }
         from { project(":geode-core").jcaJar }
 
-        // include this jar        
-        from project(":geode-web-api").jar
-        
         // dependency jars
         from depsJar
         from gfshDepsJar
@@ -364,9 +361,7 @@ distributions {
       }
 
       into ('tools/Pulse') {
-        from 
(project(":geode-pulse").configurations.archives.allArtifacts.files) {
-          exclude '*.jar'
-        }
+        from 
(project(":geode-pulse").configurations.archives.allArtifacts.files)
       }
 
       into ('tools/Modules') {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/36273278/geode-pulse/build.gradle
----------------------------------------------------------------------
diff --git a/geode-pulse/build.gradle b/geode-pulse/build.gradle
index e53a698..c58da78 100755
--- a/geode-pulse/build.gradle
+++ b/geode-pulse/build.gradle
@@ -26,10 +26,6 @@ sourceSets {
 }
 
 dependencies {
-
-
-
-
   compile 'org.springframework:spring-beans:' + 
project.'springframework.version'
   
   compile 'commons-beanutils:commons-beanutils:' + 
project.'commons-beanutils.version'
@@ -105,10 +101,6 @@ task copyGemFireVersionFile(type: Copy) {
   into generatedResources
 }
 
-jar {
-  from sourceSets.main.output
-}
-
 eclipse.classpath.file {
   whenMerged { classpath ->
     classpath.entries.removeAll { entry -> 
entry.path.contains('geode-core/build')}
@@ -125,6 +117,7 @@ artifacts {
 }
 
 war {
+  duplicatesStrategy = DuplicatesStrategy.EXCLUDE
   classpath configurations.runtime
   classpath project(':geode-core').webJar.archivePath
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/36273278/geode-web-api/build.gradle
----------------------------------------------------------------------
diff --git a/geode-web-api/build.gradle b/geode-web-api/build.gradle
index 388dbba..9e93bb9 100755
--- a/geode-web-api/build.gradle
+++ b/geode-web-api/build.gradle
@@ -74,11 +74,9 @@ dependencies {
   provided project(':geode-core')
 }
 
-jar {
-  from sourceSets.main.output
-}
-
 war {
+  duplicatesStrategy = DuplicatesStrategy.EXCLUDE
+  // this shouldn't be necessary but if it's not specified we're missing some 
of the jars
+  // from the runtime classpath
   classpath configurations.runtime
 }
-

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/36273278/geode-web/build.gradle
----------------------------------------------------------------------
diff --git a/geode-web/build.gradle b/geode-web/build.gradle
index 75844d3..ffab391 100755
--- a/geode-web/build.gradle
+++ b/geode-web/build.gradle
@@ -82,7 +82,7 @@ integrationTest {
 
 war {
   dependsOn ':geode-core:webJar'
-
+  duplicatesStrategy = DuplicatesStrategy.EXCLUDE
   classpath configurations.runtime
   classpath project(':geode-core').webJar.archivePath
 }

Reply via email to