build with gradle

This commit is contained in:
Jarred Li
2012-04-09 16:58:01 +08:00
parent c5e646d25f
commit 69f367a290
8 changed files with 59 additions and 58 deletions

2
.gitignore vendored
View File

@@ -1,6 +1,8 @@
/.classpath
/.project
.settings/
.gradle
build
target/
/log.roo

View File

@@ -1,2 +0,0 @@
/cache.bin
/cache.properties

View File

@@ -30,4 +30,4 @@ thrift.range = "[0.7, 0.8)"
# --------------------
# Project wide version
# --------------------
springShellVersion=1.0.0.BUILD-SNAPSHOT
springShellVersion=1.0.0-SNAPSHOT

0
gradlew vendored Normal file → Executable file
View File

View File

@@ -0,0 +1,36 @@
description = 'Hello World - Spring Shell'
apply plugin: 'base'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
repositories {
mavenLocal()
mavenCentral()
// Public Spring artifacts
mavenRepo name: "spring-release", urls: "http://repo.springsource.org/release"
mavenRepo name: "spring-milestone", urls: "http://repo.springsource.org/milestone"
mavenRepo name: "spring-snapshot", urls: "http://repo.springsource.org/snapshot"
}
dependencies {
compile "org.springframework.shell:core:$springShellVersion"
}
jar {
dependsOn configurations.runtime
from {
configurations.runtime.collect {
it.isDirectory() ? it : zipTree(it)
}
}
manifest {
attributes("Main-Class": "org.springframework.shell.Bootstrap")
}
}
defaultTasks 'build'

View File

@@ -0,0 +1 @@
springShellVersion=1.0.0-SNAPSHOT

View File

@@ -18,65 +18,13 @@
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.framework.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.shell</groupId>
<artifactId>core</artifactId>
<version>${spring.shell.version}</version>
</dependency>
<!-- CGLIB needed for use of @Configuration class based extension points -->
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
<!-- consider removing dependency on commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4</version>
</dependency>
<!-- External modules -->
<dependency>
<groupId>net.sourceforge.jline</groupId>
<artifactId>jline</artifactId>
<version>1.0.S2-B</version>
</dependency>
<dependency>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
<scope>test</scope>
</dependency>
</dependency>
</dependencies>
<build>

View File

@@ -0,0 +1,16 @@
Maven:
1.Build the project
$>mvn package
2.run spring shell
$>java -jar target/helloworld-1.0.0-SNAPSHOT.jar
Gradle:
1.Build the project
$>../../gradlew build
2.run spring shell
$>java -jar build/libs/helloworld.jar