INTSAMPLES-131: Fix README.md for Gradle
JIRA: https://jira.spring.io/browse/INTSAMPLES-131 INTSAMPLES-131: PR comments
This commit is contained in:
committed by
Gary Russell
parent
53dfc4914f
commit
95ec35c768
@@ -15,14 +15,13 @@ If you imported the example into your IDE, you can just run class **org.springfr
|
||||
|
||||
* Right-click on Main class --> Run As --> Java Application
|
||||
|
||||
Alternatively, you can start the sample from the command line ([Maven](http://maven.apache.org/) required):
|
||||
Alternatively, you can start the sample from the command line ([Gradle](http://www.gradle.org) required):
|
||||
|
||||
* mvn package
|
||||
* mvn exec:java
|
||||
* gradlew :amqp:run
|
||||
|
||||
# Used Spring Integration components
|
||||
|
||||
### Spring Integration Modules (Maven dependencies)
|
||||
### Spring Integration Modules (Maven/Gradle dependencies)
|
||||
|
||||
* spring-integration-core
|
||||
* spring-integration-amqp
|
||||
|
||||
@@ -11,8 +11,8 @@ You can run the sample application by either
|
||||
|
||||
* running the "Main" class from within STS (Right-click on Main class --> Run As --> Java Application)
|
||||
* or from the command line execute:
|
||||
- mvn package
|
||||
- mvn exec:java
|
||||
|
||||
$ gradlew :enricher:run
|
||||
|
||||
This example illustrates the usage of the Content Enricher.
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ This example demonstrates the following aspects of the FTP support available wit
|
||||
|
||||
The samples work out of the box using an embedded Apache FTP Server. Simply execute:
|
||||
|
||||
$ mvn clean package
|
||||
$ gradlew :ftp:run
|
||||
|
||||
and the samples are build as well as executed. The samples are part of a JUnit test suite:
|
||||
|
||||
|
||||
@@ -12,9 +12,10 @@ The Hello World application demonstrates a simple message flow represented by th
|
||||
|
||||
Message -> Channel -> ServiceActivator -> QueueChannel
|
||||
|
||||
To run the sample simply execute **HelloWorldApp** in package **org.springframework.integration.samples.helloworld**. You can also execute that class using the [Exec Maven Plugin](http://mojo.codehaus.org/exec-maven-plugin/):
|
||||
To run the sample simply execute **HelloWorldApp** in package **org.springframework.integration.samples.helloworld**.
|
||||
You can also execute that class using the [Gralde](http://www.gradle.org):
|
||||
|
||||
$ mvn clean package exec:java -P hello
|
||||
$ gradlew :helloworld:runHelloWorldApp
|
||||
|
||||
You should see the following output:
|
||||
|
||||
@@ -26,9 +27,10 @@ This simple application will print out the current system time twice every 20 se
|
||||
|
||||
More specifically, an **Inbound Channel Adapter** polls for the current system time 2 times every 20 seconds (20000 milliseconds). The resulting message contains as payload the time in milliseconds and the message is sent to a **Logging Channel Adapter**, which will print the time to the command prompt.
|
||||
|
||||
To run the sample simply execute **PollerApp** in package **org.springframework.integration.samples.helloworld**. You can also execute that class using the [Exec Maven Plugin](http://mojo.codehaus.org/exec-maven-plugin/):
|
||||
To run the sample simply execute **PollerApp** in package **org.springframework.integration.samples.helloworld**.
|
||||
You can also execute that class using the [Gralde](http://www.gradle.org):
|
||||
|
||||
$ mvn clean package exec:java -P poller
|
||||
$ gradlew :helloworld:runPollerApp
|
||||
|
||||
You should see output like the following:
|
||||
|
||||
|
||||
@@ -12,15 +12,17 @@ The sample consists of two parts:
|
||||
|
||||
### Server
|
||||
|
||||
#### Command Line Using Maven
|
||||
#### Command Line Using Gradle
|
||||
|
||||
The easiest way to run the **server** is to use the [Maven Jetty Plugin](http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin). Simply execute:
|
||||
The easiest way to run the **server** is to use the [Gralde Jetty Plugin](http://www.gradle.org/docs/current/userguide/jetty_plugin.html).
|
||||
Simply execute:
|
||||
|
||||
$ mvn jetty:run
|
||||
$ gradlew :http:jettyRun
|
||||
|
||||
This command starts a Jetty servlet container running on port 8080 serving the application. Alternatively you can also package the war-file and deploy it manually to a servlet container of your choosing. For that to happen execute:
|
||||
This command starts a Jetty servlet container running on port 8080 serving the application.
|
||||
Alternatively you can also package the war-file and deploy it manually to a servlet container of your choosing. For that to happen execute:
|
||||
|
||||
$ mvn clean package
|
||||
$ gradlew :http:build
|
||||
|
||||
The resulting war-file will be located in the **target** folder.
|
||||
|
||||
@@ -30,13 +32,13 @@ If you are using [STS](http://www.springsource.com/developer/sts) and the projec
|
||||
|
||||
### Client
|
||||
|
||||
#### Command Line Using Maven
|
||||
#### Command Line Using Gradle
|
||||
|
||||
In order to run the **client** using Maven, execute:
|
||||
In order to run the **client** using Gradle, execute:
|
||||
|
||||
$ mvn clean package exec:java
|
||||
$ gradlew :http:run
|
||||
|
||||
This will package the application and run it using the [Exec Maven Plugin](http://mojo.codehaus.org/exec-maven-plugin/)
|
||||
This will package the application and run it using the [Gradle Application Plugin](http://www.gradle.org/docs/current/userguide/application_plugin.html)
|
||||
|
||||
#### Using an IDE such as SpringSource Tool Suite™ (STS)
|
||||
|
||||
|
||||
@@ -19,9 +19,9 @@ You can run the application by either
|
||||
|
||||
* running the "Main" class from within STS (Right-click on Main class --> Run As --> Java Application)
|
||||
* or from the command line:
|
||||
- mvn package
|
||||
- mvn exec:java
|
||||
|
||||
|
||||
$ gradlew :jdbc:run
|
||||
|
||||
Make an appropriate choice for searching a Person or creating a Person.
|
||||
|
||||
For creating the person record, select the appropriate steps as prompted by the application.
|
||||
|
||||
@@ -17,9 +17,10 @@ It also shows an example of using Spring profiles to modify the configuration fo
|
||||
|
||||
The Stdout and Stdin Channel Adapters will allow you to interact with JMS via the console. It uses an embedded ActiveMQ broker.
|
||||
|
||||
To run the sample, simply execute the **Main** class located in the the *org.springframework.integration.samples.jms* package either from your favorite IDE or by using Maven. When using Maven you can start the sample by executing:
|
||||
To run the sample, simply execute the **Main** class located in the the *org.springframework.integration.samples.jms*
|
||||
package either from your favorite IDE or by using Gradle. When using Gradle you can start the sample by executing:
|
||||
|
||||
$ mvn clean package exec:java
|
||||
$ gradlew :jms:run
|
||||
|
||||
You will then be prompted to run one of two demos:
|
||||
|
||||
@@ -51,4 +52,4 @@ When running either one of the demos you will see the following prompt:
|
||||
* **ChannelAdapterDemo** will simply echo the response
|
||||
|
||||
|
||||
There are also test cases that exercise both demos; utilizing Spring 3.0 profiles to route the output to a QueueChannel instead of stdout.
|
||||
There are also test cases that exercise both demos; utilizing Spring 3.0 profiles to route the output to a QueueChannel instead of stdout.
|
||||
|
||||
@@ -22,10 +22,11 @@ Hibernate works out of the box and there are 2 options on how to execute the sam
|
||||
|
||||
* running the "Main" class from within STS (Right-click on Main class --> Run As --> Java Application)
|
||||
* or from the command line:
|
||||
- mvn clean package
|
||||
- mvn exec:exec
|
||||
$ gradlew :jpa:run
|
||||
|
||||
For **OpenJPA** and **EclipseLink** to work, you must provide a [Java Agent](http://docs.oracle.com/javase/6/docs/api/java/lang/instrument/package-summary.html). When using the Maven Exec Plugin, this is taken care of for you behind the scenes automatically. However, when running the sample from within STS start the Main class with the following JVM flags:
|
||||
For **OpenJPA** and **EclipseLink** to work, you must provide a [Java Agent](http://docs.oracle.com/javase/6/docs/api/java/lang/instrument/package-summary.html).
|
||||
When using the Gradle Application Plugin, this is taken care of for you behind the scenes automatically. However,
|
||||
when running the sample from within STS start the Main class with the following JVM flags:
|
||||
|
||||
-javaagent:/path/to/.m2/repository/org/springframework/spring-instrument/3.1.1.RELEASE/spring-instrument-3.1.1.RELEASE.jar
|
||||
-javaagent:/path/to/.m2/repository/org/apache/openjpa/openjpa/2.2.0/openjpa-2.2.0.jar
|
||||
|
||||
@@ -36,13 +36,14 @@ The following Spring Integration components are being used:
|
||||
|
||||
## Running the Samples
|
||||
|
||||
To run the two samples, simply execute either **CronOddEvenDemo** or **IntervalOddEvenDemoTestApp** in package **org.springframework.integration.samples.oddeven**. You can also execute those two samples using the [Exec Maven Plugin](http://mojo.codehaus.org/exec-maven-plugin/):
|
||||
To run the two samples, simply execute either **CronOddEvenDemo** or **IntervalOddEvenDemoTestApp** in package **org.springframework.integration.samples.oddeven**.
|
||||
You can also execute those two samples using the [Gradle Application Plugin](http://www.gradle.org/docs/current/userguide/application_plugin.html):
|
||||
|
||||
$ mvn clean package exec:java -P cron
|
||||
$ gradlew :oddeven:runCronOddEvenDemo
|
||||
|
||||
which will execute **CronOddEvenDemo**. In order to run **IntervalOddEvenDemoTestApp**, execute:
|
||||
|
||||
$ mvn clean package exec:java -P interval
|
||||
$ gradlew :oddeven:runIntervalOddEvenDemoTestApp
|
||||
|
||||
For both samples you should see the output similar to this:
|
||||
|
||||
|
||||
@@ -28,9 +28,10 @@ If you imported the example into your IDE, you can just run class **org.springfr
|
||||
|
||||
* Right-click on Main class --> Run As --> Java Application
|
||||
|
||||
Alternatively, you can start the sample from the command line ([Maven](http://maven.apache.org/) required):
|
||||
Alternatively, you can start the sample from the command line
|
||||
([Gradle Application Plugin](http://www.gradle.org/docs/current/userguide/application_plugin.html)):
|
||||
|
||||
* mvn exec:java
|
||||
$ gradlew :tcp-amqp:run
|
||||
|
||||
## Run Telnet
|
||||
|
||||
@@ -59,4 +60,4 @@ Some further resources:
|
||||
* RabbitMQ - [http://www.rabbitmq.com/](http://www.rabbitmq.com/)
|
||||
* Spring AMQP - [http://www.springsource.org/spring-amqp](http://www.springsource.org/spring-amqp)
|
||||
|
||||
[netcat]: http://en.wikipedia.org/wiki/Netcat
|
||||
[netcat]: http://en.wikipedia.org/wiki/Netcat
|
||||
|
||||
@@ -19,9 +19,9 @@ Several variations of the sample are provided:
|
||||
|
||||
The Client-Server Demo illustrates the use of a *Gateway* as an entry point into the integration flow. The message generated by the *Gateway* is sent over *TCP* by the *Outbound Gateway* to the *Inbound Gateway*. In turn the *Inbound Gateway* sends the message to an echo service (Class *EchoService*) and the echoed response comes back over *TCP*. The demo uses explicit *Transformer*s to convert the *byte array* payloads to *Strings*.
|
||||
|
||||
You can execute this sample simply via Maven:
|
||||
You can execute this sample simply via Gradle:
|
||||
|
||||
$ mvn clean package exec:java
|
||||
$ gradlew :tcp-client-server:run
|
||||
|
||||
Alternatively, you can also execute the **Main** method in class *org.springframework.integration.samples.tcpclientserver.Main*. In both cases you should see the following console output:
|
||||
|
||||
@@ -54,7 +54,7 @@ Alternatively, you can also execute the **Main** method in class *org.springfram
|
||||
|
||||
The respective open server socket it dynamically selected. Alternatively, you can also customize the port by providing an additional system property at startup e.g.
|
||||
|
||||
$ mvn clean package exec:java -DavailableServerSocket=7777
|
||||
$ gradlew :tcp-client-server:run -DavailableServerSocket=7777
|
||||
|
||||
#### Connect via Telnet
|
||||
|
||||
@@ -143,4 +143,4 @@ You can run the example by executing JUnit test **TcpServerCustomSerializerTest*
|
||||
[Deserializer]: http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/core/serializer/Deserializer.html
|
||||
[Serializer]: http://static.springsource.org/spring/docs/current/javadoc-api/org/springframework/core/serializer/Serializer.html
|
||||
[Telnet]: http://en.wikipedia.org/wiki/Telnet
|
||||
[Transmission Control Protocol]: http://en.wikipedia.org/wiki/Transmission_Control_Protocol
|
||||
[Transmission Control Protocol]: http://en.wikipedia.org/wiki/Transmission_Control_Protocol
|
||||
|
||||
@@ -19,8 +19,9 @@ Fahrenheit (90F) to Celsius (32.2C) and the result is printed to the console:
|
||||
|
||||
## Running the Sample
|
||||
|
||||
To run the sample simply execute **WebServiceDemoTestApp** in package *org.springframework.integration.samples.ws*. You can also execute that class using the [Exec Maven Plugin](http://mojo.codehaus.org/exec-maven-plugin/):
|
||||
To run the sample simply execute **WebServiceDemoTestApp** in package *org.springframework.integration.samples.ws*.
|
||||
You can also execute that class using the [Gradle Application Plugin](http://www.gradle.org/docs/current/userguide/application_plugin.html):
|
||||
|
||||
$ mvn clean package exec:java
|
||||
$ gradlew :ws-outbound-gateway:run
|
||||
|
||||
[Simple Object Access Protocol]: http://en.wikipedia.org/wiki/SOAP
|
||||
[Simple Object Access Protocol]: http://en.wikipedia.org/wiki/SOAP
|
||||
|
||||
@@ -10,9 +10,10 @@ This example demonstrates the following aspects of the [Extensible Markup Langua
|
||||
|
||||
## Running the Sample
|
||||
|
||||
To run the sample, execute the class **org.springframework.integration.samples.xml.BookOrderProcessingTestApp**. Alternatively, you can run the sample using [Maven][] by executing:
|
||||
To run the sample, execute the class **org.springframework.integration.samples.xml.BookOrderProcessingTestApp**.
|
||||
Alternatively, you can run the sample using [Gradle Application Plugin](http://www.gradle.org/docs/current/userguide/application_plugin.html) by executing:
|
||||
|
||||
$ mvn clean package exec:java
|
||||
$ gradlew :xml:run
|
||||
|
||||
You should see the following output:
|
||||
|
||||
@@ -35,6 +36,5 @@ You should see the following output:
|
||||
</bb:bigBooksOrder>
|
||||
|
||||
[Extensible Markup Language]: http://en.wikipedia.org/wiki/XML
|
||||
[Maven]: http://maven.apache.org/
|
||||
[XPath]: http://en.wikipedia.org/wiki/XPath
|
||||
[XSLT]: http://en.wikipedia.org/wiki/XSLT
|
||||
|
||||
Reference in New Issue
Block a user