You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by up...@apache.org on 2016/03/18 21:44:16 UTC

[1/7] incubator-geode git commit: GEODE-27: Removing some forced dependencies

Repository: incubator-geode
Updated Branches:
  refs/heads/develop 0d86c3bd7 -> 8310fd9c0


GEODE-27: Removing some forced dependencies

The version we are picking for these dependencies seemed arbitrary, I
think we should just let them be controlled by gradle.


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

Branch: refs/heads/develop
Commit: 8310fd9c08e121c7acce80c5e226e35e23478eb7
Parents: 163046f
Author: Dan Smith <up...@apache.org>
Authored: Tue Mar 15 15:05:23 2016 -0700
Committer: Dan Smith <up...@apache.org>
Committed: Fri Mar 18 13:43:55 2016 -0700

----------------------------------------------------------------------
 geode-core/build.gradle             | 4 +++-
 gradle/dependency-resolution.gradle | 4 ----
 2 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8310fd9c/geode-core/build.gradle
----------------------------------------------------------------------
diff --git a/geode-core/build.gradle b/geode-core/build.gradle
index 3f4a671..1d12be3 100755
--- a/geode-core/build.gradle
+++ b/geode-core/build.gradle
@@ -80,7 +80,9 @@ dependencies {
     transitive=false
   }
 
-  compile 'com.google.guava:guava:' + project.'guava.version'
+  compile ('com.google.guava:guava:' + project.'guava.version') {
+    ext.optional = true
+  }
   //jsr305 is included only to prevent javadoc warnings about missing annotations in the guava jar
   provided 'com.google.code.findbugs:jsr305:' + project.'jsr305.version'
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8310fd9c/gradle/dependency-resolution.gradle
----------------------------------------------------------------------
diff --git a/gradle/dependency-resolution.gradle b/gradle/dependency-resolution.gradle
index e7f1914..dc247d2 100644
--- a/gradle/dependency-resolution.gradle
+++ b/gradle/dependency-resolution.gradle
@@ -23,16 +23,12 @@ subprojects {
       //These are forced to match our old non-transitive configuration
       //These force statements should be removed and tested with the automatically
       //resolved version
-      force 'commons-logging:commons-logging:' + project.'commons-logging.version'
       force 'org.springframework:spring-context-support:' + project.'springframework.version'
       force 'org.springframework:spring-context-support:' + project.'springframework.version'
       force 'org.springframework:spring-context:' + project.'springframework.version'
       force 'org.springframework:spring-web:' + project.'springframework.version'
       force 'org.springframework:spring-tx:' + project.'springframework.version'
       force 'org.springframework:spring-webmvc:' + project.'springframework.version'
-      force 'javax.activation:activation:' + project.'activation.version'
-      force 'commons-beanutils:commons-beanutils:' + project.'commons-beanutils.version'
-      force 'com.thoughtworks.paranamer:paranamer:' + project.'paranamer.version'
       force 'jline:jline:' + project.'jline.version'
     }
   }


[2/7] incubator-geode git commit: GEODE-27: Adding a test to verify the bundled jars have not changed

Posted by up...@apache.org.
GEODE-27: Adding a test to verify the bundled jars have not changed

This allows us to make sure we don't accidentally start shipping jars
that we didn't intend to.


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

Branch: refs/heads/develop
Commit: db17e38cc6c66729573d8d91de2c1b61f47f2620
Parents: 02b95b4
Author: Dan Smith <up...@apache.org>
Authored: Tue Mar 15 14:43:07 2016 -0700
Committer: Dan Smith <up...@apache.org>
Committed: Fri Mar 18 13:43:55 2016 -0700

----------------------------------------------------------------------
 .../gemstone/gemfire/BundledJarsJUnitTest.java  | 129 +++++++++++++++++++
 .../src/test/resources/expected_jars.txt        |  82 ++++++++++++
 2 files changed, 211 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/db17e38c/geode-assembly/src/test/java/com/gemstone/gemfire/BundledJarsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/BundledJarsJUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/BundledJarsJUnitTest.java
