| sourceSets { |
| jca { |
| compileClasspath += configurations.compile |
| runtimeClasspath += configurations.runtime |
| } |
| } |
| |
| configurations { |
| //declaring new configuration that will be used to associate with artifacts |
| archives |
| } |
| |
| dependencies { |
| provided files("${System.getProperty('java.home')}/../lib/tools.jar") |
| compile 'antlr:antlr:2.7.7' |
| compile 'com.fasterxml.jackson.core:jackson-annotations:2.2.0' |
| compile 'com.fasterxml.jackson.core:jackson-core:2.2.0' |
| compile 'com.fasterxml.jackson.core:jackson-databind:2.2.0' |
| compile 'com.google.code.findbugs:annotations:3.0.0' |
| compile 'commons-io:commons-io:2.3' |
| compile 'commons-logging:commons-logging:1.1.1' |
| compile 'commons-modeler:commons-modeler:2.0' |
| compile 'org.apache.lucene:lucene-analyzers-common:5.0.0' |
| compile 'org.apache.lucene:lucene-core:5.0.0' |
| compile 'org.apache.lucene:lucene-queries:5.0.0' |
| compile 'org.apache.lucene:lucene-queryparser:5.0.0' |
| compile 'it.unimi.dsi:fastutil:7.0.2' |
| compile 'javax.activation:activation:1.1.1' |
| compile 'javax.mail:javax.mail-api:1.4.5' |
| compile 'javax.resource:javax.resource-api:1.7' |
| compile 'javax.servlet:javax.servlet-api:3.1.0' |
| compile 'javax.transaction:javax.transaction-api:1.2' |
| compile 'mx4j:mx4j:3.0.1' |
| compile 'mx4j:mx4j-remote:3.0.1' |
| compile 'mx4j:mx4j-tools:3.0.1' |
| compile 'net.java.dev.jna:jna:4.0.0' |
| compile 'net.sourceforge.jline:jline:1.0.S2-B' |
| compile 'org.eclipse.jetty:jetty-http:9.2.3.v20140905' |
| compile 'org.eclipse.jetty:jetty-io:9.2.3.v20140905' |
| compile 'org.eclipse.jetty:jetty-security:9.2.3.v20140905' |
| compile 'org.eclipse.jetty:jetty-server:9.2.3.v20140905' |
| compile 'org.eclipse.jetty:jetty-servlet:9.2.3.v20140905' |
| compile 'org.eclipse.jetty:jetty-util:9.2.3.v20140905' |
| compile 'org.eclipse.jetty:jetty-webapp:9.2.3.v20140905' |
| compile 'org.eclipse.jetty:jetty-xml:9.2.3.v20140905' |
| compile 'org.fusesource.jansi:jansi:1.8' |
| compile 'org.apache.logging.log4j:log4j-api:2.1' |
| compile 'org.apache.logging.log4j:log4j-core:2.1' |
| runtime 'org.apache.logging.log4j:log4j-slf4j-impl:2.1' |
| runtime 'org.apache.logging.log4j:log4j-jcl:2.1' |
| runtime 'org.apache.logging.log4j:log4j-jul:2.1' |
| compile 'org.slf4j:slf4j-api:1.7.7' |
| compile 'org.springframework.data:spring-data-commons:1.9.1.RELEASE' |
| provided 'org.springframework.data:spring-data-gemfire:1.5.1.RELEASE' |
| compile 'org.springframework:spring-tx:3.2.12.RELEASE' |
| compile 'org.springframework.shell:spring-shell:1.0.0.RELEASE' |
| compile 'org.xerial.snappy:snappy-java:1.1.1.6' |
| provided 'org.apache.hadoop:hadoop-common:2.4.1' |
| provided 'org.apache.hadoop:hadoop-annotations:2.4.1' |
| provided 'org.apache.hadoop:hadoop-hdfs:2.4.1' |
| provided 'org.apache.hadoop:hadoop-mapreduce-client-core:2.4.1' |
| compile 'org.apache.hbase:hbase:0.94.27' |
| provided 'commons-lang:commons-lang:2.5' |
| provided 'com.google.guava:guava:11.0.2' |
| compile 'io.netty:netty-all:4.0.4.Final' |
| |
| testRuntime 'org.apache.hadoop:hadoop-auth:2.4.1' |
| testRuntime 'commons-collections:commons-collections:3.2.1' |
| testRuntime 'commons-configuration:commons-configuration:1.6' |
| testRuntime 'commons-io:commons-io:2.1' |
| testRuntime 'log4j:log4j:1.2.17' |
| |
| compile project(':gemfire-jgroups') |
| compile project(':gemfire-joptsimple') |
| compile project(':gemfire-json') |
| |
| testCompile 'org.apache.bcel:bcel:5.2' |
| testRuntime 'org.apache.derby:derby:10.2.2.0' |
| testCompile 'net.spy:spymemcached:2.9.0' |
| testCompile 'redis.clients:jedis:2.7.2' |
| |
| jcaCompile sourceSets.main.output |
| |
| provided project(path: ':gemfire-junit', configuration: 'testOutput') |
| } |
| |
| def generatedResources = "$buildDir/generated-resources/main" |
| |
| sourceSets { |
| main { |
| output.dir(generatedResources, builtBy: 'createVersionPropertiesFile') |
| } |
| } |
| |
| |
| // task rerunTest(type:Test) { |
| // include '**/CacheXml81DUnitTest.class' |
| // include '**/CacheXml82DUnitTest.class' |
| // include '**/ServerLauncherLocalDUnitTest.class' |
| // include '**/ServerLauncherLocalFileDUnitTest.class' |
| // include '**/JSONPdxClientServerDUnitTest.class' |
| // include '**/PRColocatedEquiJoinDUnitTest.class' |
| // } |
| |
| // Creates the version properties file and writes it to the classes dir |
| task createVersionPropertiesFile { |
| def propertiesFile = file(generatedResources + "/com/gemstone/gemfire/internal/GemFireVersion.properties"); |
| outputs.file propertiesFile |
| inputs.dir compileJava.destinationDir |
| |
| doLast { |
| def gitFolder = new File ("${rootProject.projectDir}/../.git") |
| if ( gitFolder.exists() ) { |
| new ByteArrayOutputStream().withStream { gitBranchStream -> |
| def result = exec { |
| standardOutput = gitBranchStream |
| executable = "git" |
| args = ['rev-parse', '--abbrev-ref', 'HEAD'] |
| } |
| ext.gitBranchString = gitBranchStream.toString() |
| ext.gitBranch = ext.gitBranchString.trim() |
| } |
| |
| new ByteArrayOutputStream().withStream { commitStream -> |
| def result = exec { |
| standardOutput = commitStream |
| executable = "git" |
| args = ['rev-parse', 'HEAD'] |
| } |
| ext.commitIdString = commitStream.toString() |
| ext.commitId = ext.commitIdString.trim() |
| } |
| |
| new ByteArrayOutputStream().withStream { sourceDateStream -> |
| def result = exec { |
| standardOutput = sourceDateStream |
| executable = "git" |
| args = ['show', '-s', '--format=%ci', "${ext.commitId}"] |
| } |
| ext.sourceDateString = sourceDateStream.toString() |
| ext.sourceDate = ext.sourceDateString.trim() |
| } |
| } |
| else { |
| // Not in SCM workspace, use default values |
| ext.gitBranch = 'UNKNOWN' |
| ext.commitId = 'UNKNOWN' |
| ext.sourceDate = new Date().format('yyyy-MM-dd HH:mm:ss Z') |
| } |
| |
| ext.osArch = System.getProperty('os.arch') |
| ext.osName = System.getProperty('os.name') |
| ext.osVersion = System.getProperty('os.version') |
| ext.buildDate = new Date().format('yyyy-MM-dd HH:mm:ss Z') |
| ext.buildNumber = new Date().format('MMddyy') |
| ext.jdkVersion = System.getProperty('java.version') |
| |
| def props = [ |
| "Product-Name" : "Pivotal GemFire", |
| "Product-Version" : version, |
| "Build-Id" : System.env.USER + ' ' + ext.buildNumber, |
| "Build-Date" : ext.buildDate, |
| "Build-Platform" : ext.osName + ' ' + ext.osVersion + ' ' + ext.osArch, |
| "Build-Java-Version": ext.jdkVersion, |
| "Source-Date" : ext.sourceDate, |
| "Source-Revision" : ext.commitId, |
| "Source-Repository" : ext.gitBranch |
| ] as Properties |
| |
| propertiesFile.getParentFile().mkdirs(); |
| new FileOutputStream(propertiesFile).withStream { fos -> |
| props.store(fos, '') |
| } |
| } |
| } |
| |
| jar { |
| |
| from sourceSets.main.output |
| from sourceSets.jca.output |
| |
| exclude 'com/gemstone/gemfire/management/internal/web/**' |
| exclude 'com/gemstone/gemfire/internal/i18n/StringIdResourceBundle_ja.txt' |
| exclude 'com/gemstone/gemfire/admin/doc-files/ds4_0.dtd' |
| } |
| |
| task webJar (type: Jar, dependsOn: classes) { |
| description 'Assembles the jar archive containing the gemfire management web classes.' |
| from sourceSets.main.output |
| baseName 'gemfire-web' |
| include 'com/gemstone/gemfire/management/internal/web/**' |
| } |
| |
| task raJar (type: Jar, dependsOn: classes) { |
| description 'Assembles the jar archive that contains the JCA classes' |
| from sourceSets.jca.output |
| exclude 'com/gemstone/gemfire/ra/**' |
| archiveName 'ra.jar' |
| } |
| |
| task jcaJar (type: Jar, dependsOn: raJar) { |
| description 'Assembles the jar archive that contains the JCA bundle' |
| baseName 'gemfire-jca' |
| extension 'rar' |
| metaInf { from 'src/jca/ra.xml' } |
| from raJar.archivePath |
| } |
| |
| artifacts { |
| archives webJar, raJar, jcaJar |
| } |
| |
| configurations { |
| classesOutput { |
| extendsFrom compile |
| description 'a dependency that exposes the compiled classes' |
| } |
| } |
| |
| dependencies { |
| classesOutput sourceSets.main.output |
| } |