You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by il...@apache.org on 2019/06/17 11:46:06 UTC
[dubbo-samples] branch master updated: integration test for
dubbo-samples-chain
This is an automated email from the ASF dual-hosted git repository.
iluo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-samples.git
The following commit(s) were added to refs/heads/master by this push:
new e450800 integration test for dubbo-samples-chain
e450800 is described below
commit e450800d29a1716f98d642b5cfbf761e02ddc822
Author: Ian Luo <ia...@gmail.com>
AuthorDate: Mon Jun 17 19:44:40 2019 +0800
integration test for dubbo-samples-chain
---
.../dubbo-samples-chain-api/pom.xml | 308 +----------------
.../samples/{governance => chain}/ZKTools.java | 5 +-
.../{governance => chain}/api/AmericanService.java | 5 +-
.../{governance => chain}/api/CatService.java | 5 +-
.../{governance => chain}/api/ChineseService.java | 5 +-
.../{governance => chain}/api/DogService.java | 5 +-
.../{governance => chain}/api/LionService.java | 5 +-
.../{governance => chain}/api/TigerService.java | 5 +-
.../dubbo-samples-chain-backend/pom.xml | 325 +++---------------
.../BackendProvider.java} | 30 +-
.../{governance => chain}/impl/CatServiceImpl.java | 7 +-
.../{governance => chain}/impl/DogServiceImpl.java | 7 +-
.../impl/LionServiceImpl.java | 7 +-
.../impl/TigerServiceImpl.java | 7 +-
.../dubbo/samples/governance/BackendProvider.java | 34 --
.../main/resources/spring/dubbo-demo-provider.xml | 31 +-
.../dubbo-samples-chain-front/pom.xml | 372 ++++++---------------
.../{governance => chain}/FrontendConsumer.java | 44 ++-
.../src/main/resources/docker/docker-compose.yml | 14 +
.../main/resources/spring/dubbo-demo-consumer.xml | 28 +-
.../dubbo/samples/chain/MIddleServiceIT.java | 113 +++++++
.../dubbo-samples-chain-middle/pom.xml | 327 +++---------------
.../dubbo/samples/chain/MiddleEndProvider.java} | 30 +-
.../impl/AmericanServiceImpl.java | 11 +-
.../impl/ChineseServiceImpl.java | 11 +-
.../samples/governance/MiddleEndProvider.java | 35 --
.../main/resources/spring/dubbo-demo-provider.xml | 30 +-
dubbo-samples-chain/pom.xml | 71 +++-
28 files changed, 504 insertions(+), 1373 deletions(-)
diff --git a/dubbo-samples-chain/dubbo-samples-chain-api/pom.xml b/dubbo-samples-chain/dubbo-samples-chain-api/pom.xml
index 8337883..d599bab 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-api/pom.xml
+++ b/dubbo-samples-chain/dubbo-samples-chain-api/pom.xml
@@ -21,312 +21,14 @@
<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/xsd/maven-4.0.0.xsd">
- <groupId>org.apache.dubbo</groupId>
- <version>1.0-SNAPSHOT</version>
+ <parent>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-samples-chain</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dubbo-samples-chain-api</artifactId>
- <properties>
- <source.level>1.8</source.level>
- <target.level>1.8</target.level>
- <spring.version>4.3.16.RELEASE</spring.version>
- <dubbo.version>2.7.0</dubbo.version>
- <dubbo.rpc.version>2.7.0</dubbo.rpc.version>
- <zookeeper.version>3.4.13</zookeeper.version>
- <curator.version>4.0.1</curator.version>
- <validation-api.version>1.1.0.Final</validation-api.version>
- <hibernate-validator.version>4.2.0.Final</hibernate-validator.version>
- <resteasy.version>3.0.19.Final</resteasy.version>
- <curator-client.version>4.0.1</curator-client.version>
- <swagger.version>1.5.19</swagger.version>
- <tomcat.version>7.0.88</tomcat.version>
- <servlet.version>3.0.1</servlet.version>
- <maven_checkstyle_version>3.0.0</maven_checkstyle_version>
- <apache-rat-plugin.version>0.12</apache-rat-plugin.version>
- <spring-boot.version>1.5.13.RELEASE</spring-boot.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-framework-bom</artifactId>
- <version>${spring.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <!-- Import dependency management from Spring Boot -->
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-dependencies</artifactId>
- <version>${spring-boot.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- <version>4.1.16.Final</version>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-bom</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- <version>${dubbo.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.thrift</groupId>
- <artifactId>libthrift</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-rpc-rest</artifactId>
- <version>${dubbo.rpc.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- <version>${zookeeper.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-framework</artifactId>
- <version>${curator.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <version>${validation-api.version}</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>${hibernate-validator.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-jackson-provider</artifactId>
- <version>${resteasy.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-client</artifactId>
- <version>${curator-client.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>${servlet.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat.embed</groupId>
- <artifactId>tomcat-embed-core</artifactId>
- <version>${tomcat.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat.embed</groupId>
- <artifactId>tomcat-embed-logging-juli</artifactId>
- <version>${tomcat.version}</version>
- </dependency>
- <!-- swagger -->
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>${swagger.version}</version>
- </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-jaxrs</artifactId>
- <version>${swagger.version}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-framework</artifactId>
- <exclusions>
- <exclusion>
- <groupId>io.netty</groupId>
- <artifactId>netty</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-configcenter-zookeeper</artifactId>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-configcenter-zookeeper</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-metadata-report-api</artifactId>
- </dependency>
- </dependencies>
-
-
-
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>${spring-boot.version}</version>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.7.0</version>
- <configuration>
- <source>${source.level}</source>
- <target>${target.level}</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <version>${apache-rat-plugin.version}</version>
- <executions>
- <execution>
- <id>verify.rat</id>
- <phase>verify</phase>
- <goals>
- <goal>check</goal>
- </goals>
- <configuration>
- <excludes>
- <exclude>**/*.versionsBackup</exclude>
- <exclude>**/.idea/</exclude>
- <exclude>**/*.iml</exclude>
- <exclude>**/*.txt</exclude>
- <exclude>**/*.load</exclude>
- <exclude>**/*.flex</exclude>
- <exclude>**/*.fc</exclude>
- <exclude>**/*.javascript</exclude>
- <exclude>**/*.properties</exclude>
- <exclude>**/*.thrift</exclude>
- <exclude>**/*.sh</exclude>
- <exclude>**/*.bat</exclude>
- <exclude>**/*.md</exclude>
- <exclude>.git/</exclude>
- <exclude>.gitignore</exclude>
- <!-- ASF jenkins box puts the Maven repo in our root directory. -->
- <exclude>.repository/</exclude>
- <exclude>**/.settings/*</exclude>
- <exclude>**/.classpath</exclude>
- <exclude>**/.project</exclude>
- <exclude>**/target/**</exclude>
- <exclude>**/*.log</exclude>
- <exclude>CODE_OF_CONDUCT.md</exclude>
- <exclude>.codecov.yml</exclude>
- <exclude>.travis.yml</exclude>
- <exclude>PULL_REQUEST_TEMPLATE.md</exclude>
- <exclude>CONTRIBUTING.md</exclude>
- <exclude>README.md</exclude>
- <exclude>**/codestyle/*</exclude>
- <exclude>**/resources/META-INF/**</exclude>
- <exclude>**/webapp/swagger/**</exclude>
- <exclude>**/org/apache/dubbo/samples/rpc/nativethrift/api/DemoService.java</exclude>
- </excludes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>checkstyle</id>
- <activation>
- <jdk>[1.8,)</jdk>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>${maven_checkstyle_version}</version>
- <dependencies>
- <dependency>
- <groupId>com.puppycrawl.tools</groupId>
- <artifactId>checkstyle</artifactId>
- <version>8.9</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>checkstyle-validation</id>
- <phase>validate</phase>
- <configuration>
- <configLocation>../../codestyle/checkstyle.xml</configLocation>
- <suppressionsLocation>../../codestyle/checkstyle-suppressions.xml</suppressionsLocation>
- <encoding>UTF-8</encoding>
- <consoleOutput>true</consoleOutput>
- <failOnViolation>true</failOnViolation>
- </configuration>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
</project>
diff --git a/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/ZKTools.java b/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/ZKTools.java
similarity index 98%
rename from dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/ZKTools.java
rename to dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/ZKTools.java
index 5f90138..663facb 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/ZKTools.java
+++ b/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/ZKTools.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.governance;
+package org.apache.dubbo.samples.chain;
import org.apache.dubbo.common.utils.StringUtils;
@@ -22,9 +22,6 @@ import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.ExponentialBackoffRetry;
-/**
- *
- */
public class ZKTools {
private static CuratorFramework client;
diff --git a/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/api/AmericanService.java b/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/api/AmericanService.java
similarity index 93%
rename from dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/api/AmericanService.java
rename to dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/api/AmericanService.java
index ac60277..810284c 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/api/AmericanService.java
+++ b/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/api/AmericanService.java
@@ -14,11 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.governance.api;
+package org.apache.dubbo.samples.chain.api;
-/**
- *
- */
public interface AmericanService {
String eat();
diff --git a/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/api/CatService.java b/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/api/CatService.java
similarity index 93%
rename from dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/api/CatService.java
rename to dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/api/CatService.java
index 3ff7174..3f7ef09 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/api/CatService.java
+++ b/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/api/CatService.java
@@ -14,11 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.governance.api;
+package org.apache.dubbo.samples.chain.api;
-/**
- *
- */
public interface CatService {
int getId();
diff --git a/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/api/ChineseService.java b/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/api/ChineseService.java
similarity index 93%
rename from dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/api/ChineseService.java
rename to dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/api/ChineseService.java
index 829548f..1f9d16b 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/api/ChineseService.java
+++ b/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/api/ChineseService.java
@@ -14,11 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.governance.api;
+package org.apache.dubbo.samples.chain.api;
-/**
- *
- */
public interface ChineseService {
String eat();
diff --git a/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/api/DogService.java b/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/api/DogService.java
similarity index 93%
rename from dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/api/DogService.java
rename to dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/api/DogService.java
index a2360d6..5a861cd 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/api/DogService.java
+++ b/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/api/DogService.java
@@ -14,11 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.governance.api;
+package org.apache.dubbo.samples.chain.api;
-/**
- *
- */
public interface DogService {
int getId();
diff --git a/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/api/LionService.java b/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/api/LionService.java
similarity index 93%
rename from dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/api/LionService.java
rename to dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/api/LionService.java
index bb54048..ed3bf0b 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/api/LionService.java
+++ b/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/api/LionService.java
@@ -14,11 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.governance.api;
+package org.apache.dubbo.samples.chain.api;
-/**
- *
- */
public interface LionService {
int getId();
diff --git a/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/api/TigerService.java b/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/api/TigerService.java
similarity index 93%
rename from dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/api/TigerService.java
rename to dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/api/TigerService.java
index 98b60a0..f8b74e2 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/governance/api/TigerService.java
+++ b/dubbo-samples-chain/dubbo-samples-chain-api/src/main/java/org/apache/dubbo/samples/chain/api/TigerService.java
@@ -14,11 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.governance.api;
+package org.apache.dubbo.samples.chain.api;
-/**
- *
- */
public interface TigerService {
int getId();
diff --git a/dubbo-samples-chain/dubbo-samples-chain-backend/pom.xml b/dubbo-samples-chain/dubbo-samples-chain-backend/pom.xml
index 8c17001..8324fa9 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-backend/pom.xml
+++ b/dubbo-samples-chain/dubbo-samples-chain-backend/pom.xml
@@ -21,310 +21,79 @@
<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/xsd/maven-4.0.0.xsd">
- <groupId>org.apache.dubbo</groupId>
- <version>1.0-SNAPSHOT</version>
+ <parent>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-samples-chain</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dubbo-samples-chain-backend</artifactId>
<properties>
- <source.level>1.8</source.level>
- <target.level>1.8</target.level>
- <spring.version>4.3.16.RELEASE</spring.version>
- <dubbo.version>2.7.0</dubbo.version>
- <dubbo.rpc.version>2.7.0</dubbo.rpc.version>
- <zookeeper.version>3.4.13</zookeeper.version>
- <curator.version>4.0.1</curator.version>
- <validation-api.version>1.1.0.Final</validation-api.version>
- <hibernate-validator.version>4.2.0.Final</hibernate-validator.version>
- <resteasy.version>3.0.19.Final</resteasy.version>
- <curator-client.version>4.0.1</curator-client.version>
- <swagger.version>1.5.19</swagger.version>
- <tomcat.version>7.0.88</tomcat.version>
- <servlet.version>3.0.1</servlet.version>
- <maven_checkstyle_version>3.0.0</maven_checkstyle_version>
- <apache-rat-plugin.version>0.12</apache-rat-plugin.version>
- <spring-boot.version>1.5.13.RELEASE</spring-boot.version>
+ <main-class>org.apache.dubbo.samples.chain.BackendProvider</main-class>
+ <image.name>${artifactId}:${dubbo.version}</image.name>
+ <dubbo.port>20880</dubbo.port>
</properties>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-framework-bom</artifactId>
- <version>${spring.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <!-- Import dependency management from Spring Boot -->
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-dependencies</artifactId>
- <version>${spring-boot.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- <version>4.1.16.Final</version>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-bom</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- <version>${dubbo.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.thrift</groupId>
- <artifactId>libthrift</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-rpc-rest</artifactId>
- <version>${dubbo.rpc.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- <version>${zookeeper.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-framework</artifactId>
- <version>${curator.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <version>${validation-api.version}</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>${hibernate-validator.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-jackson-provider</artifactId>
- <version>${resteasy.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-client</artifactId>
- <version>${curator-client.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>${servlet.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat.embed</groupId>
- <artifactId>tomcat-embed-core</artifactId>
- <version>${tomcat.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat.embed</groupId>
- <artifactId>tomcat-embed-logging-juli</artifactId>
- <version>${tomcat.version}</version>
- </dependency>
- <!-- swagger -->
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>${swagger.version}</version>
- </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-jaxrs</artifactId>
- <version>${swagger.version}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<dependencies>
<dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-framework</artifactId>
- <exclusions>
- <exclusion>
- <groupId>io.netty</groupId>
- <artifactId>netty</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-configcenter-zookeeper</artifactId>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-configcenter-zookeeper</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-metadata-report-api</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-samples-chain-api</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
-
-
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>${spring-boot.version}</version>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.7.0</version>
- <configuration>
- <source>${source.level}</source>
- <target>${target.level}</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <version>${apache-rat-plugin.version}</version>
- <executions>
- <execution>
- <id>verify.rat</id>
- <phase>verify</phase>
- <goals>
- <goal>check</goal>
- </goals>
- <configuration>
- <excludes>
- <exclude>**/*.versionsBackup</exclude>
- <exclude>**/.idea/</exclude>
- <exclude>**/*.iml</exclude>
- <exclude>**/*.txt</exclude>
- <exclude>**/*.load</exclude>
- <exclude>**/*.flex</exclude>
- <exclude>**/*.fc</exclude>
- <exclude>**/*.javascript</exclude>
- <exclude>**/*.properties</exclude>
- <exclude>**/*.thrift</exclude>
- <exclude>**/*.sh</exclude>
- <exclude>**/*.bat</exclude>
- <exclude>**/*.md</exclude>
- <exclude>.git/</exclude>
- <exclude>.gitignore</exclude>
- <!-- ASF jenkins box puts the Maven repo in our root directory. -->
- <exclude>.repository/</exclude>
- <exclude>**/.settings/*</exclude>
- <exclude>**/.classpath</exclude>
- <exclude>**/.project</exclude>
- <exclude>**/target/**</exclude>
- <exclude>**/*.log</exclude>
- <exclude>CODE_OF_CONDUCT.md</exclude>
- <exclude>.codecov.yml</exclude>
- <exclude>.travis.yml</exclude>
- <exclude>PULL_REQUEST_TEMPLATE.md</exclude>
- <exclude>CONTRIBUTING.md</exclude>
- <exclude>README.md</exclude>
- <exclude>**/codestyle/*</exclude>
- <exclude>**/resources/META-INF/**</exclude>
- <exclude>**/webapp/swagger/**</exclude>
- <exclude>**/org/apache/dubbo/samples/rpc/nativethrift/api/DemoService.java</exclude>
- </excludes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
<profiles>
<profile>
- <id>checkstyle</id>
- <activation>
- <jdk>[1.8,)</jdk>
- </activation>
+ <id>dubbo-integration-test</id>
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>${maven_checkstyle_version}</version>
- <dependencies>
- <dependency>
- <groupId>com.puppycrawl.tools</groupId>
- <artifactId>checkstyle</artifactId>
- <version>8.9</version>
- </dependency>
- </dependencies>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-maven-address-plugin</artifactId>
+ <version>1.0-SNAPSHOT</version>
<executions>
<execution>
- <id>checkstyle-validation</id>
- <phase>validate</phase>
+ <goals>
+ <goal>local-address</goal>
+ </goals>
<configuration>
- <configLocation>../../codestyle/checkstyle.xml</configLocation>
- <suppressionsLocation>../../codestyle/checkstyle-suppressions.xml</suppressionsLocation>
- <encoding>UTF-8</encoding>
- <consoleOutput>true</consoleOutput>
- <failOnViolation>true</failOnViolation>
+ <localAddress>dubbo-local-address</localAddress>
</configuration>
+ <phase>initialize</phase>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>com.google.cloud.tools</groupId>
+ <artifactId>jib-maven-plugin</artifactId>
+ <version>${jib-maven-plugin.version}</version>
+ <configuration>
+ <from>
+ <image>openjdk:8</image>
+ </from>
+ <to>
+ <image>${image.name}</image>
+ </to>
+ <container>
+ <mainClass>${main-class}</mainClass>
+ <ports>
+ <port>${dubbo.port}</port>
+ </ports>
+ <environment>
+ <DUBBO_IP_TO_REGISTRY>${dubbo-local-address}</DUBBO_IP_TO_REGISTRY>
+ <zookeeper.address>${dubbo-local-address}</zookeeper.address>
+ </environment>
+ </container>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
<goals>
- <goal>check</goal>
+ <goal>dockerBuild</goal>
</goals>
</execution>
</executions>
diff --git a/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/impl/CatServiceImpl.java b/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/chain/BackendProvider.java
similarity index 62%
copy from dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/impl/CatServiceImpl.java
copy to dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/chain/BackendProvider.java
index 561c3ce..a015a23 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/impl/CatServiceImpl.java
+++ b/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/chain/BackendProvider.java
@@ -14,28 +14,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.governance.impl;
-import org.apache.dubbo.samples.governance.api.CatService;
+package org.apache.dubbo.samples.chain;
-/**
- *
- */
-public class CatServiceImpl implements CatService {
- @Override
- public int getId() {
- return 1;
- }
+import org.springframework.context.support.ClassPathXmlApplicationContext;
- @Override
- public String getName() {
- System.out.println("I am a Cat!");
- return "I am a Cat!";
- }
+import java.util.concurrent.CountDownLatch;
+
+public class BackendProvider {
+
+ public static void main(String[] args) throws Exception {
+ ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/dubbo-demo-provider.xml");
+ context.start();
- @Override
- public String cat() {
- System.out.println("Meow Meow!");
- return "Meow Meow!";
+ System.out.println("dubbo service started");
+ new CountDownLatch(1).await();
}
}
diff --git a/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/impl/CatServiceImpl.java b/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/chain/impl/CatServiceImpl.java
similarity index 90%
copy from dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/impl/CatServiceImpl.java
copy to dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/chain/impl/CatServiceImpl.java
index 561c3ce..26cbaa0 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/impl/CatServiceImpl.java
+++ b/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/chain/impl/CatServiceImpl.java
@@ -14,13 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.governance.impl;
+package org.apache.dubbo.samples.chain.impl;
-import org.apache.dubbo.samples.governance.api.CatService;
+import org.apache.dubbo.samples.chain.api.CatService;
-/**
- *
- */
public class CatServiceImpl implements CatService {
@Override
public int getId() {
diff --git a/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/impl/DogServiceImpl.java b/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/chain/impl/DogServiceImpl.java
similarity index 92%
rename from dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/impl/DogServiceImpl.java
rename to dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/chain/impl/DogServiceImpl.java
index 0268c9c..9a861e4 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/impl/DogServiceImpl.java
+++ b/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/chain/impl/DogServiceImpl.java
@@ -14,13 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.governance.impl;
+package org.apache.dubbo.samples.chain.impl;
-import org.apache.dubbo.samples.governance.api.DogService;
+import org.apache.dubbo.samples.chain.api.DogService;
-/**
- *
- */
public class DogServiceImpl implements DogService {
@Override
public int getId() {
diff --git a/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/impl/LionServiceImpl.java b/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/chain/impl/LionServiceImpl.java
similarity index 90%
rename from dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/impl/LionServiceImpl.java
rename to dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/chain/impl/LionServiceImpl.java
index d1294c1..fe4deae 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/impl/LionServiceImpl.java
+++ b/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/chain/impl/LionServiceImpl.java
@@ -14,13 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.governance.impl;
+package org.apache.dubbo.samples.chain.impl;
-import org.apache.dubbo.samples.governance.api.LionService;
+import org.apache.dubbo.samples.chain.api.LionService;
-/**
- *
- */
public class LionServiceImpl implements LionService {
@Override
public int getId() {
diff --git a/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/impl/TigerServiceImpl.java b/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/chain/impl/TigerServiceImpl.java
similarity index 90%
rename from dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/impl/TigerServiceImpl.java
rename to dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/chain/impl/TigerServiceImpl.java
index 828f826..f1078e2 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/impl/TigerServiceImpl.java
+++ b/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/chain/impl/TigerServiceImpl.java
@@ -14,13 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.governance.impl;
+package org.apache.dubbo.samples.chain.impl;
-import org.apache.dubbo.samples.governance.api.TigerService;
+import org.apache.dubbo.samples.chain.api.TigerService;
-/**
- *
- */
public class TigerServiceImpl implements TigerService {
@Override
public int getId() {
diff --git a/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/BackendProvider.java b/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/BackendProvider.java
deleted file mode 100644
index 6b34e93..0000000
--- a/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/BackendProvider.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.samples.governance;
-
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-public class BackendProvider {
-
- public static void main(String[] args) throws Exception {
-// new EmbeddedZooKeeper(2181, false).start();
- ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"spring/dubbo-demo-provider.xml"});
- context.start();
-
- System.in.read(); // press any key to exit
- }
-
-}
diff --git a/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/resources/spring/dubbo-demo-provider.xml b/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/resources/spring/dubbo-demo-provider.xml
index 5a6c777..4e9ada7 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/resources/spring/dubbo-demo-provider.xml
+++ b/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/resources/spring/dubbo-demo-provider.xml
@@ -20,27 +20,28 @@
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
- xmlns="http://www.springframework.org/schema/beans"
+ xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd">
+ http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
+ <context:property-placeholder/>
<!-- optional provider's application name, used for tracing dependency relationship -->
- <dubbo:application name="concurrency-backend"/>
- <dubbo:registry address="zookeeper://127.0.0.1:2181"/>
- <dubbo:protocol port="-1"/>
+ <dubbo:application name="chain-backend-app"/>
+ <dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
+ <dubbo:protocol port="20880"/>
- <dubbo:config-center address="zookeeper://127.0.0.1:2181"/>
+ <dubbo:config-center address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
- <bean id="catService" class="org.apache.dubbo.samples.governance.impl.CatServiceImpl"/>
- <dubbo:service interface="org.apache.dubbo.samples.governance.api.CatService" ref="catService"/>
+ <bean id="catService" class="org.apache.dubbo.samples.chain.impl.CatServiceImpl"/>
+ <dubbo:service interface="org.apache.dubbo.samples.chain.api.CatService" ref="catService"/>
- <bean id="dogService" class="org.apache.dubbo.samples.governance.impl.DogServiceImpl"/>
- <dubbo:service interface="org.apache.dubbo.samples.governance.api.DogService" ref="dogService"/>
+ <bean id="dogService" class="org.apache.dubbo.samples.chain.impl.DogServiceImpl"/>
+ <dubbo:service interface="org.apache.dubbo.samples.chain.api.DogService" ref="dogService"/>
- <bean id="lionService" class="org.apache.dubbo.samples.governance.impl.LionServiceImpl"/>
- <dubbo:service interface="org.apache.dubbo.samples.governance.api.LionService" ref="lionService"/>
+ <bean id="lionService" class="org.apache.dubbo.samples.chain.impl.LionServiceImpl"/>
+ <dubbo:service interface="org.apache.dubbo.samples.chain.api.LionService" ref="lionService"/>
- <bean id="tigerService" class="org.apache.dubbo.samples.governance.impl.TigerServiceImpl"/>
- <dubbo:service interface="org.apache.dubbo.samples.governance.api.TigerService" ref="tigerService"/>
+ <bean id="tigerService" class="org.apache.dubbo.samples.chain.impl.TigerServiceImpl"/>
+ <dubbo:service interface="org.apache.dubbo.samples.chain.api.TigerService" ref="tigerService"/>
-</beans>
\ No newline at end of file
+</beans>
diff --git a/dubbo-samples-chain/dubbo-samples-chain-front/pom.xml b/dubbo-samples-chain/dubbo-samples-chain-front/pom.xml
index 7efe89c..687e1bf 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-front/pom.xml
+++ b/dubbo-samples-chain/dubbo-samples-chain-front/pom.xml
@@ -21,312 +21,138 @@
<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/xsd/maven-4.0.0.xsd">
- <groupId>org.apache.dubbo</groupId>
- <version>1.0-SNAPSHOT</version>
+ <parent>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-samples-chain</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dubbo-samples-chain-front</artifactId>
- <properties>
- <source.level>1.8</source.level>
- <target.level>1.8</target.level>
- <spring.version>4.3.16.RELEASE</spring.version>
- <dubbo.version>2.7.0</dubbo.version>
- <dubbo.rpc.version>2.7.0</dubbo.rpc.version>
- <zookeeper.version>3.4.13</zookeeper.version>
- <curator.version>4.0.1</curator.version>
- <validation-api.version>1.1.0.Final</validation-api.version>
- <hibernate-validator.version>4.2.0.Final</hibernate-validator.version>
- <resteasy.version>3.0.19.Final</resteasy.version>
- <curator-client.version>4.0.1</curator-client.version>
- <swagger.version>1.5.19</swagger.version>
- <tomcat.version>7.0.88</tomcat.version>
- <servlet.version>3.0.1</servlet.version>
- <maven_checkstyle_version>3.0.0</maven_checkstyle_version>
- <apache-rat-plugin.version>0.12</apache-rat-plugin.version>
- <spring-boot.version>1.5.13.RELEASE</spring-boot.version>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-framework-bom</artifactId>
- <version>${spring.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <!-- Import dependency management from Spring Boot -->
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-dependencies</artifactId>
- <version>${spring-boot.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- <version>4.1.16.Final</version>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-bom</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- <version>${dubbo.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.thrift</groupId>
- <artifactId>libthrift</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-rpc-rest</artifactId>
- <version>${dubbo.rpc.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- <version>${zookeeper.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-framework</artifactId>
- <version>${curator.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <version>${validation-api.version}</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>${hibernate-validator.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-jackson-provider</artifactId>
- <version>${resteasy.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-client</artifactId>
- <version>${curator-client.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>${servlet.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat.embed</groupId>
- <artifactId>tomcat-embed-core</artifactId>
- <version>${tomcat.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat.embed</groupId>
- <artifactId>tomcat-embed-logging-juli</artifactId>
- <version>${tomcat.version}</version>
- </dependency>
- <!-- swagger -->
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>${swagger.version}</version>
- </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-jaxrs</artifactId>
- <version>${swagger.version}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<dependencies>
<dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-framework</artifactId>
- <exclusions>
- <exclusion>
- <groupId>io.netty</groupId>
- <artifactId>netty</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-configcenter-zookeeper</artifactId>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-configcenter-zookeeper</artifactId>
+ <artifactId>dubbo-samples-chain-api</artifactId>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-metadata-report-api</artifactId>
+ <artifactId>dubbo-samples-chain-backend</artifactId>
+ <version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-samples-chain-api</artifactId>
+ <artifactId>dubbo-samples-chain-middle</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
-
-
<build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>${spring-boot.version}</version>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.7.0</version>
- <configuration>
- <source>${source.level}</source>
- <target>${target.level}</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <version>${apache-rat-plugin.version}</version>
- <executions>
- <execution>
- <id>verify.rat</id>
- <phase>verify</phase>
- <goals>
- <goal>check</goal>
- </goals>
- <configuration>
- <excludes>
- <exclude>**/*.versionsBackup</exclude>
- <exclude>**/.idea/</exclude>
- <exclude>**/*.iml</exclude>
- <exclude>**/*.txt</exclude>
- <exclude>**/*.load</exclude>
- <exclude>**/*.flex</exclude>
- <exclude>**/*.fc</exclude>
- <exclude>**/*.javascript</exclude>
- <exclude>**/*.properties</exclude>
- <exclude>**/*.thrift</exclude>
- <exclude>**/*.sh</exclude>
- <exclude>**/*.bat</exclude>
- <exclude>**/*.md</exclude>
- <exclude>.git/</exclude>
- <exclude>.gitignore</exclude>
- <!-- ASF jenkins box puts the Maven repo in our root directory. -->
- <exclude>.repository/</exclude>
- <exclude>**/.settings/*</exclude>
- <exclude>**/.classpath</exclude>
- <exclude>**/.project</exclude>
- <exclude>**/target/**</exclude>
- <exclude>**/*.log</exclude>
- <exclude>CODE_OF_CONDUCT.md</exclude>
- <exclude>.codecov.yml</exclude>
- <exclude>.travis.yml</exclude>
- <exclude>PULL_REQUEST_TEMPLATE.md</exclude>
- <exclude>CONTRIBUTING.md</exclude>
- <exclude>README.md</exclude>
- <exclude>**/codestyle/*</exclude>
- <exclude>**/resources/META-INF/**</exclude>
- <exclude>**/webapp/swagger/**</exclude>
- <exclude>**/org/apache/dubbo/samples/rpc/nativethrift/api/DemoService.java</exclude>
- </excludes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
</build>
<profiles>
<profile>
- <id>checkstyle</id>
- <activation>
- <jdk>[1.8,)</jdk>
- </activation>
+ <id>dubbo-integration-test</id>
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>${maven_checkstyle_version}</version>
- <dependencies>
- <dependency>
- <groupId>com.puppycrawl.tools</groupId>
- <artifactId>checkstyle</artifactId>
- <version>8.9</version>
- </dependency>
- </dependencies>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-maven-address-plugin</artifactId>
+ <version>1.0-SNAPSHOT</version>
<executions>
<execution>
- <id>checkstyle-validation</id>
- <phase>validate</phase>
+ <goals>
+ <goal>local-address</goal>
+ </goals>
<configuration>
- <configLocation>../../codestyle/checkstyle.xml</configLocation>
- <suppressionsLocation>../../codestyle/checkstyle-suppressions.xml</suppressionsLocation>
- <encoding>UTF-8</encoding>
- <consoleOutput>true</consoleOutput>
- <failOnViolation>true</failOnViolation>
+ <localAddress>dubbo-local-address</localAddress>
</configuration>
+ <phase>initialize</phase>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>${docker-maven-plugin.version}</version>
+ <configuration>
+ <images>
+ <image>
+ <external>
+ <type>compose</type>
+ <basedir>src/main/resources/docker</basedir>
+ <composeFile>docker-compose.yml</composeFile>
+ </external>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>start</id>
+ <phase>pre-integration-test</phase>
<goals>
- <goal>check</goal>
+ <goal>start</goal>
</goals>
</execution>
+ <execution>
+ <id>stop</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!-- wait until docker instances fully start up -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <configuration>
+ <tasks>
+ <sleep seconds="5" />
+ </tasks>
+ </configuration>
+ <executions>
+ <execution>
+ <id>sleep-for-a-while</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>${maven-failsafe-plugin.version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ <configuration>
+ <systemPropertyVariables>
+ <zookeeper.address>${dubbo-local-address}</zookeeper.address>
+ </systemPropertyVariables>
+ <includes>
+ <include>**/*IT.java</include>
+ </includes>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
diff --git a/dubbo-samples-chain/dubbo-samples-chain-front/src/main/java/org/apache/dubbo/samples/governance/FrontendConsumer.java b/dubbo-samples-chain/dubbo-samples-chain-front/src/main/java/org/apache/dubbo/samples/chain/FrontendConsumer.java
similarity index 72%
rename from dubbo-samples-chain/dubbo-samples-chain-front/src/main/java/org/apache/dubbo/samples/governance/FrontendConsumer.java
rename to dubbo-samples-chain/dubbo-samples-chain-front/src/main/java/org/apache/dubbo/samples/chain/FrontendConsumer.java
index 4cf6067..b1d55f7 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-front/src/main/java/org/apache/dubbo/samples/governance/FrontendConsumer.java
+++ b/dubbo-samples-chain/dubbo-samples-chain-front/src/main/java/org/apache/dubbo/samples/chain/FrontendConsumer.java
@@ -1,32 +1,30 @@
/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
*
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
-package org.apache.dubbo.samples.governance;
+package org.apache.dubbo.samples.chain;
-import org.apache.dubbo.common.Constants;
import org.apache.dubbo.rpc.RpcContext;
-import org.apache.dubbo.samples.governance.api.AmericanService;
-import org.apache.dubbo.samples.governance.api.CatService;
-import org.apache.dubbo.samples.governance.api.ChineseService;
-import org.apache.dubbo.samples.governance.api.DogService;
-import org.apache.dubbo.samples.governance.api.LionService;
-import org.apache.dubbo.samples.governance.api.TigerService;
+import org.apache.dubbo.rpc.cluster.Constants;
+import org.apache.dubbo.samples.chain.api.AmericanService;
+import org.apache.dubbo.samples.chain.api.CatService;
+import org.apache.dubbo.samples.chain.api.ChineseService;
+import org.apache.dubbo.samples.chain.api.DogService;
+import org.apache.dubbo.samples.chain.api.LionService;
+import org.apache.dubbo.samples.chain.api.TigerService;
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -40,7 +38,7 @@ public class FrontendConsumer {
private static long interval = 200;
public static void main(String[] args) {
- ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"spring/dubbo-demo-consumer.xml"});
+ ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/dubbo-demo-consumer.xml");
context.start();
diff --git a/dubbo-samples-chain/dubbo-samples-chain-front/src/main/resources/docker/docker-compose.yml b/dubbo-samples-chain/dubbo-samples-chain-front/src/main/resources/docker/docker-compose.yml
new file mode 100644
index 0000000..0597b32
--- /dev/null
+++ b/dubbo-samples-chain/dubbo-samples-chain-front/src/main/resources/docker/docker-compose.yml
@@ -0,0 +1,14 @@
+version: "2"
+services:
+ zookeeper:
+ image: "zookeeper:latest"
+ ports:
+ - "2181:2181"
+ backend:
+ image: "dubbo-samples-chain-backend:${dubbo.version}"
+ ports:
+ - "20880:20880"
+ middle:
+ image: "dubbo-samples-chain-middle:${dubbo.version}"
+ ports:
+ - "20881:20881"
diff --git a/dubbo-samples-chain/dubbo-samples-chain-front/src/main/resources/spring/dubbo-demo-consumer.xml b/dubbo-samples-chain/dubbo-samples-chain-front/src/main/resources/spring/dubbo-demo-consumer.xml
index 333c3e3..7fdb67e 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-front/src/main/resources/spring/dubbo-demo-consumer.xml
+++ b/dubbo-samples-chain/dubbo-samples-chain-front/src/main/resources/spring/dubbo-demo-consumer.xml
@@ -20,26 +20,24 @@
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
- xmlns="http://www.springframework.org/schema/beans"
+ xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd">
+ http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
+ <context:property-placeholder/>
<!-- optional, consumer's application name, used for tracing dependency relationship (not a matching criterion),
don't set it same as provider -->
- <dubbo:application name="concurrency-front"/>
- <dubbo:registry address="zookeeper://127.0.0.1:2181"/>
+ <dubbo:application name="chain-frontend-app"/>
- <dubbo:config-center address="zookeeper://127.0.0.1:2181"/>
+ <dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
+ <dubbo:config-center address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
<!-- generate proxy for the remote service, then demoService can be used in the same way as the
local regular interface -->
- <dubbo:reference id="catService" check="false" interface="org.apache.dubbo.samples.governance.api.CatService"/>
- <dubbo:reference id="dogService" check="false" interface="org.apache.dubbo.samples.governance.api.DogService"/>
- <dubbo:reference id="lionService" check="false" interface="org.apache.dubbo.samples.governance.api.LionService"/>
- <dubbo:reference id="tigerService" check="false" interface="org.apache.dubbo.samples.governance.api.TigerService"/>
- <dubbo:reference id="chineseService" check="false"
- interface="org.apache.dubbo.samples.governance.api.ChineseService"/>
- <dubbo:reference id="americanService" check="false"
- interface="org.apache.dubbo.samples.governance.api.AmericanService"/>
-
-</beans>
\ No newline at end of file
+ <dubbo:reference id="catService" check="false" interface="org.apache.dubbo.samples.chain.api.CatService"/>
+ <dubbo:reference id="dogService" check="false" interface="org.apache.dubbo.samples.chain.api.DogService"/>
+ <dubbo:reference id="lionService" check="false" interface="org.apache.dubbo.samples.chain.api.LionService"/>
+ <dubbo:reference id="tigerService" check="false" interface="org.apache.dubbo.samples.chain.api.TigerService"/>
+ <dubbo:reference id="chineseService" check="false" interface="org.apache.dubbo.samples.chain.api.ChineseService"/>
+ <dubbo:reference id="americanService" check="false" interface="org.apache.dubbo.samples.chain.api.AmericanService"/>
+</beans>
diff --git a/dubbo-samples-chain/dubbo-samples-chain-front/src/test/java/org/apache/dubbo/samples/chain/MIddleServiceIT.java b/dubbo-samples-chain/dubbo-samples-chain-front/src/test/java/org/apache/dubbo/samples/chain/MIddleServiceIT.java
new file mode 100644
index 0000000..4c7767f
--- /dev/null
+++ b/dubbo-samples-chain/dubbo-samples-chain-front/src/test/java/org/apache/dubbo/samples/chain/MIddleServiceIT.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.dubbo.samples.chain;
+
+import org.apache.dubbo.rpc.RpcException;
+import org.apache.dubbo.samples.chain.api.AmericanService;
+import org.apache.dubbo.samples.chain.api.CatService;
+import org.apache.dubbo.samples.chain.api.ChineseService;
+import org.apache.dubbo.samples.chain.api.DogService;
+import org.apache.dubbo.samples.chain.api.LionService;
+import org.apache.dubbo.samples.chain.api.TigerService;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import static org.junit.Assert.fail;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(locations = "classpath*:spring/dubbo-demo-consumer.xml")
+public class MIddleServiceIT {
+ @Autowired
+ @Qualifier("americanService")
+ private AmericanService americanService;
+
+ @Autowired
+ @Qualifier("chineseService")
+ private ChineseService chineseService;
+
+ @Autowired
+ private CatService catService;
+
+ @Autowired
+ private DogService dogService;
+
+ @Autowired
+ private LionService lionService;
+
+ @Autowired
+ private TigerService tigerService;
+
+ @Test
+ public void americanWatch() throws Exception {
+ Assert.assertEquals(americanService.watch(), "I want to see Lion!");
+ }
+
+ @Test(expected = RpcException.class)
+ public void americanEat() throws Exception {
+ americanService.eat();
+ }
+
+ @Test
+ public void chineseWatch() throws Exception {
+ Assert.assertEquals(chineseService.watch(), "I want to see Tiger!");
+ }
+
+ @Test(expected = RpcException.class)
+ public void chineseEat() throws Exception {
+ chineseService.eat();
+ }
+
+ @Test
+ public void cat() throws Exception {
+ Assert.assertEquals(1, catService.getId());
+ Assert.assertEquals("I am a Cat!", catService.getName());
+ Assert.assertEquals("Meow Meow!", catService.cat());
+ }
+
+ @Test
+ public void dog() throws Exception {
+ Assert.assertEquals(0, dogService.getId());
+ try {
+ dogService.getName();
+ fail("timeout should happen");
+ } catch (Throwable t) {
+
+ }
+ Assert.assertEquals("Woof Woof!", dogService.dog());
+ }
+
+ @Test
+ public void lion() throws Exception {
+ Assert.assertEquals(2, lionService.getId());
+ Assert.assertEquals("I am a Lion!", lionService.getName());
+ Assert.assertEquals("Lion Lion!", lionService.lion());
+ }
+
+ @Test
+ public void tiger() throws Exception {
+ Assert.assertEquals(3, tigerService.getId());
+ Assert.assertEquals("I am a Tiger!", tigerService.getName());
+ Assert.assertEquals("Tiger Tiger!", tigerService.tiger());
+ }
+}
diff --git a/dubbo-samples-chain/dubbo-samples-chain-middle/pom.xml b/dubbo-samples-chain/dubbo-samples-chain-middle/pom.xml
index 5e70b02..b98e904 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-middle/pom.xml
+++ b/dubbo-samples-chain/dubbo-samples-chain-middle/pom.xml
@@ -21,310 +21,78 @@
<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/xsd/maven-4.0.0.xsd">
- <groupId>org.apache.dubbo</groupId>
- <version>1.0-SNAPSHOT</version>
+ <parent>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-samples-chain</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
<modelVersion>4.0.0</modelVersion>
-
<artifactId>dubbo-samples-chain-middle</artifactId>
<properties>
- <source.level>1.8</source.level>
- <target.level>1.8</target.level>
- <spring.version>4.3.16.RELEASE</spring.version>
- <dubbo.version>2.7.0</dubbo.version>
- <dubbo.rpc.version>2.7.0</dubbo.rpc.version>
- <zookeeper.version>3.4.13</zookeeper.version>
- <curator.version>4.0.1</curator.version>
- <validation-api.version>1.1.0.Final</validation-api.version>
- <hibernate-validator.version>4.2.0.Final</hibernate-validator.version>
- <resteasy.version>3.0.19.Final</resteasy.version>
- <curator-client.version>4.0.1</curator-client.version>
- <swagger.version>1.5.19</swagger.version>
- <tomcat.version>7.0.88</tomcat.version>
- <servlet.version>3.0.1</servlet.version>
- <maven_checkstyle_version>3.0.0</maven_checkstyle_version>
- <apache-rat-plugin.version>0.12</apache-rat-plugin.version>
- <spring-boot.version>1.5.13.RELEASE</spring-boot.version>
+ <main-class>org.apache.dubbo.samples.chain.MiddleEndProvider</main-class>
+ <image.name>${artifactId}:${dubbo.version}</image.name>
+ <dubbo.port>20881</dubbo.port>
</properties>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-framework-bom</artifactId>
- <version>${spring.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <!-- Import dependency management from Spring Boot -->
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-dependencies</artifactId>
- <version>${spring-boot.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- <version>4.1.16.Final</version>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-bom</artifactId>
- <version>${dubbo.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- <version>${dubbo.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.thrift</groupId>
- <artifactId>libthrift</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-rpc-rest</artifactId>
- <version>${dubbo.rpc.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- <version>${zookeeper.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-framework</artifactId>
- <version>${curator.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <version>${validation-api.version}</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>${hibernate-validator.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-jackson-provider</artifactId>
- <version>${resteasy.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-client</artifactId>
- <version>${curator-client.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>${servlet.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat.embed</groupId>
- <artifactId>tomcat-embed-core</artifactId>
- <version>${tomcat.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat.embed</groupId>
- <artifactId>tomcat-embed-logging-juli</artifactId>
- <version>${tomcat.version}</version>
- </dependency>
- <!-- swagger -->
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-annotations</artifactId>
- <version>${swagger.version}</version>
- </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-jaxrs</artifactId>
- <version>${swagger.version}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<dependencies>
<dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-framework</artifactId>
- <exclusions>
- <exclusion>
- <groupId>io.netty</groupId>
- <artifactId>netty</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-configcenter-zookeeper</artifactId>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty-all</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-configcenter-zookeeper</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-metadata-report-api</artifactId>
- </dependency>
- <dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-samples-chain-api</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
-
-
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>${spring-boot.version}</version>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.7.0</version>
- <configuration>
- <source>${source.level}</source>
- <target>${target.level}</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <version>${apache-rat-plugin.version}</version>
- <executions>
- <execution>
- <id>verify.rat</id>
- <phase>verify</phase>
- <goals>
- <goal>check</goal>
- </goals>
- <configuration>
- <excludes>
- <exclude>**/*.versionsBackup</exclude>
- <exclude>**/.idea/</exclude>
- <exclude>**/*.iml</exclude>
- <exclude>**/*.txt</exclude>
- <exclude>**/*.load</exclude>
- <exclude>**/*.flex</exclude>
- <exclude>**/*.fc</exclude>
- <exclude>**/*.javascript</exclude>
- <exclude>**/*.properties</exclude>
- <exclude>**/*.thrift</exclude>
- <exclude>**/*.sh</exclude>
- <exclude>**/*.bat</exclude>
- <exclude>**/*.md</exclude>
- <exclude>.git/</exclude>
- <exclude>.gitignore</exclude>
- <!-- ASF jenkins box puts the Maven repo in our root directory. -->
- <exclude>.repository/</exclude>
- <exclude>**/.settings/*</exclude>
- <exclude>**/.classpath</exclude>
- <exclude>**/.project</exclude>
- <exclude>**/target/**</exclude>
- <exclude>**/*.log</exclude>
- <exclude>CODE_OF_CONDUCT.md</exclude>
- <exclude>.codecov.yml</exclude>
- <exclude>.travis.yml</exclude>
- <exclude>PULL_REQUEST_TEMPLATE.md</exclude>
- <exclude>CONTRIBUTING.md</exclude>
- <exclude>README.md</exclude>
- <exclude>**/codestyle/*</exclude>
- <exclude>**/resources/META-INF/**</exclude>
- <exclude>**/webapp/swagger/**</exclude>
- <exclude>**/org/apache/dubbo/samples/rpc/nativethrift/api/DemoService.java</exclude>
- </excludes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
<profiles>
<profile>
- <id>checkstyle</id>
- <activation>
- <jdk>[1.8,)</jdk>
- </activation>
+ <id>dubbo-integration-test</id>
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>${maven_checkstyle_version}</version>
- <dependencies>
- <dependency>
- <groupId>com.puppycrawl.tools</groupId>
- <artifactId>checkstyle</artifactId>
- <version>8.9</version>
- </dependency>
- </dependencies>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-maven-address-plugin</artifactId>
+ <version>1.0-SNAPSHOT</version>
<executions>
<execution>
- <id>checkstyle-validation</id>
- <phase>validate</phase>
+ <goals>
+ <goal>local-address</goal>
+ </goals>
<configuration>
- <configLocation>../../codestyle/checkstyle.xml</configLocation>
- <suppressionsLocation>../../codestyle/checkstyle-suppressions.xml</suppressionsLocation>
- <encoding>UTF-8</encoding>
- <consoleOutput>true</consoleOutput>
- <failOnViolation>true</failOnViolation>
+ <localAddress>dubbo-local-address</localAddress>
</configuration>
+ <phase>initialize</phase>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>com.google.cloud.tools</groupId>
+ <artifactId>jib-maven-plugin</artifactId>
+ <version>${jib-maven-plugin.version}</version>
+ <configuration>
+ <from>
+ <image>openjdk:8</image>
+ </from>
+ <to>
+ <image>${image.name}</image>
+ </to>
+ <container>
+ <mainClass>${main-class}</mainClass>
+ <ports>
+ <port>${dubbo.port}</port>
+ </ports>
+ <environment>
+ <DUBBO_IP_TO_REGISTRY>${dubbo-local-address}</DUBBO_IP_TO_REGISTRY>
+ <zookeeper.address>${dubbo-local-address}</zookeeper.address>
+ </environment>
+ </container>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
<goals>
- <goal>check</goal>
+ <goal>dockerBuild</goal>
</goals>
</execution>
</executions>
@@ -333,5 +101,4 @@
</build>
</profile>
</profiles>
-
</project>
diff --git a/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/impl/CatServiceImpl.java b/dubbo-samples-chain/dubbo-samples-chain-middle/src/main/java/org/apache/dubbo/samples/chain/MiddleEndProvider.java
similarity index 62%
rename from dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/impl/CatServiceImpl.java
rename to dubbo-samples-chain/dubbo-samples-chain-middle/src/main/java/org/apache/dubbo/samples/chain/MiddleEndProvider.java
index 561c3ce..69a7a43 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-backend/src/main/java/org/apache/dubbo/samples/governance/impl/CatServiceImpl.java
+++ b/dubbo-samples-chain/dubbo-samples-chain-middle/src/main/java/org/apache/dubbo/samples/chain/MiddleEndProvider.java
@@ -14,28 +14,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.governance.impl;
-import org.apache.dubbo.samples.governance.api.CatService;
+package org.apache.dubbo.samples.chain;
-/**
- *
- */
-public class CatServiceImpl implements CatService {
- @Override
- public int getId() {
- return 1;
- }
+import org.springframework.context.support.ClassPathXmlApplicationContext;
- @Override
- public String getName() {
- System.out.println("I am a Cat!");
- return "I am a Cat!";
- }
+import java.util.concurrent.CountDownLatch;
+
+public class MiddleEndProvider {
+
+ public static void main(String[] args) throws Exception {
+ ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/dubbo-demo-provider.xml");
+ context.start();
- @Override
- public String cat() {
- System.out.println("Meow Meow!");
- return "Meow Meow!";
+ System.out.println("dubbo service started");
+ new CountDownLatch(1).await();
}
}
diff --git a/dubbo-samples-chain/dubbo-samples-chain-middle/src/main/java/org/apache/dubbo/samples/governance/impl/AmericanServiceImpl.java b/dubbo-samples-chain/dubbo-samples-chain-middle/src/main/java/org/apache/dubbo/samples/chain/impl/AmericanServiceImpl.java
similarity index 88%
rename from dubbo-samples-chain/dubbo-samples-chain-middle/src/main/java/org/apache/dubbo/samples/governance/impl/AmericanServiceImpl.java
rename to dubbo-samples-chain/dubbo-samples-chain-middle/src/main/java/org/apache/dubbo/samples/chain/impl/AmericanServiceImpl.java
index ac220d7..9249988 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-middle/src/main/java/org/apache/dubbo/samples/governance/impl/AmericanServiceImpl.java
+++ b/dubbo-samples-chain/dubbo-samples-chain-middle/src/main/java/org/apache/dubbo/samples/chain/impl/AmericanServiceImpl.java
@@ -14,17 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.governance.impl;
+package org.apache.dubbo.samples.chain.impl;
-import org.apache.dubbo.samples.governance.api.AmericanService;
-import org.apache.dubbo.samples.governance.api.CatService;
-import org.apache.dubbo.samples.governance.api.LionService;
+import org.apache.dubbo.samples.chain.api.AmericanService;
+import org.apache.dubbo.samples.chain.api.CatService;
+import org.apache.dubbo.samples.chain.api.LionService;
import org.springframework.beans.factory.annotation.Autowired;
-/**
- *
- */
public class AmericanServiceImpl implements AmericanService {
@Autowired
diff --git a/dubbo-samples-chain/dubbo-samples-chain-middle/src/main/java/org/apache/dubbo/samples/governance/impl/ChineseServiceImpl.java b/dubbo-samples-chain/dubbo-samples-chain-middle/src/main/java/org/apache/dubbo/samples/chain/impl/ChineseServiceImpl.java
similarity index 87%
rename from dubbo-samples-chain/dubbo-samples-chain-middle/src/main/java/org/apache/dubbo/samples/governance/impl/ChineseServiceImpl.java
rename to dubbo-samples-chain/dubbo-samples-chain-middle/src/main/java/org/apache/dubbo/samples/chain/impl/ChineseServiceImpl.java
index f6c6897..2c01ae1 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-middle/src/main/java/org/apache/dubbo/samples/governance/impl/ChineseServiceImpl.java
+++ b/dubbo-samples-chain/dubbo-samples-chain-middle/src/main/java/org/apache/dubbo/samples/chain/impl/ChineseServiceImpl.java
@@ -14,17 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.dubbo.samples.governance.impl;
+package org.apache.dubbo.samples.chain.impl;
-import org.apache.dubbo.samples.governance.api.ChineseService;
-import org.apache.dubbo.samples.governance.api.DogService;
-import org.apache.dubbo.samples.governance.api.TigerService;
+import org.apache.dubbo.samples.chain.api.ChineseService;
+import org.apache.dubbo.samples.chain.api.DogService;
+import org.apache.dubbo.samples.chain.api.TigerService;
import org.springframework.beans.factory.annotation.Autowired;
-/**
- *
- */
public class ChineseServiceImpl implements ChineseService {
@Autowired
diff --git a/dubbo-samples-chain/dubbo-samples-chain-middle/src/main/java/org/apache/dubbo/samples/governance/MiddleEndProvider.java b/dubbo-samples-chain/dubbo-samples-chain-middle/src/main/java/org/apache/dubbo/samples/governance/MiddleEndProvider.java
deleted file mode 100644
index b45c895..0000000
--- a/dubbo-samples-chain/dubbo-samples-chain-middle/src/main/java/org/apache/dubbo/samples/governance/MiddleEndProvider.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.dubbo.samples.governance;
-
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-public class MiddleEndProvider {
-
- public static void main(String[] args) throws Exception {
-// new EmbeddedZooKeeper(2181, false).start();
- ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"spring/dubbo-demo-provider.xml"});
- context.start();
-
- System.in.read(); // press any key to exit
- }
-
-
-}
diff --git a/dubbo-samples-chain/dubbo-samples-chain-middle/src/main/resources/spring/dubbo-demo-provider.xml b/dubbo-samples-chain/dubbo-samples-chain-middle/src/main/resources/spring/dubbo-demo-provider.xml
index b760308..7563e55 100644
--- a/dubbo-samples-chain/dubbo-samples-chain-middle/src/main/resources/spring/dubbo-demo-provider.xml
+++ b/dubbo-samples-chain/dubbo-samples-chain-middle/src/main/resources/spring/dubbo-demo-provider.xml
@@ -23,27 +23,27 @@
xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://dubbo.apache.org/schema/dubbo http://dubbo.apache.org/schema/dubbo/dubbo.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
-
- <context:component-scan base-package="org.apache.dubbo.samples.governance.impl"/>
+ <context:property-placeholder/>
+ <context:component-scan base-package="org.apache.dubbo.samples.chain.impl"/>
<!-- optional provider's application name, used for tracing dependency relationship -->
- <dubbo:application name="concurrency-middle"/>
- <dubbo:registry address="zookeeper://127.0.0.1:2181"/>
- <dubbo:protocol port="-1"/>
+ <dubbo:application name="chain-middle-app"/>
+ <dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
+ <dubbo:protocol port="20881"/>
- <dubbo:config-center address="zookeeper://127.0.0.1:2181"/>
+ <dubbo:config-center address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
<!-- generate proxy for the remote service, then demoService can be used in the same way as the
local regular interface -->
- <dubbo:reference id="catService" check="false" interface="org.apache.dubbo.samples.governance.api.CatService"/>
- <dubbo:reference id="dogService" check="false" interface="org.apache.dubbo.samples.governance.api.DogService"/>
- <dubbo:reference id="lionService" check="false" interface="org.apache.dubbo.samples.governance.api.LionService"/>
- <dubbo:reference id="tigerService" check="false" interface="org.apache.dubbo.samples.governance.api.TigerService"/>
+ <dubbo:reference id="catService" check="false" interface="org.apache.dubbo.samples.chain.api.CatService"/>
+ <dubbo:reference id="dogService" check="false" interface="org.apache.dubbo.samples.chain.api.DogService"/>
+ <dubbo:reference id="lionService" check="false" interface="org.apache.dubbo.samples.chain.api.LionService"/>
+ <dubbo:reference id="tigerService" check="false" interface="org.apache.dubbo.samples.chain.api.TigerService"/>
- <bean id="chineseService" class="org.apache.dubbo.samples.governance.impl.ChineseServiceImpl"/>
- <dubbo:service interface="org.apache.dubbo.samples.governance.api.ChineseService" ref="chineseService"/>
+ <bean id="chineseService" class="org.apache.dubbo.samples.chain.impl.ChineseServiceImpl"/>
+ <dubbo:service interface="org.apache.dubbo.samples.chain.api.ChineseService" ref="chineseService"/>
- <bean id="americanService" class="org.apache.dubbo.samples.governance.impl.AmericanServiceImpl"/>
- <dubbo:service interface="org.apache.dubbo.samples.governance.api.AmericanService" ref="americanService"/>
+ <bean id="americanService" class="org.apache.dubbo.samples.chain.impl.AmericanServiceImpl"/>
+ <dubbo:service interface="org.apache.dubbo.samples.chain.api.AmericanService" ref="americanService"/>
-</beans>
\ No newline at end of file
+</beans>
diff --git a/dubbo-samples-chain/pom.xml b/dubbo-samples-chain/pom.xml
index 2998eb6..c7077fc 100644
--- a/dubbo-samples-chain/pom.xml
+++ b/dubbo-samples-chain/pom.xml
@@ -28,11 +28,78 @@
<packaging>pom</packaging>
<artifactId>dubbo-samples-chain</artifactId>
+ <properties>
+ <source.level>1.8</source.level>
+ <target.level>1.8</target.level>
+ <dubbo.version>2.7.2</dubbo.version>
+ <spring.version>4.3.16.RELEASE</spring.version>
+ <junit.version>4.12</junit.version>
+ <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
+ <jib-maven-plugin.version>1.2.0</jib-maven-plugin.version>
+ <docker-maven-plugin.version>0.30.0</docker-maven-plugin.version>
+ <maven-failsafe-plugin.version>3.0.0-M3</maven-failsafe-plugin.version>
+ </properties>
+
<modules>
<module>dubbo-samples-chain-api</module>
- <module>dubbo-samples-chain-front</module>
- <module>dubbo-samples-chain-middle</module>
<module>dubbo-samples-chain-backend</module>
+ <module>dubbo-samples-chain-middle</module>
+ <module>dubbo-samples-chain-front</module>
</modules>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo</artifactId>
+ <version>${dubbo.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-dependencies-zookeeper</artifactId>
+ <version>${dubbo.version}</version>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo</artifactId>
+ <version>${dubbo.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.dubbo</groupId>
+ <artifactId>dubbo-dependencies-zookeeper</artifactId>
+ <version>${dubbo.version}</version>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <version>${spring.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${maven-compiler-plugin.version}</version>
+ <configuration>
+ <source>${source.level}</source>
+ <target>${target.level}</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org