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 2015/09/09 19:44:16 UTC
incubator-geode git commit: GEODE-300: New gradle build file for pulse
Repository: incubator-geode
Updated Branches:
refs/heads/feature/GEODE-12 c4f7ff44e -> a840a2a85
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/a840a2a8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/a840a2a8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/a840a2a8
Branch: refs/heads/feature/GEODE-12
Commit: a840a2a85cf370c52d75b34054374bc227166263
Parents: c4f7ff4
Author: Nitin Lamba <ni...@ampool.io>
Authored: Tue Sep 1 14:48:27 2015 -0700
Committer: Dan Smith <up...@apache.org>
Committed: Wed Sep 9 10:33:40 2015 -0700
----------------------------------------------------------------------
build.gradle | 8 +-
gemfire-assembly/build.gradle | 9 +-
.../src/test/java/AgentUtilJUnitTest.java | 10 +-
pulse/build.gradle | 149 +++++++++++++++++++
settings.gradle | 1 +
5 files changed, 166 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/a840a2a8/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 3bad39c..1a6f68c 100755
--- a/build.gradle
+++ b/build.gradle
@@ -367,11 +367,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/a840a2a8/gemfire-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-assembly/build.gradle b/gemfire-assembly/build.gradle
index 0e51563..28066ec 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')
@@ -183,7 +184,7 @@ distributions {
// include this jar
from project(":gemfire-web-api").jar.outputs.files.getFiles()
-
+
// dependency jars
from depsJar
from gfshDepsJar
@@ -197,6 +198,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/a840a2a8/gemfire-assembly/src/test/java/AgentUtilJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-assembly/src/test/java/AgentUtilJUnitTest.java b/gemfire-assembly/src/test/java/AgentUtilJUnitTest.java
index 0f7563b..bf4cf9c 100644
--- a/gemfire-assembly/src/test/java/AgentUtilJUnitTest.java
+++ b/gemfire-assembly/src/test/java/AgentUtilJUnitTest.java
@@ -55,11 +55,11 @@ public class AgentUtilJUnitTest {
/*
* 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");
- // }
+ @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/a840a2a8/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/a840a2a8/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index 7f6ed61..082cee5 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'
def minimumGradleVersion = '2.3'