+ separated sample from the build
+ updated readme files with regards to gradle
This commit is contained in:
44
samples/hello-world/build.gradle
Normal file
44
samples/hello-world/build.gradle
Normal file
@@ -0,0 +1,44 @@
|
||||
description = 'Spring GemFire Samples - Hello World'
|
||||
|
||||
apply plugin: 'base'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'eclipse' // `gradle eclipse` to generate .classpath/.project
|
||||
|
||||
[compileJava, compileTestJava]*.options*.compilerArgs = ["-Xlint:-serial"]
|
||||
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
// Public Spring artefacts
|
||||
mavenRepo name: "springsource-org-release", urls: "http://repository.springsource.com/maven/bundles/release"
|
||||
mavenRepo name: "spring-release", urls: "http://maven.springframework.org/release"
|
||||
mavenRepo name: "spring-milestone", urls: "http://maven.springframework.org/milestone"
|
||||
mavenRepo name: "spring-snapshot", urls: "http://maven.springframework.org/snapshot"
|
||||
mavenRepo name: "sonatype-snapshot", urls: "http://oss.sonatype.org/content/repositories/snapshots"
|
||||
mavenRepo name: "ext-snapshots", urls: "http://springframework.svn.sourceforge.net/svnroot/springframework/repos/repo-ext/"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.springframework.data.gemfire:spring-gemfire:$version"
|
||||
compile "javax.inject:javax.inject:1"
|
||||
compile "javax.annotation:jsr250-api:1.0"
|
||||
|
||||
testCompile "junit:junit:$junitVersion"
|
||||
testCompile "org.springframework:spring-test:$springVersion"
|
||||
}
|
||||
|
||||
sourceCompatibility = 1.5
|
||||
targetCompatibility = 1.5
|
||||
|
||||
|
||||
task run(type: JavaExec) {
|
||||
description = 'Runs the application'
|
||||
main = "org.springframework.data.gemfire.samples.helloworld.Main"
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
standardInput = System.in
|
||||
systemProperties['java.net.preferIPv4Stack'] = 'true'
|
||||
}
|
||||
|
||||
defaultTasks 'run'
|
||||
3
samples/hello-world/gradle.properties
Normal file
3
samples/hello-world/gradle.properties
Normal file
@@ -0,0 +1,3 @@
|
||||
junitVersion = 4.8.1
|
||||
springVersion = 3.1.0.M2
|
||||
version = 1.1.0.BUILD-SNAPSHOT
|
||||
@@ -1,49 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<parent>
|
||||
<artifactId>samples</artifactId>
|
||||
<groupId>org.springframework.data.gemfire.samples</groupId>
|
||||
<version>1.1.0.BUILD-SNAPSHOT</version>
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.springframework.data.gemfire.samples</groupId>
|
||||
<artifactId>hello-world</artifactId>
|
||||
<version>1.1.0.BUILD-SNAPSHOT</version>
|
||||
<name>Spring GemFire - Hello World Sample</name>
|
||||
|
||||
<description>A simple Hello World example illustrating the basic steps in configuring GemFire with Spring</description>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.1</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifestEntries>
|
||||
<Main-Class>org.springframework.data.gemfire.samples.helloworld.Main</Main-Class>
|
||||
</manifestEntries>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.1</version>
|
||||
<configuration>
|
||||
<mainClass>org.springframework.data.gemfire.samples.helloworld.Main</mainClass>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<key>java.net.preferIPv4Stack</key>
|
||||
<value>true</value>
|
||||
</systemProperty>
|
||||
</systemProperties>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -14,12 +14,15 @@ Multiple nodes can be started which will share and exchange information transpar
|
||||
2. BUILD AND DEPLOYMENT
|
||||
|
||||
This directory contains the source files.
|
||||
For building, Maven 2 and JDK 1.5+ are required.
|
||||
For building, JDK 1.5+ are required
|
||||
|
||||
To build the sample, use the following command:
|
||||
|
||||
# mvn clean package
|
||||
*nix/BSD OS:
|
||||
# ../../gradlew -q
|
||||
|
||||
To run the sample, use:
|
||||
Windows OS:
|
||||
# ..\..\gradlew -q
|
||||
|
||||
# mvn exec:java
|
||||
If you have Gradle installed and available in your classpath, you can simply type:
|
||||
# gradle -q
|
||||
|
||||
Reference in New Issue
Block a user