new file mode 100644
index 0000000..8ae3b22
--- /dev/null
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/BundledJarsJUnitTest.java
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.jar.JarFile;
+import java.util.regex.Pattern;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.internal.FileUtil;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import com.gemstone.gemfire.util.test.TestUtil;
+
+@Category(UnitTest.class)
+public class BundledJarsJUnitTest {
+
+  private static final String VERSION_PATTERN = "[0-9-_.v]{3,}.*\\.jar$";
+  protected static final String GEMFIRE_HOME = System.getenv("GEMFIRE");
+  private Set<String> expectedJars;
+  
+  @Before
+  public void loadExpectedJars() throws IOException {
+    String expectedJarFile = TestUtil.getResourcePath(BundledJarsJUnitTest.class, "/expected_jars.txt");
+    
+    expectedJars = Files.lines(Paths.get(expectedJarFile))
+        .collect(Collectors.toSet());
+  }
+  
+  @Test
+  public void verifyBundledJarsHaveNotChanged() throws IOException {
+    TreeMap<String, String> sortedJars = getBundledJars();
+    Stream<String> lines = sortedJars.entrySet().stream().map(entry -> removeVersion(entry.getKey()));
+    Set<String> bundledJarNames = new TreeSet<String>(lines.collect(Collectors.toSet()));
+    
+    Files.write(Paths.get("bundled_jars.txt"), bundledJarNames);
+
+    TreeSet<String> newJars = new TreeSet<String>(bundledJarNames);
+    newJars.removeAll(expectedJars);
+    TreeSet<String> missingJars = new TreeSet<String>(expectedJars);
+    missingJars.removeAll(bundledJarNames);
+    
+    StringBuilder message = new StringBuilder();
+    message.append("The bundled jars have changed. Please make sure you update the licence and notice");
+    message.append("\nas described in https://cwiki.apache.org/confluence/display/GEODE/License+Guide+for+Contributors");
+    message.append("\nWhen fixed, copy geode-assembly/build/test/bundled_jars.txt");
+    message.append("\nto src/test/resources/expected_jars.txt");
+    message.append("\nRemoved Jars\n--------------\n");
+    message.append(String.join("\n", missingJars));
+    message.append("\n\nAdded Jars\n--------------\n");
+    message.append(String.join("\n", newJars));
+    message.append("\n\n");
+    
+    assertTrue(message.toString(), expectedJars.equals(bundledJarNames));
+    
+  }
+
+  /**
+   * Find all of the jars bundled with the project.
+   * Key is the name of the jar, value is the path.
+   */
+  protected TreeMap<String, String> getBundledJars() {
+    File gemfireHomeDirectory= new File(GEMFIRE_HOME);
+
+    assertTrue("Please set the GEMFIRE environment variable to the product installation directory.",
+        gemfireHomeDirectory.isDirectory());
+    
+    List<File> jars = FileUtil.findAll(gemfireHomeDirectory, ".*\\.jar");
+    TreeMap<String, String> sortedJars = new TreeMap<String, String>();
+    jars.stream().forEach(jar -> sortedJars.put(jar.getName(), jar.getPath()));
+    
+    List<File> wars = FileUtil.findAll(gemfireHomeDirectory, ".*\\.war");
+    TreeSet<File> sortedWars = new TreeSet<File>(wars);
+    sortedWars.stream().flatMap(BundledJarsJUnitTest::extractJarNames)
+       .forEach(jar -> sortedJars.put(jar.getName(), jar.getPath()));
+    
+    sortedJars.keySet().removeIf(s -> s.startsWith("geode"));
+    return sortedJars;
+  }
+  
+  private String removeVersion(String name) {
+    return name.replaceAll(VERSION_PATTERN, "");
+  }
+
+  /**
+   * Find of of the jar files embedded within a war
+   */
+  private static Stream<File> extractJarNames(File war) {
+    try (JarFile warContents = new JarFile(war)) {
+      return warContents.stream()
+           //Look for jars in the war
+          .filter(entry -> entry.getName().endsWith(".jar"))
+          //Create a File with a path that includes the war name
+          .map(entry -> new File(war.getName(), entry.getName()))
+          //Materialize the list of files while the war is still open
+          .collect(Collectors.toList()).stream();
+    } catch (IOException e) {
+      throw new RuntimeException(e);
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/db17e38c/geode-assembly/src/test/resources/expected_jars.txt
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/resources/expected_jars.txt b/geode-assembly/src/test/resources/expected_jars.txt
new file mode 100644
index 0000000..a566c4d
--- /dev/null
+++ b/geode-assembly/src/test/resources/expected_jars.txt
@@ -0,0 +1,82 @@
+activation
+antlr
+classmate
+commons-beanutils
+commons-collections
+commons-digester
+commons-fileupload
+commons-io
+commons-lang
+commons-logging
+commons-modeler
+fastutil
+findbugs-annotations
+gfsh-dependencies.jar
+guava
+jackson-annotations
+jackson-core
+jackson-databind
+jackson-module-scala
+jansi
+javax.mail-api
+javax.resource-api
+javax.servlet-api
+javax.transaction-api
+jetty-http
+jetty-io
+jetty-security
+jetty-server
+jetty-servlet
+jetty-util
+jetty-webapp
+jetty-xml
+jgroups
+jline
+jna
+json4s-ast
+json4s-core
+json4s-ext
+json4s-jackson
+json4s-native
+log4j-api
+log4j-core
+log4j-jcl
+log4j-jul
+log4j-slf4j-impl
+lucene-analyzers-common
+lucene-core
+lucene-queries
+lucene-queryparser
+mx4j
+mx4j-remote
+mx4j-tools
+netty-all
+paranamer
+ra.jar
+scala-library
+scala-reflect
+slf4j-api
+snappy-java
+spring-aop
+spring-aspects
+spring-beans
+spring-context
+spring-context-support
+spring-core
+spring-data-commons
+spring-data-gemfire
+spring-expression
+spring-hateoas
+spring-ldap-core
+spring-oxm
+spring-security-config
+spring-security-core
+spring-security-ldap
+spring-security-web
+spring-shell
+spring-tx
+spring-web
+spring-webmvc
+swagger-annotations
+swagger-core
+swagger-springmvc


[5/7] incubator-geode git commit: GEODE-27: Enabling transitive dependencies in the build

Posted by up...@apache.org.
GEODE-27: Enabling transitive dependencies in the build

Removing the code from the build that disabled transitive dependencies.
Adding excludes and forcing some versions to clean up the list of jars
we are pulling in to match what it was before I enabled transitive
dependencies.

A couple of versions don't match because the versions we were pulling in
before were not consistent across submodules for commons logging and
commons-beanutils.

Some of these excludes, and all of the forced versions look suspect.
They need to be reviewed to see if we really need them.


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

Branch: refs/heads/develop
Commit: dc94a890d94381e9fec1b55f3523aa5c2ab379e0
Parents: e2695a5
Author: Dan Smith <up...@apache.org>
Authored: Thu Mar 3 10:35:07 2016 -0800
Committer: Dan Smith <up...@apache.org>
Committed: Fri Mar 18 13:43:55 2016 -0700

----------------------------------------------------------------------
 extensions/geode-modules-hibernate/build.gradle | 15 +++-
 extensions/geode-modules-tomcat7/build.gradle   | 11 +--
 extensions/geode-modules/build.gradle           |  7 +-
 geode-assembly/build.gradle                     | 14 +++-
 geode-core/build.gradle                         | 72 +++++++++++---------
 geode-junit/build.gradle                        |  4 +-
 geode-lucene/build.gradle                       |  4 +-
 geode-pulse/build.gradle                        | 25 ++++---
 geode-rebalancer/build.gradle                   |  9 ++-
 geode-web-api/build.gradle                      | 56 ++++++++++-----
 geode-web/build.gradle                          | 30 +++++---
 gradle/dependency-resolution.gradle             | 26 ++++---
 gradle/java.gradle                              | 27 --------
 13 files changed, 179 insertions(+), 121 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc94a890/extensions/geode-modules-hibernate/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-hibernate/build.gradle b/extensions/geode-modules-hibernate/build.gradle
index 34a76eb..5169b04 100644
--- a/extensions/geode-modules-hibernate/build.gradle
+++ b/extensions/geode-modules-hibernate/build.gradle
@@ -17,11 +17,20 @@
 
 dependencies {
   compile project(':extensions/geode-modules')
-  compile 'org.hibernate:hibernate-core:' + project.'hibernate.version'
-  compile 'org.hibernate:hibernate-annotations:' + project.'hibernate.version'
+  compile ('org.hibernate:hibernate-annotations:' + project.'hibernate.version') {
+    //TODO - do we want these extensions, especially since the show up in testruntime?
+    //If they were needed by our tests, doesn't that mean they will be needed in production?
+    exclude module: 'commons-collections'
+    exclude module: 'dom4j'
+    exclude module: 'hibernate-commons-annotations'
+    exclude module: 'hibernate-jpa-2.0-api'
+    exclude module: 'jta'
+  }
   compile 'org.eclipse.persistence:javax.persistence:' + project.'javax.persistence-api.version'
 
-  runtime 'dom4j:dom4j:' + project.'dom4j.version'
+  runtime ('dom4j:dom4j:' + project.'dom4j.version') {
+    exclude module: 'xml-apis'
+  }
 
   testRuntime 'commons-collections:commons-collections:' + project.'commons-collections.version'
   testRuntime 'org.hibernate:hibernate-commons-annotations:' + project.'hibernate-commons-annotations.version'

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc94a890/extensions/geode-modules-tomcat7/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-tomcat7/build.gradle b/extensions/geode-modules-tomcat7/build.gradle
index c45fa48..07619e8 100644
--- a/extensions/geode-modules-tomcat7/build.gradle
+++ b/extensions/geode-modules-tomcat7/build.gradle
@@ -30,10 +30,13 @@ dependencies {
     exclude group: 'org.apache.tomcat'
   }
 
-  compile 'org.apache.tomcat:tomcat-api:' + project.'tomcat7.version'
-  compile 'org.apache.tomcat:tomcat-catalina:' + project.'tomcat7.version'
-  compile 'org.apache.tomcat:tomcat-coyote:' + project.'tomcat7.version'
-  compile 'org.apache.tomcat:tomcat-util:' + project.'tomcat7.version'
+  compile ('org.apache.tomcat:tomcat-catalina:' + project.'tomcat7.version') {
+    exclude module: 'tomcat-annotations-api'
+    exclude module: 'tomcat-servlet-api'
+  }
+  compile ('org.apache.tomcat:tomcat-coyote:' + project.'tomcat7.version') {
+    exclude module: 'tomcat-servlet-api'
+  }
   compile 'org.apache.tomcat:tomcat-juli:' + project.'tomcat7.version'
 
   testCompile 'org.httpunit:httpunit:' + project.'httpunit.version'

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc94a890/extensions/geode-modules/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/geode-modules/build.gradle b/extensions/geode-modules/build.gradle
index 1389585..e007bca 100644
--- a/extensions/geode-modules/build.gradle
+++ b/extensions/geode-modules/build.gradle
@@ -28,8 +28,11 @@ dependencies {
   compile project(':geode-core')
   
   compile 'org.slf4j:slf4j-api:' + project.'slf4j-api.version'
-  compile 'org.apache.tomcat:catalina:' + project.'tomcat6.version'
-  compile 'org.apache.tomcat:catalina-ha:' + project.'tomcat6.version'
+  compile ('org.apache.tomcat:catalina-ha:' + project.'tomcat6.version') {
+    exclude module: 'annotations-api'
+    exclude module: 'coyote'
+    exclude module: 'tribes'
+  }
   compile 'org.apache.tomcat:juli:' + project.'tomcat6.version'
 
   testCompile 'org.httpunit:httpunit:' + project.'httpunit.version'

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc94a890/geode-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle
index 2213614..186590e 100755
--- a/geode-assembly/build.gradle
+++ b/geode-assembly/build.gradle
@@ -49,8 +49,18 @@ configurations {
 
 dependencies {
   provided project(':geode-core')
-  bundled 'org.springframework.data:spring-data-commons:' + project.'spring-data-commons.version'
-  bundled 'org.springframework.data:spring-data-gemfire:' + project.'spring-data-gemfire.version'
+  bundled ('org.springframework.data:spring-data-commons:' + project.'spring-data-commons.version') {
+    transitive=false
+  }
+  bundled ('org.springframework.data:spring-data-gemfire:' + project.'spring-data-gemfire.version') {
+    transitive=false
+  }
+  bundled ('org.springframework:spring-expression:' + project.'springframework.version') {
+    transitive=false
+  }
+  bundled ('org.springframework:spring-tx:' + project.'springframework.version') {
+    transitive=false
+  }
   
   archives project(':geode-common')  
   archives project(':geode-json')  

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc94a890/geode-core/build.gradle
----------------------------------------------------------------------
diff --git a/geode-core/build.gradle b/geode-core/build.gradle
index 6ecedef..fe5ab7e 100755
--- a/geode-core/build.gradle
+++ b/geode-core/build.gradle
@@ -33,56 +33,62 @@ dependencies {
   provided files("${System.getProperty('java.home')}/../lib/tools.jar")
   compile 'org.jgroups:jgroups:3.6.7.Final'
   compile 'antlr:antlr:' + project.'antlr.version'
-  compile 'com.fasterxml.jackson.core:jackson-annotations:' + project.'jackson.version'
-  compile 'com.fasterxml.jackson.core:jackson-core:' + project.'jackson.version'
   compile 'com.fasterxml.jackson.core:jackson-databind:' + project.'jackson.version'
-  provided 'com.google.guava:guava:' + project.'guava.version'
   compile 'commons-io:commons-io:' + project.'commons-io.version'
   compile 'commons-lang:commons-lang:' + project.'commons-lang.version'
-  compile 'commons-logging:commons-logging:' + project.'commons-logging.version'
-  compile 'commons-modeler:commons-modeler:' + project.'commons-modeler.version'
+  compile ('commons-modeler:commons-modeler:' + project.'commons-modeler.version') {
+    exclude module: 'commons-digester'
+    exclude module: 'commons-logging-api'
+    exclude module: 'mx4j-jmx'
+    exclude module: 'xml-apis'
+  }
   compile 'io.netty:netty-all:' + project.'netty-all.version'
   compile 'it.unimi.dsi:fastutil:' + project.'fastutil.version'
-  compile 'javax.activation:activation:' + project.'activation.version'
   compile 'javax.mail:javax.mail-api:' + project.'javax.mail-api.version'
   compile 'javax.resource:javax.resource-api:' + project.'javax.resource-api.version'
-  compile 'javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version'
-  compile 'javax.transaction:javax.transaction-api:' + project.'javax.transaction-api.version'
   compile 'mx4j:mx4j:' + project.'mx4j.version'
   compile 'mx4j:mx4j-remote:' + project.'mx4j.version'
   compile 'mx4j:mx4j-tools:' + project.'mx4j.version'
   compile 'net.java.dev.jna:jna:' + project.'jna.version'
-  compile 'jline:jline:' + project.'jline.version'
-  provided 'org.apache.hadoop:hadoop-common:' + project.'hadoop.version'
-  provided 'org.apache.hadoop:hadoop-annotations:' + project.'hadoop.version'
-  provided 'org.apache.hadoop:hadoop-hdfs:' + project.'hadoop.version'
-  provided 'org.apache.hadoop:hadoop-mapreduce-client-core:' + project.'hadoop.version'
-  provided 'org.apache.hbase:hbase:' + project.'hbase.version'
+  provided ('org.apache.hadoop:hadoop-common:' + project.'hadoop.version') {
+    transitive=false
+  }
+  provided ('org.apache.hadoop:hadoop-annotations:' + project.'hadoop.version') {
+    transitive=false
+  }
+  provided ('org.apache.hadoop:hadoop-hdfs:' + project.'hadoop.version') {
+    transitive=false
+  }
+  provided ('org.apache.hadoop:hadoop-mapreduce-client-core:' + project.'hadoop.version') {
+    transitive=false
+  }
+  provided ('org.apache.hbase:hbase:' + project.'hbase.version') {
+    transitive=false
+  }
+
+  compile 'com.google.guava:guava:' + project.'guava.version'
+
   compile 'org.apache.logging.log4j:log4j-api:' + project.'log4j.version'
   compile 'org.apache.logging.log4j:log4j-core:' + project.'log4j.version'
+  runtime 'org.fusesource.jansi:jansi:' + project.'jansi.version'
   runtime 'org.apache.logging.log4j:log4j-slf4j-impl:' + project.'log4j.version'
   runtime 'org.apache.logging.log4j:log4j-jcl:' + project.'log4j.version'
   runtime 'org.apache.logging.log4j:log4j-jul:' + project.'log4j.version'
-  compile 'org.eclipse.jetty:jetty-http:' + project.'jetty.version'
-  compile 'org.eclipse.jetty:jetty-io:' + project.'jetty.version'
-  compile 'org.eclipse.jetty:jetty-security:' + project.'jetty.version'
-  compile 'org.eclipse.jetty:jetty-server:' + project.'jetty.version'
-  compile 'org.eclipse.jetty:jetty-servlet:' + project.'jetty.version'
-  compile 'org.eclipse.jetty:jetty-util:' + project.'jetty.version'
   compile 'org.eclipse.jetty:jetty-webapp:' + project.'jetty.version'
-  compile 'org.eclipse.jetty:jetty-xml:' + project.'jetty.version'
-  compile 'org.fusesource.jansi:jansi:' + project.'jansi.version'
-  compile 'org.slf4j:slf4j-api:' + project.'slf4j-api.version'
-  runtime 'org.springframework:spring-aop:' + project.'springframework.version'
-  compile 'org.springframework:spring-beans:' + project.'springframework.version' //only used in AbstractCommandsController
-  compile 'org.springframework:spring-context:' + project.'springframework.version'
-  compile 'org.springframework:spring-context-support:' + project.'springframework.version'
-  compile 'org.springframework:spring-core:' + project.'springframework.version'
-  runtime 'org.springframework:spring-expression:' + project.'springframework.version'
-  compile 'org.springframework:spring-tx:' + project.'springframework.version'
-  compile 'org.springframework:spring-web:' + project.'springframework.version'
-  compile 'org.springframework:spring-webmvc:' + project.'springframework.version'
-  compile 'org.springframework.shell:spring-shell:' + project.'spring-shell.version'
+  runtime ('org.springframework:spring-aop:' + project.'springframework.version') {
+    exclude module: 'aopalliance'
+  }
+  compile ('org.springframework:spring-webmvc:' + project.'springframework.version') {
+    exclude module: 'aopalliance'
+    exclude module: 'spring-aop'
+  }
+  compile ('org.springframework.shell:spring-shell:' + project.'spring-shell.version') {
+    exclude module: 'aopalliance'
+    exclude module: 'asm'
+    exclude module: 'cglib'
+    exclude module: 'guava'
+    exclude module: 'spring-aop'
+  }
   compile 'org.xerial.snappy:snappy-java:' + project.'snappy-java.version'
  
   compile project(':geode-common')

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc94a890/geode-junit/build.gradle
----------------------------------------------------------------------
diff --git a/geode-junit/build.gradle b/geode-junit/build.gradle
index 7aa6562..3e4eb22 100755
--- a/geode-junit/build.gradle
+++ b/geode-junit/build.gradle
@@ -17,6 +17,8 @@
 
 dependencies {
   testCompile 'commons-lang:commons-lang:' + project.'commons-lang.version'
-  compile 'junit:junit:' + project.'junit.version'
+  compile ('junit:junit:' + project.'junit.version') {
+    exclude module: 'hamcrest-core'
+  }
   compile 'org.hamcrest:hamcrest-all:' + project.'hamcrest-all.version'
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc94a890/geode-lucene/build.gradle
----------------------------------------------------------------------
diff --git a/geode-lucene/build.gradle b/geode-lucene/build.gradle
index 55aa756..c1eeb2e 100644
--- a/geode-lucene/build.gradle
+++ b/geode-lucene/build.gradle
@@ -22,7 +22,9 @@ dependencies {
     compile 'org.apache.lucene:lucene-analyzers-common:' + project.'lucene.version'
     compile 'org.apache.lucene:lucene-core:' + project.'lucene.version'
     compile 'org.apache.lucene:lucene-queries:' + project.'lucene.version'
-    compile 'org.apache.lucene:lucene-queryparser:' + project.'lucene.version'
+    compile ('org.apache.lucene:lucene-queryparser:' + project.'lucene.version') {
+      exclude module: 'lucene-sandbox'
+    }
 
     testCompile project(':geode-junit')
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc94a890/geode-pulse/build.gradle
----------------------------------------------------------------------
diff --git a/geode-pulse/build.gradle b/geode-pulse/build.gradle
index 6dc7b02..045d903 100755
--- a/geode-pulse/build.gradle
+++ b/geode-pulse/build.gradle
@@ -30,23 +30,30 @@ dependencies {
 
 
 
-  runtime 'org.springframework:spring-aop:' + project.'springframework.version'
   compile 'org.springframework:spring-beans:' + project.'springframework.version'
-  compile 'org.springframework:spring-context:' + project.'springframework.version'
-  compile 'org.springframework:spring-core:' + project.'springframework.version'
-  compile 'org.springframework:spring-web:' + project.'springframework.version'
-  runtime 'org.springframework:spring-webmvc:' + project.'springframework.version'
   
   compile 'commons-beanutils:commons-beanutils:' + project.'commons-beanutils.version'
   compile 'commons-collections:commons-collections:' + project.'commons-collections.version'
   compile 'commons-digester:commons-digester:' + project.'commons-digester.version'
   compile 'commons-lang:commons-lang:' + project.'commons-lang.version'
   compile 'org.springframework.ldap:spring-ldap-core:' + project.'spring-ldap-core.version'
-  compile 'org.springframework.security:spring-security-config:' + project.'spring-security.version'
-  compile 'org.springframework.security:spring-security-core:' + project.'spring-security.version'
   runtime 'org.springframework:spring-expression:' + project.'springframework.version'
-  compile 'org.springframework.security:spring-security-ldap:' + project.'spring-security.version'
-  compile 'org.springframework.security:spring-security-web:' + project.'spring-security.version'
+  compile ('org.springframework.security:spring-security-config:' + project.'spring-security.version') {
+    exclude module: 'aopalliance'
+    exclude module: 'spring-expression'
+  }
+  compile ('org.springframework.security:spring-security-ldap:' + project.'spring-security.version') {
+    exclude module: 'aopalliance'
+    exclude module: 'spring-asm'
+    exclude module: 'spring-expression'
+    exclude module: 'spring-jdbc'
+  }
+  compile ('org.springframework.security:spring-security-web:' + project.'spring-security.version') {
+    exclude module: 'aopalliance'
+    exclude module: 'spring-asm'
+    exclude module: 'spring-expression'
+    exclude module: 'spring-jdbc'
+  }
   compile 'org.springframework:spring-tx:' + project.'spring-tx.version'
   compile 'com.fasterxml.jackson.core:jackson-annotations:' + project.'jackson.version'
   compile 'com.fasterxml.jackson.core:jackson-core:' + project.'jackson.version'

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc94a890/geode-rebalancer/build.gradle
----------------------------------------------------------------------
diff --git a/geode-rebalancer/build.gradle b/geode-rebalancer/build.gradle
index b9992e9..c21dbf1 100644
--- a/geode-rebalancer/build.gradle
+++ b/geode-rebalancer/build.gradle
@@ -19,11 +19,16 @@ dependencies {
   provided project(':geode-common')
   provided project(':geode-core')
 
-  compile 'org.quartz-scheduler:quartz:' + project.'quartz.version'
+  compile ('org.quartz-scheduler:quartz:' + project.'quartz.version') {
+    exclude module: 'c3p0'
+    exclude module: 'slf4j-api'
+  }
   testCompile project(':geode-junit')
 
   // the following test dependencies are needed for mocking cache instance
   testRuntime 'org.apache.hadoop:hadoop-common:' + project.'hadoop.version'
   testRuntime 'org.apache.hadoop:hadoop-hdfs:' + project.'hadoop.version'
-  runtime 'org.apache.hbase:hbase:' + project.'hbase.version'
+  testRuntime ('org.apache.hbase:hbase:' + project.'hbase.version') {
+    transitive = false
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc94a890/geode-web-api/build.gradle
----------------------------------------------------------------------
diff --git a/geode-web-api/build.gradle b/geode-web-api/build.gradle
index dd5f5ca..6a6599e 100755
--- a/geode-web-api/build.gradle
+++ b/geode-web-api/build.gradle
@@ -20,33 +20,55 @@ apply plugin: 'war'
 dependencies {
 
   compile 'commons-lang:commons-lang:' + project.'commons-lang.version'
-  compile 'commons-fileupload:commons-fileupload:' + project.'commons-fileupload.version'
+  compile ('commons-fileupload:commons-fileupload:' + project.'commons-fileupload.version') {
+    exclude module: 'commons-io'
+  }
   compile 'com.fasterxml:classmate:' + project.'classmate.version'
   compile 'com.fasterxml.jackson.core:jackson-annotations:' + project.'jackson.version'
   compile 'com.fasterxml.jackson.core:jackson-core:' + project.'jackson.version'
   compile 'com.fasterxml.jackson.core:jackson-databind:' + project.'jackson.version'
   compile 'com.fasterxml.jackson.module:jackson-module-scala_2.10:' + project.'jackson-module-scala_2.10.version'
   compile 'com.google.guava:guava:' + project.'guava.version'
-  compile 'com.mangofactory:swagger-springmvc:' + project.'swagger-springmvc.version'
-  compile 'com.thoughtworks.paranamer:paranamer:' + project.'paranamer.version'
+  compile ('com.mangofactory:swagger-springmvc:' + project.'swagger-springmvc.version') { 
+    exclude module: 'aopalliance'
+    exclude module: 'asm'
+    exclude module: 'cglib'
+    exclude module: 'commons-logging'
+    exclude module: 'jackson-jaxrs-json-provider'
+    exclude module: 'jackson-jaxrs-json-provider'
+    exclude module: 'jackson-module-jsonSchema'
+    exclude module: 'joda-convert'
+    exclude module: 'joda-time'
+    exclude module: 'scalap'
+    exclude module: 'slf4j-api'
+    exclude module: 'spring-aop'
+    exclude module: 'spring-beans'
+    exclude module: 'spring-context'
+    exclude module: 'spring-core'
+    exclude module: 'spring-expression'
+    exclude module: 'spring-webmvc'
+    exclude module: 'spring-web'
+  }
   compile 'com.wordnik:swagger-annotations:' + project.'swagger.version'
-  compile 'com.wordnik:swagger-core_2.10:' + project.'swagger.version'
   compile 'org.json4s:json4s-ast_2.10:' + project.'json4s.version'
-  compile 'org.json4s:json4s-ext_2.10:' + project.'json4s.version'
-  compile 'org.json4s:json4s-core_2.10:' + project.'json4s.version'
-  compile 'org.json4s:json4s-jackson_2.10:' + project.'json4s.version'
-  compile 'org.json4s:json4s-native_2.10:' + project.'json4s.version'
   compile 'org.scala-lang:scala-library:' + project.'scala.version'
   compile 'org.scala-lang:scala-reflect:' + project.'scala.version'
-  compile 'org.springframework.hateoas:spring-hateoas:' + project.'spring-hateos.version'
-  runtime 'org.springframework:spring-aop:' + project.'springframework.version'
-  compile 'org.springframework:spring-aspects:' + project.'springframework.version'
-  runtime 'org.springframework:spring-beans:' + project.'springframework.version'
-  runtime 'org.springframework:spring-context:' + project.'springframework.version'
-  runtime 'org.springframework:spring-expression:' + project.'springframework.version'
-  compile 'org.springframework:spring-oxm:' + project.'springframework.version'
-  runtime 'org.springframework:spring-web:' + project.'springframework.version'
-  runtime 'org.springframework:spring-webmvc:' + project.'springframework.version'
+  compile ('org.springframework.hateoas:spring-hateoas:' + project.'spring-hateos.version') {
+    exclude module: 'aopalliance'
+    exclude module: 'commons-logging'
+    exclude module: 'objenesis'
+    exclude module: 'slf4j-api'
+    exclude module: 'spring-core'
+  }
+  compile ('org.springframework:spring-aspects:' + project.'springframework.version') {
+    exclude module: 'aopalliance'
+    exclude module: 'aspectjweaver'
+  }
+  compile ('org.springframework:spring-oxm:' + project.'springframework.version') {
+    exclude module: 'commons-logging'
+    exclude module: 'spring-core'
+    exclude module: 'spring-beans'
+  }
 
   provided 'javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version'
   provided project(':geode-core')

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc94a890/geode-web/build.gradle
----------------------------------------------------------------------
diff --git a/geode-web/build.gradle b/geode-web/build.gradle
index 320782d..1173705 100755
--- a/geode-web/build.gradle
+++ b/geode-web/build.gradle
@@ -18,16 +18,26 @@
 apply plugin: 'war'
 
 dependencies {
-  runtime 'org.springframework:spring-aspects:' + project.'springframework.version'
-  runtime 'org.springframework:spring-aop:' + project.'springframework.version'
-  runtime 'org.springframework:spring-beans:' + project.'springframework.version'
-  runtime 'org.springframework:spring-context:' + project.'springframework.version'
-  runtime 'org.springframework:spring-expression:' + project.'springframework.version'
-  runtime 'org.springframework:spring-oxm:' + project.'springframework.version'
-  runtime 'org.springframework:spring-web:' + project.'springframework.version'
-  runtime 'org.springframework:spring-webmvc:' + project.'springframework.version'
-
-  runtime 'commons-fileupload:commons-fileupload:' + project.'commons-fileupload.version'
+  runtime ('org.springframework:spring-aspects:' + project.'springframework.version') {
+    exclude module: 'aspectjweaver'
+    exclude module: 'aopalliance'
+    exclude module: 'spring-core'
+    exclude module: 'spring-expression'
+  }
+  runtime ('org.springframework:spring-oxm:' + project.'springframework.version') {
+    exclude module: 'commons-logging'
+    exclude module: 'spring-beans'
+    exclude module: 'spring-core'
+  }
+  runtime ('org.springframework:spring-webmvc:' + project.'springframework.version') {
+    exclude module: 'aopalliance'
+    exclude module: 'aspectjweaver'
+    exclude module: 'spring-core'
+    exclude module: 'spring-expression'
+  }
+  runtime ('commons-fileupload:commons-fileupload:' + project.'commons-fileupload.version') {
+    exclude module: 'commons-io'
+  }
 
   testCompile 'org.springframework:spring-test:' + project.'springframework.version'
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc94a890/gradle/dependency-resolution.gradle
----------------------------------------------------------------------
diff --git a/gradle/dependency-resolution.gradle b/gradle/dependency-resolution.gradle
index 1e2b62b..e7f1914 100644
--- a/gradle/dependency-resolution.gradle
+++ b/gradle/dependency-resolution.gradle
@@ -17,17 +17,23 @@
 subprojects {
   configurations.all {
     resolutionStrategy {
-    //  failOnVersionConflict()
+      //failOnVersionConflict()
 
-//    exclude module: 'aopalliance'
-  //    exclude 'asm'
-  //    exclude 'aspectjweaver'
-  //    exclude 'cglib'
-      
-
-  // Force certain versions of transitive dependencies
-  //    force 'asm:asm-all:3.3.1'
-  //    force 'asm:asm-all:3.3.1'
+      //Force certain versions of transitive dependencies
+      //These are forced to match our old non-transitive configuration
+      //These force statements should be removed and tested with the automatically
+      //resolved version
+      force 'commons-logging:commons-logging:' + project.'commons-logging.version'
+      force 'org.springframework:spring-context-support:' + project.'springframework.version'
+      force 'org.springframework:spring-context-support:' + project.'springframework.version'
+      force 'org.springframework:spring-context:' + project.'springframework.version'
+      force 'org.springframework:spring-web:' + project.'springframework.version'
+      force 'org.springframework:spring-tx:' + project.'springframework.version'
+      force 'org.springframework:spring-webmvc:' + project.'springframework.version'
+      force 'javax.activation:activation:' + project.'activation.version'
+      force 'commons-beanutils:commons-beanutils:' + project.'commons-beanutils.version'
+      force 'com.thoughtworks.paranamer:paranamer:' + project.'paranamer.version'
+      force 'jline:jline:' + project.'jline.version'
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc94a890/gradle/java.gradle
----------------------------------------------------------------------
diff --git a/gradle/java.gradle b/gradle/java.gradle
index ba1122b..9f0ff25 100644
--- a/gradle/java.gradle
+++ b/gradle/java.gradle
@@ -61,33 +61,6 @@ subprojects {
     }
   }
 
-  // Here we want to disable all transitive dependencies on external artifacts.  This
-  // allows us to lock down library versions.  However, we want project dependencies to
-  // be transitive such that the libraries of a dependent project are automatically included.
-  configurations.all {
-    dependencies.all { dep ->
-      if (dep instanceof ModuleDependency && !(dep instanceof ProjectDependency)) {
-        dep.transitive = false
-      }
-    }
-  }
-
-  configurations.testCompile {
-    dependencies.all { dep ->
-      if (dep instanceof ModuleDependency) {
-        dep.transitive = true
-      }
-    }
-  }
-
-  configurations.testRuntime {
-    dependencies.all { dep ->
-      if (dep instanceof ModuleDependency) {
-        dep.transitive = true
-      }
-    }
-  }
- 
   // This ensures that javadoc and source jars also have any prefix paths stripped and will
   // be created as libs/foo-sources.jar instead of libs/extensions/foo-sources.jar for example.
   tasks.all { task ->


[6/7] incubator-geode git commit: GEODE-27: Moving findbugs annotations to geode-core

Posted by up...@apache.org.
GEODE-27: Moving findbugs annotations to geode-core

These annotations should not be required to run geode. They are only
used by the findbugs tool. Moving them to the geode-core project to
remove the list of dependencies that we add to all projects.

Changing jsr-305.jar to provided because it's only there to avoid
javadoc warnings.


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

Branch: refs/heads/develop
Commit: 163046f22a3d70699a930f33613161e87dd3e26a
Parents: db17e38
Author: Dan Smith <up...@apache.org>
Authored: Wed Mar 2 14:44:54 2016 -0800
Committer: Dan Smith <up...@apache.org>
Committed: Fri Mar 18 13:43:55 2016 -0700

----------------------------------------------------------------------
 geode-assembly/build.gradle | 8 +++++---
 geode-core/build.gradle     | 3 +++
 gradle/java.gradle          | 5 -----
 3 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/163046f2/geode-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle
index 186590e..c393cd8 100755
--- a/geode-assembly/build.gradle
+++ b/geode-assembly/build.gradle
@@ -316,9 +316,11 @@ distributions {
         from configurations.bundled
 
         from project(":geode-core").configurations.archives.allArtifacts.files
-        from project(":geode-core").webJar
-        from project(":geode-core").raJar
-        from project(":geode-core").jcaJar
+        //These tasks are included as closures (wrapped in {}) because gradle may evaluate
+        //this CopySpec before it evaluates the geode-core build file.
+        from { project(":geode-core").webJar }
+        from { project(":geode-core").raJar }
+        from { project(":geode-core").jcaJar }
         
         from project(":geode-lucene").configurations.runtime
         from project(":geode-lucene").configurations.archives.allArtifacts.files

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/163046f2/geode-core/build.gradle
----------------------------------------------------------------------
diff --git a/geode-core/build.gradle b/geode-core/build.gradle
index 9aa008e..3f4a671 100755
--- a/geode-core/build.gradle
+++ b/geode-core/build.gradle
@@ -31,6 +31,7 @@ dependencies {
    // Source Dependencies
   // External 
   provided files("${System.getProperty('java.home')}/../lib/tools.jar")
+  compile 'com.github.stephenc.findbugs:findbugs-annotations:' + project.'stephenc-findbugs.version'
   compile 'org.jgroups:jgroups:3.6.7.Final'
   compile 'antlr:antlr:' + project.'antlr.version'
   compile 'com.fasterxml.jackson.core:jackson-databind:' + project.'jackson.version'
@@ -80,6 +81,8 @@ dependencies {
   }
 
   compile 'com.google.guava:guava:' + project.'guava.version'
+  //jsr305 is included only to prevent javadoc warnings about missing annotations in the guava jar
+  provided 'com.google.code.findbugs:jsr305:' + project.'jsr305.version'
 
   compile 'org.apache.logging.log4j:log4j-api:' + project.'log4j.version'
   compile 'org.apache.logging.log4j:log4j-core:' + project.'log4j.version'

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/163046f2/gradle/java.gradle
----------------------------------------------------------------------
diff --git a/gradle/java.gradle b/gradle/java.gradle
index 9f0ff25..85e18d8 100644
--- a/gradle/java.gradle
+++ b/gradle/java.gradle
@@ -92,11 +92,6 @@ subprojects {
     options.addStringOption('Xdoclint:none', '-quiet')
     options.encoding='UTF-8'
   }
-
-  dependencies {
-    compile 'com.github.stephenc.findbugs:findbugs-annotations:' + project.'stephenc-findbugs.version'
-    compile 'com.google.code.findbugs:jsr305:' + project.'jsr305.version'
-  }
 }
 
 


[3/7] incubator-geode git commit: GEODE-27: Removing a bogus include of a jetty class

Posted by up...@apache.org.
GEODE-27: Removing a bogus include of a jetty class

This include was not actually used


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

Branch: refs/heads/develop
Commit: e2695a5b5ec0f244a091746108898bb6b4069d69
Parents: 5839e4d
Author: Dan Smith <up...@apache.org>
Authored: Wed Mar 9 16:45:23 2016 -0800
Committer: Dan Smith <up...@apache.org>
Committed: Fri Mar 18 13:43:55 2016 -0700

----------------------------------------------------------------------
 .../gemfire/cache/query/internal/CumulativeNonDistinctResults.java | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e2695a5b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CumulativeNonDistinctResults.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CumulativeNonDistinctResults.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CumulativeNonDistinctResults.java
index 3735956..095f741 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CumulativeNonDistinctResults.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CumulativeNonDistinctResults.java
@@ -27,8 +27,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
-import org.eclipse.jetty.webapp.MetaData;
-
 import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.cache.CacheException;
 import com.gemstone.gemfire.cache.query.QueryException;


[4/7] incubator-geode git commit: GEODE-27: A couple of tools to dump dependencies

Posted by up...@apache.org.
GEODE-27: A couple of tools to dump dependencies

Adding a task to dump all jars in the binary distribution

This makes it easy to see what dependencies we actually end up shipping
with the product. This dumps all jars found in the distribution or
embedded within war files in the distribution.

Adding a task to determine if a dependency is used

This task checks to see if a dependency is used in the source code.


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

Branch: refs/heads/develop
Commit: 5839e4d2a741dd0b84ce0ed20588fb5bb2d62565
Parents: 0d86c3b
Author: Dan Smith <up...@apache.org>
Authored: Tue Mar 8 16:23:39 2016 -0800
Committer: Dan Smith <up...@apache.org>
Committed: Fri Mar 18 13:43:55 2016 -0700

----------------------------------------------------------------------
 build.gradle                        |  1 +
 geode-assembly/build.gradle         | 29 ++++++++++
 gradle/dependency-resolution.gradle | 98 ++++++++++++++++++++++++++++++++
 3 files changed, 128 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5839e4d2/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 19f72a0..200dd8a 100755
--- a/build.gradle
+++ b/build.gradle
@@ -74,6 +74,7 @@ if (name == 'geode') {
 
 apply from: "${scriptDir}/utilities.gradle"
 apply from: "${scriptDir}/java.gradle"
+apply from: "${scriptDir}/dependency-resolution.gradle"
 apply from: "${scriptDir}/test.gradle"
 apply from: "${scriptDir}/publish.gradle"
 apply from: "${scriptDir}/code-analysis.gradle"

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5839e4d2/geode-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle
index d2a5a65..2213614 100755
--- a/geode-assembly/build.gradle
+++ b/geode-assembly/build.gradle
@@ -363,3 +363,32 @@ integrationTest dependOnInstalledProduct
 build.dependsOn installDist
 
 installDist.dependsOn ':extensions/geode-modules-assembly:dist'
+
+/**Print the names of all jar files in a fileTree */
+def printJars(tree) {
+  tree.matching {include("**/*.jar")}.visit{ file -> 
+    if(!file.isDirectory()) {
+      println file.name
+    }
+  };
+}
+
+task dumpInstalledJars(dependsOn: installDist) << {
+  description "Dump a list of all of the jars shipped with the binary distribution, for validation purposes"
+
+  FileTree installDir = fileTree(dir: installDist.destinationDir)
+
+  println("Jars in the binary install")
+  println("==========================")
+  printJars(installDir)
+
+  installDir.include("**/*.war").visit{ file -> 
+    if(!file.isDirectory()) {
+        FileTree warContents = zipTree(file.file)
+        println ""
+        println file.name
+        println("==========================")
+        printJars(warContents);
+    } 
+  };
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5839e4d2/gradle/dependency-resolution.gradle
----------------------------------------------------------------------
diff --git a/gradle/dependency-resolution.gradle b/gradle/dependency-resolution.gradle
new file mode 100644
index 0000000..1e2b62b
--- /dev/null
+++ b/gradle/dependency-resolution.gradle
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+subprojects {
+  configurations.all {
+    resolutionStrategy {
+    //  failOnVersionConflict()
+
+//    exclude module: 'aopalliance'
+  //    exclude 'asm'
+  //    exclude 'aspectjweaver'
+  //    exclude 'cglib'
+      
+
+  // Force certain versions of transitive dependencies
+  //    force 'asm:asm-all:3.3.1'
+  //    force 'asm:asm-all:3.3.1'
+    }
+  }
+
+  //Task to dump all depencies of all projects, in a way
+  //that can be diffed before and after dependency changes
+  task dumpDependencies() << {
+    description "Dump all of the dependencies as a flat, sorted list"
+
+    project.configurations.each{ configuration -> 
+      println( project.name + ":" + configuration.name )
+      println( '-------------------')
+      configuration.resolvedConfiguration.resolvedArtifacts.collect{dep -> dep.file.name}.unique().toSorted().each{dep ->
+        println(dep)
+      }
+      println()
+    }
+  }
+
+  //Task to find all of the jars in a compile task
+  //that are unused
+  task findUsage() << {
+    description "Find usages of a jar in the source code"
+
+    String jarName = System.getProperty("jar.name")
+    if(jar == null || jar == "")  {
+      println "You must specify a jar name: ./gradlew findUsage -Djar.name=commons-io"
+      return
+    }
+    FileTree sourceFiles = compileJava.source
+    FileCollection jars = compileJava.classpath
+
+    File jar = jars.find{file -> file.name.contains(jarName)}
+
+    FileTree jarContents = zipTree(jar)
+    Set packages = new HashSet()
+    jarContents.visit{file -> 
+      if(!file.isDirectory() && !file.path.contains("META-INF")) {
+        packages.add(file.relativePath.parent.toString().replace('/', '.'))
+      }
+    }
+
+    println("Packages")
+    println "========"
+    packages.each { p -> println p  }
+
+    println ""
+    println("Matches")
+    println "========"
+    sourceFiles.visit{ file -> 
+      if(!file.isDirectory()) {
+        boolean matches = false;
+        file.file.eachLine { line ->
+        def matcher = line =~ /^import (.*)\..*;/
+          if(matcher) {
+            def pack = matcher[0][1]
+//            println pack
+            matches |= packages.contains(pack)
+          }
+        }
+
+        if(matches) {
+          println file.relativePath;
+        }
+      }
+    }
+  }
+
+}


[7/7] incubator-geode git commit: GEODE-27: Marking jars as optional in the generated pom

Posted by up...@apache.org.
GEODE-27: Marking jars as optional in the generated pom

Adding support to mark jars as optional by setting an ext.optional
property in the dependency declaration.

Adding the optional property to jars in the geode-core project that are
not required for geode to work.

Some of these optional dependencies will go away if we can move things
like the REST API, gfsh, and management classes into another subproject.


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

Branch: refs/heads/develop
Commit: 02b95b42986e3816d436494e7e488db6a9e26565
Parents: dc94a89
Author: Dan Smith <up...@apache.org>
Authored: Thu Mar 10 14:25:12 2016 -0800
Committer: Dan Smith <up...@apache.org>
Committed: Fri Mar 18 13:43:55 2016 -0700

----------------------------------------------------------------------
 geode-core/build.gradle | 48 ++++++++++++++++++++++++++++++++++----------
 gradle/publish.gradle   | 15 ++++++++++++++
 2 files changed, 52 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/02b95b42/geode-core/build.gradle
----------------------------------------------------------------------
diff --git a/geode-core/build.gradle b/geode-core/build.gradle
index fe5ab7e..9aa008e 100755
--- a/geode-core/build.gradle
+++ b/geode-core/build.gradle
@@ -41,15 +41,28 @@ dependencies {
     exclude module: 'commons-logging-api'
     exclude module: 'mx4j-jmx'
     exclude module: 'xml-apis'
+    ext.optional = true
+  }
+  compile ('io.netty:netty-all:' + project.'netty-all.version') {
+    ext.optional = true
   }
-  compile 'io.netty:netty-all:' + project.'netty-all.version'
   compile 'it.unimi.dsi:fastutil:' + project.'fastutil.version'
-  compile 'javax.mail:javax.mail-api:' + project.'javax.mail-api.version'
+  compile ('javax.mail:javax.mail-api:' + project.'javax.mail-api.version') {
+    ext.optional = true;
+  }
   compile 'javax.resource:javax.resource-api:' + project.'javax.resource-api.version'
-  compile 'mx4j:mx4j:' + project.'mx4j.version'
-  compile 'mx4j:mx4j-remote:' + project.'mx4j.version'
-  compile 'mx4j:mx4j-tools:' + project.'mx4j.version'
-  compile 'net.java.dev.jna:jna:' + project.'jna.version'
+  compile ('mx4j:mx4j:' + project.'mx4j.version') {
+    ext.optional = true;
+  }
+  compile ('mx4j:mx4j-remote:' + project.'mx4j.version') {
+    ext.optional = true;
+  }
+  compile ('mx4j:mx4j-tools:' + project.'mx4j.version') { 
+    ext.optional = true;
+  }
+  compile ('net.java.dev.jna:jna:' + project.'jna.version') {
+    ext.optional = true
+  }
   provided ('org.apache.hadoop:hadoop-common:' + project.'hadoop.version') {
     transitive=false
   }
@@ -71,16 +84,26 @@ dependencies {
   compile 'org.apache.logging.log4j:log4j-api:' + project.'log4j.version'
   compile 'org.apache.logging.log4j:log4j-core:' + project.'log4j.version'
   runtime 'org.fusesource.jansi:jansi:' + project.'jansi.version'
-  runtime 'org.apache.logging.log4j:log4j-slf4j-impl:' + project.'log4j.version'
-  runtime 'org.apache.logging.log4j:log4j-jcl:' + project.'log4j.version'
-  runtime 'org.apache.logging.log4j:log4j-jul:' + project.'log4j.version'
-  compile 'org.eclipse.jetty:jetty-webapp:' + project.'jetty.version'
+  runtime ('org.apache.logging.log4j:log4j-slf4j-impl:' + project.'log4j.version') {
+    ext.optional = true
+  }
+  runtime ('org.apache.logging.log4j:log4j-jcl:' + project.'log4j.version') {
+    ext.optional = true
+  }
+  runtime ('org.apache.logging.log4j:log4j-jul:' + project.'log4j.version') {
+    ext.optional = true
+  }
+  compile ('org.eclipse.jetty:jetty-webapp:' + project.'jetty.version') {
+    ext.optional = true
+  }
   runtime ('org.springframework:spring-aop:' + project.'springframework.version') {
     exclude module: 'aopalliance'
+    ext.optional = true
   }
   compile ('org.springframework:spring-webmvc:' + project.'springframework.version') {
     exclude module: 'aopalliance'
     exclude module: 'spring-aop'
+    ext.optional = true
   }
   compile ('org.springframework.shell:spring-shell:' + project.'spring-shell.version') {
     exclude module: 'aopalliance'
@@ -88,8 +111,11 @@ dependencies {
     exclude module: 'cglib'
     exclude module: 'guava'
     exclude module: 'spring-aop'
+    ext.optional = true
+  }
+  compile ('org.xerial.snappy:snappy-java:' + project.'snappy-java.version') {
+    ext.optional = true
   }
-  compile 'org.xerial.snappy:snappy-java:' + project.'snappy-java.version'
  
   compile project(':geode-common')
   compile project(':geode-joptsimple')

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/02b95b42/gradle/publish.gradle
----------------------------------------------------------------------
diff --git a/gradle/publish.gradle b/gradle/publish.gradle
index 73e4cd3..02b0e3c 100644
--- a/gradle/publish.gradle
+++ b/gradle/publish.gradle
@@ -51,6 +51,21 @@ subprojects {
   ''')
 
       elem.insertBefore(hdr, elem.getFirstChild())
+
+  
+      //This black magic checks to see if a dependency has the flag ext.optional=true
+      //set on it, and if so marks the dependency as optional in the maven pom
+      def depMap = project.configurations.compile.dependencies.collectEntries { [it.name, it] }
+      asNode().dependencies.dependency.findAll {
+        def dep = depMap.get(it.artifactId.text())
+        return dep?.hasProperty('optional') && dep.optional
+      }.each {
+        if (it.optional) {
+            it.optional.value = 'true'
+        } else {
+            it.appendNode('optional', 'true')
+        }
+      }
     }
 
     project {