update build file

This commit is contained in:
Jarred Li
2012-04-10 16:21:32 +08:00
parent 5ed6797033
commit 21cb6514bd
7 changed files with 72 additions and 78 deletions

View File

@@ -2,6 +2,45 @@ The Spring Shell project provides an extensible interactive shell enviornment wi
This is essentially a place holder README file until this project gets its sealegs.
* Maven:
~~~~~ xml
<dependency>
<groupId>org.springframework.shell</groupId>
<artifactId>spring-shell</artifactId>
<version>${version}</version>
</dependency>
<!-- used for nightly builds -->
<repository>
<id>spring-maven-snapshot</id>
<snapshots><enabled>true</enabled></snapshots>
<name>Springframework Maven SNAPSHOT Repository</name>
<url>http://maven.springframework.org/snapshot</url>
</repository>
<!-- used for milestone/rc releases -->
<repository>
<id>spring-maven-milestone</id>
<name>Springframework Maven Milestone Repository</name>
<url>http://maven.springframework.org/milestone</url>
</repository>
~~~~~
* Gradle:
~~~~~ groovy
repositories {
mavenRepo name: "spring-snapshot", urls: "http://maven.springframework.org/snapshot"
}
dependencies {
compile "org.springframework.shell:spring-shell:${version}"
}
~~~~~
current version is 1.0.0.SNAPSHOT
# Building
Spring Shell currently uses Maven as its build system. The build been done using version 3.0.3 (r1075438; 2011-02-28 12:31:09-0500) and the plan is to switch to gradle.
@@ -13,9 +52,8 @@ To build Spring Shell, run
# Running Example
cd samples/helloworld
mvn validate
mvn package
java -jar target/helloworld-1.0.0-SNAPSHOT.jar
java -jar target/helloworld-1.0.0.SNAPSHOT.jar
# Contributing

View File

@@ -76,6 +76,7 @@ dependencies {
testCompile "org.mockito:mockito-core:$mockitoVersion"
testCompile "org.springframework:spring-test:$springVersion"
testCompile("javax.annotation:jsr250-api:1.0") { optional = true }
testRuntime "org.codehaus.groovy:groovy:$groovyVersion"
}

View File

@@ -16,6 +16,8 @@ jansiVersion=1.6
junitVersion = 4.7
mockitoVersion = 1.8.5
groovyVersion = 1.8.5
# Manifest properties
## OSGi ranges
@@ -30,4 +32,4 @@ thrift.range = "[0.7, 0.8)"
# --------------------
# Project wide version
# --------------------
springShellVersion=1.0.0-SNAPSHOT
springShellVersion=1.0.0.SNAPSHOT

View File

@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.shell</groupId>
<artifactId>spring-shell</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0.SNAPSHOT</version>
<packaging>jar</packaging>
<name>Spring Shell</name>
<url>http://www.springframework.org</url>

View File

@@ -1,2 +1,2 @@
springVersion = 3.1.1.RELEASE
springShellVersion=1.0.0-SNAPSHOT
springShellVersion=1.0.0.SNAPSHOT

View File

@@ -4,25 +4,25 @@
<groupId>org.springframework.shell.samples</groupId>
<artifactId>helloworld</artifactId>
<version>1.0.0-SNAPSHOT</version>
<version>1.0.0.SNAPSHOT</version>
<packaging>jar</packaging>
<name>helloworld</name>
<url>http://maven.apache.org</url>
<properties>
<spring.shell.version>1.0.0-SNAPSHOT</spring.shell.version>
<spring.shell.version>1.0.0.SNAPSHOT</spring.shell.version>
<jar.mainclass>org.springframework.shell.Bootstrap</jar.mainclass>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.shell</groupId>
<artifactId>spring-shell</artifactId>
<version>${spring.shell.version}</version>
</dependency>
</dependency>
</dependencies>
<build>
@@ -69,71 +69,32 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>install-spring-shell-core</id>
<phase>validate</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<file>lib/spring-shell-1.0.0-SNAPSHOT.jar</file>
<groupId>org.springframework.shell</groupId>
<artifactId>spring-shell</artifactId>
<version>${spring.shell.version}</version>
<packaging>jar</packaging>
<generatePom>true</generatePom>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-install-plugin
</artifactId>
<versionRange>
[2.3.1,)
</versionRange>
<goals>
<goal>install-file</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<!-- jline 1.0.S2-B is here http://shrub.appspot.com/spring-roo-repository.springsource.org/release/net/sourceforge/jline/jline/1.0.S2-B/ -->
<repositories>
<!-- jline 1.0.S2-B is here http://shrub.appspot.com/spring-roo-repository.springsource.org/release/net/sourceforge/jline/jline/1.0.S2-B/ -->
<repository>
<id>spring-roo-repository</id>
<name>Spring Roo Maven Repository</name>
<url>http://spring-roo-repository.springsource.org/release</url>
</repository>
<repository>
<id>spring-maven-snapshot</id>
<snapshots>
<enabled>true</enabled>
</snapshots>
<name>Springframework Maven SNAPSHOT Repository</name>
<url>http://maven.springframework.org/snapshot</url>
</repository>
<repository>
<id>spring-maven-milestone</id>
<name>Springframework Maven Milestone Repository</name>
<url>http://maven.springframework.org/milestone</url>
</repository>
</repositories>
</project>

View File

@@ -1,20 +1,12 @@
Maven:
1.Build the project
$>mvn validate
$>mvn package
2.run spring shell
$>java -jar target/helloworld-1.0.0-SNAPSHOT.jar
$>java -jar target/helloworld-1.0.0.SNAPSHOT.jar
Gradle: