geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tush...@apache.org
Subject [72/79] incubator-geode git commit: GEODE-300: New gradle build file for pulse
Date Tue, 03 Nov 2015 11:26:34 GMT
GEODE-300: New gradle build file for pulse

Adding a gradle build for pulse. Modified project gradle scripts to
include pulse during build.


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

Branch: refs/heads/feature/GEODE-17
Commit: fc7fcf9c13f86885316daf642a94cb75d4cec144
Parents: 5f82490
Author: Nitin Lamba <nitin@ampool.io>
Authored: Tue Sep 1 14:48:27 2015 -0700
Committer: tushark <tushark@apache.org>
Committed: Tue Nov 3 16:54:35 2015 +0530

----------------------------------------------------------------------
 build.gradle                                    |   8 +-
 gemfire-assembly/build.gradle                   |   9 +-
 .../management/internal/AgentUtilJUnitTest.java |  14 +-
 pulse/build.gradle                              | 149 +++++++++++++++++++
 settings.gradle                                 |   1 +
 5 files changed, 169 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fc7fcf9c/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index d7b4965..44be620 100755
--- a/build.gradle
+++ b/build.gradle
@@ -374,11 +374,9 @@ subprojects {
         maxHeapSize '768m'
         jvmArgs = ['-XX:+HeapDumpOnOutOfMemoryError', '-XX:MaxPermSize=256M', '-ea']
 
-        systemProperties = [
-          'gemfire.DEFAULT_MAX_OPLOG_SIZE' : '10',
-          'gemfire.disallowMcastDefaults'  : 'true',
-          'jline.terminal'                 : 'jline.UnsupportedTerminal',
-        ]
+        systemProperty 'gemfire.DEFAULT_MAX_OPLOG_SIZE', '10'
+        systemProperty 'gemfire.disallowMcastDefaults', 'true'
+        systemProperty 'jline.terminal', 'jline.UnsupportedTerminal'
 
         def eol = System.getProperty('line.separator')
         def progress = new File(resultsDir, "$test.name-progress.txt")

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fc7fcf9c/gemfire-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-assembly/build.gradle b/gemfire-assembly/build.gradle
index f65930d..c4d9581 100755
--- a/gemfire-assembly/build.gradle
+++ b/gemfire-assembly/build.gradle
@@ -27,6 +27,7 @@ dependencies {
   archives project(':gemfire-core')  
   archives project(':gemfire-web')
   archives project(':gemfire-web-api')
+  archives project(':pulse')
 
   testCompile project(path: ':gemfire-junit', configuration: 'testOutput')
   testCompile project(path: ':gemfire-core', configuration: 'testOutput')
@@ -184,7 +185,7 @@ distributions {
 
         // include this jar        
         from project(":gemfire-web-api").jar.outputs.files.getFiles()
-        
+
         // dependency jars
         from depsJar
         from gfshDepsJar
@@ -198,6 +199,12 @@ distributions {
           exclude '*.jar'
         }
       }
+
+      into ('tools/Pulse') {
+        from (project(":pulse").configurations.archives.allArtifacts.files) {
+          exclude '*.jar'
+        }
+      }
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fc7fcf9c/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java
b/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java
index cd2c429..5c897d0 100644
--- a/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java
+++ b/gemfire-assembly/src/test/java/com/gemstone/gemfire/management/internal/AgentUtilJUnitTest.java
@@ -51,12 +51,14 @@ public class AgentUtilJUnitTest {
     assertNotNull(gemFireWarLocation, "GemFire REST API WAR File was not found");
   }
 
-  @Ignore("This test should be activated when pulse gets added to Geode")
-  @Test
-  public void testPulseWarExists() {
-    String gemFireWarLocation = agentUtil.getPulseWarLocation();
-    assertNotNull(gemFireWarLocation, "Pulse WAR File was not found");
-  }
+  /*
+   * This test should be activated when pulse gets added to Geode
+   */
+   @Test
+   public void testPulseWarExists() {
+   String gemFireWarLocation = agentUtil.getPulseWarLocation();
+   assertNotNull(gemFireWarLocation, "Pulse WAR File was not found");
+   }
 
   private String getGemfireVersion() {
     String version = null;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fc7fcf9c/pulse/build.gradle
----------------------------------------------------------------------
diff --git a/pulse/build.gradle b/pulse/build.gradle
new file mode 100755
index 0000000..b2bd5fc
--- /dev/null
+++ b/pulse/build.gradle
@@ -0,0 +1,149 @@
+apply plugin: 'war'
+
+sourceSets {// Force new dependencies only - do no inherit from parent project
+  main {
+    resources {
+      exclude('**/*.txt')
+      exclude('**/gemfire*.properties')
+      exclude('**/sqlfire.properties')
+    }
+  }
+  test {
+    output.resourcesDir = output.classesDir
+    resources {
+      include('**/pulse.properties')
+    }
+  }
+}
+
+dependencies {
+  compile 'org.apache.commons:com.springsource.org.apache.commons.beanutils:1.8.0'
+  compile 'org.apache.commons:com.springsource.org.apache.commons.collections:3.2.0'
+  compile 'org.apache.commons:com.springsource.org.apache.commons.digester:1.8.1'
+  compile 'org.apache.commons:com.springsource.org.apache.commons.logging:1.1.1'
+  compile 'commons-lang:commons-lang:2.6'
+  compile 'org.springframework.ldap:spring-ldap-core:1.3.2.RELEASE'
+  compile 'org.springframework.security:spring-security-config:3.1.7.RELEASE'
+  compile 'org.springframework.security:spring-security-core:3.1.7.RELEASE'
+  compile 'org.springframework.security:spring-security-ldap:3.1.7.RELEASE'
+  compile 'org.springframework.security:spring-security-web:3.1.7.RELEASE'
+  compile 'org.springframework:spring-tx:3.2.12.RELEASE'
+
+  providedCompile 'commons-logging:commons-logging:1.1.3'
+  providedCompile 'commons-codec:commons-codec:1.6'
+  providedCompile 'org.apache.httpcomponents:fluent-hc:4.3.3'
+  providedCompile 'org.apache.httpcomponents:httpclient:4.3.3'
+  providedCompile 'org.apache.httpcomponents:httpclient-cache:4.3.3'
+  providedCompile 'org.apache.httpcomponents:httpcore:4.3.2'
+  providedCompile 'org.apache.httpcomponents:httpmime:4.3.3'
+
+  provided 'org.mortbay.jetty:servlet-api:2.5-20081211'
+
+  testCompile 'junit:junit:4.10'
+  testCompile 'org.apache.tomcat.embed:tomcat-embed-core:7.0.30'
+  testCompile 'org.apache.tomcat.embed:tomcat-embed-jasper:7.0.30'
+  testCompile 'org.apache.tomcat.embed:tomcat-embed-logging-juli:7.0.30'
+  testCompile 'org.seleniumhq.selenium:selenium-server-standalone:2.41.0'
+//  testCompile 'org.seleniumhq.selenium:selenium-server:2.47.1'
+
+  // Required only for creating test categories
+//  testPulseCompile project(path: ':gemfire-junit', configuration: 'testOutput')
+
+}
+
+jar {
+  from sourceSets.main.output
+}
+
+artifacts {
+  archives jar
+}
+
+def pulseWarFile = "pulse.war"
+
+war {
+  // TODO include the jar but exclude the classes from the war file?
+//  classpath jar
+//  rootSpec.exclude("**/*.class")
+//  includeEmptyDirs = false
+
+//  from('release/3rdparty_licenses') {
+//    include 'open_source_licenses-Pivotal_GemFire_Pulse_8.1.0.txt'
+//    into '.'
+//    rename { String fileName ->
+//      fileName.replace("open_source_licenses-Pivotal_GemFire_Pulse_8.1.0.txt", "oslicenses.txt")
+//    }
+//  }
+
+  archiveName pulseWarFile
+}
+
+test {
+
+  include '**/junit/*.class'
+  exclude '**/AllTests.class'
+  exclude '**/Base*.class'
+
+  systemProperty 'pulse.propfile', "$projectDir/src/test/resources/test.properties"
+  systemProperty 'pulse.war', "$buildDir/libs/$pulseWarFile"
+
+  useJUnit {
+    // TODO: Classify and add categories to different Pulse tests
+//    includeCategories 'com.gemstone.gemfire.test.junit.categories.UnitTest'
+//    excludeCategories 'com.gemstone.gemfire.test.junit.categories.IntegrationTest'
+//    excludeCategories 'com.gemstone.gemfire.test.junit.categories.DistributedTest'
+  }
+
+  // show standard out and standard error of the test JVM(s) on the console
+  testLogging.showStandardStreams = true
+
+}
+
+integrationTest {
+
+// Run tests individually
+//  include '**/PulseUITest.class'
+//  include '**/PulseTests.class'
+//  include '**/PulseAutomatedTests.class'
+
+  include '**/*Tests.class'
+  include '**/*Test.class'
+  exclude '**/AllTests.class'
+  exclude '**/junit/*.class'
+  exclude '**/Base*.class'
+
+  systemProperty 'pulse.propfile', "$projectDir/src/test/resources/test.properties"
+  systemProperty 'pulse.war', "$buildDir/libs/$pulseWarFile"
+
+  useJUnit() {
+
+    // TODO: Classify and add categories to different Pulse tests
+//    includeCategories 'com.gemstone.gemfire.test.junit.categories.UnitTest'
+//    excludeCategories 'com.gemstone.gemfire.test.junit.categories.IntegrationTest'
+//    excludeCategories 'com.gemstone.gemfire.test.junit.categories.DistributedTest'
+
+  }
+  // show standard out and standard error of the test JVM(s) on the console
+  testLogging.showStandardStreams = true
+
+}
+
+// TODO: Implement checkMissedTests & classify/ add categories to different Pulse tests
+//This target does not run any tests. Rather, it validates that there are no
+//tests that are missing a category annotation
+//checkMissedTests {
+//  include '**/*Tests.class'
+//  include '**/*Test.class'
+//  exclude '**/AllTests.class'
+//  exclude '**/Base*.class'
+//
+//  useJUnit {
+//    excludeCategories 'com.gemstone.gemfire.test.junit.categories.UnitTest'
+//    excludeCategories 'com.gemstone.gemfire.test.junit.categories.IntegrationTest'
+//  }
+//
+//  beforeTest { descriptor ->
+//    throw new GradleException("The test " + descriptor.getClassName() + "." + descriptor.getName()
+ " does not include a junit category.");
+//  }
+//
+//}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fc7fcf9c/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index 4b2da7b..a3b34bb 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -7,6 +7,7 @@ include 'gemfire-junit'
 include 'gemfire-core'
 include 'gemfire-web'
 include 'gemfire-web-api'
+include 'pulse'
 include 'gemfire-assembly'
 include 'gemfire-rebalancer'
 


Mime
View raw message