walking98 closed pull request #24: [ISSUE-23] Make samples as sub-modules of
the trunk
URL: https://github.com/apache/rocketmq-spring/pull/24
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/pom.xml b/pom.xml
index 09ebeec..1d242c5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -103,8 +103,6 @@
<module>rocketmq-spring-boot-parent</module>
<module>rocketmq-spring-boot</module>
<module>rocketmq-spring-boot-starter</module>
- <!-- Note: The samples need to mvn compiple in its own directory
- <module>rocketmq-spring-boot-samples</module>
- -->
+ <module>rocketmq-spring-boot-samples</module>
</modules>
</project>
diff --git a/rocketmq-spring-boot-parent/pom.xml
b/rocketmq-spring-boot-parent/pom.xml
index b151179..57614af 100644
--- a/rocketmq-spring-boot-parent/pom.xml
+++ b/rocketmq-spring-boot-parent/pom.xml
@@ -129,12 +129,6 @@
<version>${spring.version}</version>
</dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-aop</artifactId>
- <version>${spring.version}</version>
- </dependency>
-
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
diff --git a/rocketmq-spring-boot-samples/README.md
b/rocketmq-spring-boot-samples/README.md
index 555f3bf..3e7af29 100644
--- a/rocketmq-spring-boot-samples/README.md
+++ b/rocketmq-spring-boot-samples/README.md
@@ -29,10 +29,10 @@ bash bin/mqadmin updateTopic -c DefaultCluster -t
spring-transaction-topic
# open a terminal, run produce
cd rocketmq-produce-demo
mvn clean package
-java -jar target/rocketmq-produce-demo-0.0.1-SNAPSHOT.jar
+java -jar target/rocketmq-produce-demo-2.0.1-SNAPSHOT.jar
# open another terminal, run consume
cd rocketmq-consume-demo
mvn clean package
-java -jar target/rocketmq-consume-demo-0.0.1-SNAPSHOT.jar
+java -jar target/rocketmq-consume-demo-2.0.1-SNAPSHOT.jar
```
diff --git a/rocketmq-spring-boot-samples/README_zh_CN.md
b/rocketmq-spring-boot-samples/README_zh_CN.md
index 099d3b8..70908f1 100644
--- a/rocketmq-spring-boot-samples/README_zh_CN.md
+++ b/rocketmq-spring-boot-samples/README_zh_CN.md
@@ -38,11 +38,11 @@ bash bin/mqadmin updateTopic -c DefaultCluster -t
spring-transaction-topic
# 打开一个终端窗口,编译并启动发送端
cd rocketmq-produce-demo
mvn clean package
-java -jar target/rocketmq-produce-demo-0.0.1-SNAPSHOT.jar
+java -jar target/rocketmq-produce-demo-2.0.1-SNAPSHOT.jar
# 打开另一个终端窗口,编译并启动消费端
cd rocketmq-consume-demo
mvn clean package
-java -jar target/rocketmq-consume-demo-0.0.1-SNAPSHOT.jar
+java -jar target/rocketmq-consume-demo-2.0.1-SNAPSHOT.jar
```
结合测试代码,观察窗口中消息的发送和接收情况
diff --git a/rocketmq-spring-boot-samples/pom.xml
b/rocketmq-spring-boot-samples/pom.xml
index c4568fd..44d6b27 100644
--- a/rocketmq-spring-boot-samples/pom.xml
+++ b/rocketmq-spring-boot-samples/pom.xml
@@ -21,11 +21,16 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.rocketmq</groupId>
+ <parent>
+ <groupId>org.apache.rocketmq</groupId>
+ <artifactId>rocketmq-spring-boot-parent</artifactId>
+ <version>2.0.1-SNAPSHOT</version>
+ <relativePath>../rocketmq-spring-boot-parent/pom.xml</relativePath>
+ </parent>
+
<artifactId>rocketmq-spring-boot-samples</artifactId>
<packaging>pom</packaging>
- <version>0.0.1-SNAPSHOT</version>
-
+
<name>RocketMQ Spring Boot Samples</name>
<description>Samples for RocketMQ Spring Boot</description>
<url>https://github.com/apache/rocketmq-spring</url>
@@ -40,6 +45,12 @@
</properties>
<dependencies>
+ <!-- Spring Boot dependencies-->
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter</artifactId>
+ <!-- sample can define a different spring boot version here -->
+ </dependency>
<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-spring-boot-starter</artifactId>
@@ -49,6 +60,13 @@
<build>
<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
@@ -74,7 +92,7 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
- <version>2.1.0.RELEASE</version>
+ <version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
diff --git a/rocketmq-spring-boot-samples/rocketmq-consume-demo/pom.xml
b/rocketmq-spring-boot-samples/rocketmq-consume-demo/pom.xml
index 4093170..b57c79c 100644
--- a/rocketmq-spring-boot-samples/rocketmq-consume-demo/pom.xml
+++ b/rocketmq-spring-boot-samples/rocketmq-consume-demo/pom.xml
@@ -23,7 +23,8 @@
<parent>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-spring-boot-samples</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>2.0.1-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<artifactId>rocketmq-consume-demo</artifactId>
diff --git a/rocketmq-spring-boot-samples/rocketmq-produce-demo/pom.xml
b/rocketmq-spring-boot-samples/rocketmq-produce-demo/pom.xml
index 0ef364d..066b79b 100644
--- a/rocketmq-spring-boot-samples/rocketmq-produce-demo/pom.xml
+++ b/rocketmq-spring-boot-samples/rocketmq-produce-demo/pom.xml
@@ -23,7 +23,8 @@
<parent>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-spring-boot-samples</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>2.0.1-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
</parent>
<artifactId>rocketmq-produce-demo</artifactId>
diff --git a/rocketmq-spring-boot/pom.xml b/rocketmq-spring-boot/pom.xml
index 85dedd1..a232ed8 100644
--- a/rocketmq-spring-boot/pom.xml
+++ b/rocketmq-spring-boot/pom.xml
@@ -40,11 +40,6 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot</artifactId>
- <optional>true</optional>
- </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
@@ -78,14 +73,6 @@
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-aop</artifactId>
- </dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services