add case-configuration.yml in dubbo-samples-governance (#242)
diff --git a/dubbo-samples-governance/dubbo-samples-applevel-override/case-configuration.yml b/dubbo-samples-governance/dubbo-samples-applevel-override/case-configuration.yml
new file mode 100644
index 0000000..e11dc1f
--- /dev/null
+++ b/dubbo-samples-governance/dubbo-samples-applevel-override/case-configuration.yml
@@ -0,0 +1,63 @@
+# 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.
+
+services:
+ zookeeper:
+ image: zookeeper:latest
+
+ dubbo-samples-applevel-override1:
+ type: app
+ basedir: .
+ mainClass: org.apache.dubbo.samples.governance.BasicProvider
+ systemProps:
+ - zookeeper.address=zookeeper
+ - zookeeper.port=2181
+ - dubbo.port=20880
+ waitPortsBeforeRun:
+ - zookeeper:2181
+ depends_on:
+ - zookeeper
+
+ dubbo-samples-applevel-override2:
+ type: app
+ basedir: .
+ mainClass: org.apache.dubbo.samples.governance.BasicProvider
+ systemProps:
+ - zookeeper.address=zookeeper
+ - zookeeper.port=2181
+ - dubbo.port=20881
+ waitPortsBeforeRun:
+ - zookeeper:2181
+ depends_on:
+ - zookeeper
+
+ dubbo-samples-applevel-override-test:
+ type: test
+ basedir: .
+ tests:
+ - "**/*IT.class"
+ systemProps:
+ - zookeeper.address=zookeeper
+ - zookeeper.port=2181
+ waitPortsBeforeRun:
+ - zookeeper:2181
+ - dubbo-samples-applevel-override1:20880
+ - dubbo-samples-applevel-override2:20881
+ depends_on:
+ - zookeeper
+ - dubbo-samples-applevel-override1
+ - dubbo-samples-applevel-override2
+
diff --git a/dubbo-samples-governance/dubbo-samples-applevel-override/pom.xml b/dubbo-samples-governance/dubbo-samples-applevel-override/pom.xml
index 9c5c494..6046b46 100644
--- a/dubbo-samples-governance/dubbo-samples-applevel-override/pom.xml
+++ b/dubbo-samples-governance/dubbo-samples-applevel-override/pom.xml
@@ -34,186 +34,68 @@
<dubbo.version>2.7.7</dubbo.version>
<spring.version>4.3.16.RELEASE</spring.version>
<junit.version>4.12</junit.version>
- <docker-maven-plugin.version>0.30.0</docker-maven-plugin.version>
- <jib-maven-plugin.version>1.2.0</jib-maven-plugin.version>
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
- <maven-failsafe-plugin.version>2.21.0</maven-failsafe-plugin.version>
- <image.name>${project.artifactId}:${dubbo.version}</image.name>
- <java-image.name>openjdk:8</java-image.name>
- <dubbo.port.1>20880</dubbo.port.1>
- <dubbo.port.2>20881</dubbo.port.2>
- <zookeeper.port>2181</zookeeper.port>
- <main-class>org.apache.dubbo.samples.governance.BasicProvider</main-class>
</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>
+ <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-dependencies-zookeeper</artifactId>
+ <version>${dubbo.version}</version>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
<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>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>
<profiles>
- <profile>
- <id>dubbo-integration-test</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-maven-address-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <executions>
- <execution>
- <goals>
- <goal>local-address</goal>
- </goals>
- <configuration>
- <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>${java-image.name}</image>
- </from>
- <to>
- <image>${image.name}</image>
- </to>
- <container>
- <mainClass>${main-class}</mainClass>
- <environment>
- <DUBBO_IP_TO_REGISTRY>${dubbo-local-address}</DUBBO_IP_TO_REGISTRY>
- </environment>
- <jvmFlags>
- <jvmFlag>-Dzookeeper.address=${dubbo-local-address}</jvmFlag>
- </jvmFlags>
- </container>
- </configuration>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>dockerBuild</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>${docker-maven-plugin.version}</version>
- <configuration>
- <images>
- <image>
- <name>zookeeper:latest</name>
- <run>
- <ports>
- <port>${zookeeper.port}:${zookeeper.port}</port>
- </ports>
- </run>
- </image>
- <image>
- <name>${image.name}</name>
- <run>
- <ports>
- <port>${dubbo.port.1}:${dubbo.port.1}</port>
- </ports>
- <wait>
- <log>dubbo service started</log>
- </wait>
- <env>
- <dubbo.port>${dubbo.port.1}</dubbo.port>
- </env>
- </run>
- </image>
- <image>
- <name>${image.name}</name>
- <run>
- <ports>
- <port>${dubbo.port.2}:${dubbo.port.2}</port>
- </ports>
- <wait>
- <log>dubbo service started</log>
- </wait>
- <env>
- <dubbo.port>${dubbo.port.2}</dubbo.port>
- </env>
- </run>
- </image>
- </images>
- </configuration>
- <executions>
- <execution>
- <id>start</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- </execution>
- <execution>
- <id>stop</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</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>
- </build>
- </profile>
<!-- For jdk 11 above JavaEE annotation -->
<profile>
<id>javax.annotation</id>
diff --git a/dubbo-samples-governance/dubbo-samples-configconditionrouter/case-configuration.yml b/dubbo-samples-governance/dubbo-samples-configconditionrouter/case-configuration.yml
new file mode 100644
index 0000000..43ac656
--- /dev/null
+++ b/dubbo-samples-governance/dubbo-samples-configconditionrouter/case-configuration.yml
@@ -0,0 +1,62 @@
+# 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.
+
+services:
+ zookeeper:
+ image: zookeeper:latest
+
+ dubbo-samples-configconditionrouter1:
+ type: app
+ basedir: .
+ mainClass: org.apache.dubbo.samples.governance.BasicProvider
+ systemProps:
+ - zookeeper.address=zookeeper
+ - zookeeper.port=2181
+ - dubbo.port=20880
+ waitPortsBeforeRun:
+ - zookeeper:2181
+ depends_on:
+ - zookeeper
+
+ dubbo-samples-configconditionrouter2:
+ type: app
+ basedir: .
+ mainClass: org.apache.dubbo.samples.governance.BasicProvider
+ systemProps:
+ - zookeeper.address=zookeeper
+ - zookeeper.port=2181
+ - dubbo.port=20881
+ waitPortsBeforeRun:
+ - zookeeper:2181
+ depends_on:
+ - zookeeper
+
+ dubbo-samples-configconditionrouter-test:
+ type: test
+ basedir: .
+ tests:
+ - "**/*IT.class"
+ systemProps:
+ - zookeeper.address=zookeeper
+ - zookeeper.port=2181
+ waitPortsBeforeRun:
+ - zookeeper:2181
+ - dubbo-samples-configconditionrouter1:20880
+ - dubbo-samples-configconditionrouter2:20881
+ depends_on:
+ - zookeeper
+ - dubbo-samples-configconditionrouter1
+ - dubbo-samples-configconditionrouter2
diff --git a/dubbo-samples-governance/dubbo-samples-configconditionrouter/pom.xml b/dubbo-samples-governance/dubbo-samples-configconditionrouter/pom.xml
index 10a51c6..e311547 100644
--- a/dubbo-samples-governance/dubbo-samples-configconditionrouter/pom.xml
+++ b/dubbo-samples-governance/dubbo-samples-configconditionrouter/pom.xml
@@ -34,186 +34,68 @@
<dubbo.version>2.7.7</dubbo.version>
<spring.version>4.3.16.RELEASE</spring.version>
<junit.version>4.12</junit.version>
- <docker-maven-plugin.version>0.30.0</docker-maven-plugin.version>
- <jib-maven-plugin.version>1.2.0</jib-maven-plugin.version>
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
- <maven-failsafe-plugin.version>2.21.0</maven-failsafe-plugin.version>
- <image.name>${project.artifactId}:${dubbo.version}</image.name>
- <java-image.name>openjdk:8</java-image.name>
- <dubbo.port.1>20880</dubbo.port.1>
- <dubbo.port.2>20881</dubbo.port.2>
- <zookeeper.port>2181</zookeeper.port>
- <main-class>org.apache.dubbo.samples.governance.BasicProvider</main-class>
</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>
+ <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-dependencies-zookeeper</artifactId>
+ <version>${dubbo.version}</version>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
<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>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>
<profiles>
- <profile>
- <id>dubbo-integration-test</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-maven-address-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <executions>
- <execution>
- <goals>
- <goal>local-address</goal>
- </goals>
- <configuration>
- <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>${java-image.name}</image>
- </from>
- <to>
- <image>${image.name}</image>
- </to>
- <container>
- <mainClass>${main-class}</mainClass>
- <environment>
- <DUBBO_IP_TO_REGISTRY>${dubbo-local-address}</DUBBO_IP_TO_REGISTRY>
- </environment>
- <jvmFlags>
- <jvmFlag>-Dzookeeper.address=${dubbo-local-address}</jvmFlag>
- </jvmFlags>
- </container>
- </configuration>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>dockerBuild</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>${docker-maven-plugin.version}</version>
- <configuration>
- <images>
- <image>
- <name>zookeeper:latest</name>
- <run>
- <ports>
- <port>${zookeeper.port}:${zookeeper.port}</port>
- </ports>
- </run>
- </image>
- <image>
- <name>${image.name}</name>
- <run>
- <ports>
- <port>${dubbo.port.1}:${dubbo.port.1}</port>
- </ports>
- <wait>
- <log>dubbo service started</log>
- </wait>
- <env>
- <dubbo.port>${dubbo.port.1}</dubbo.port>
- </env>
- </run>
- </image>
- <image>
- <name>${image.name}</name>
- <run>
- <ports>
- <port>${dubbo.port.2}:${dubbo.port.2}</port>
- </ports>
- <wait>
- <log>dubbo service started</log>
- </wait>
- <env>
- <dubbo.port>${dubbo.port.2}</dubbo.port>
- </env>
- </run>
- </image>
- </images>
- </configuration>
- <executions>
- <execution>
- <id>start</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- </execution>
- <execution>
- <id>stop</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</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>
- </build>
- </profile>
<!-- For jdk 11 above JavaEE annotation -->
<profile>
<id>javax.annotation</id>
diff --git a/dubbo-samples-governance/dubbo-samples-servicelevel-override/pom.xml b/dubbo-samples-governance/dubbo-samples-servicelevel-override/pom.xml
index d9903e5..fc9dc57 100644
--- a/dubbo-samples-governance/dubbo-samples-servicelevel-override/pom.xml
+++ b/dubbo-samples-governance/dubbo-samples-servicelevel-override/pom.xml
@@ -34,168 +34,68 @@
<dubbo.version>2.7.7</dubbo.version>
<spring.version>4.3.16.RELEASE</spring.version>
<junit.version>4.12</junit.version>
- <docker-maven-plugin.version>0.30.0</docker-maven-plugin.version>
- <jib-maven-plugin.version>1.2.0</jib-maven-plugin.version>
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
- <maven-failsafe-plugin.version>2.21.0</maven-failsafe-plugin.version>
- <image.name>${project.artifactId}:${dubbo.version}</image.name>
- <java-image.name>openjdk:8</java-image.name>
- <dubbo.port>20880</dubbo.port>
- <zookeeper.port>2181</zookeeper.port>
- <main-class>org.apache.dubbo.samples.governance.BasicProvider</main-class>
</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>
+ <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-dependencies-zookeeper</artifactId>
+ <version>${dubbo.version}</version>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
<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>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>
<profiles>
- <profile>
- <id>dubbo-integration-test</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-maven-address-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <executions>
- <execution>
- <goals>
- <goal>local-address</goal>
- </goals>
- <configuration>
- <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>${java-image.name}</image>
- </from>
- <to>
- <image>${image.name}</image>
- </to>
- <container>
- <mainClass>${main-class}</mainClass>
- <environment>
- <DUBBO_IP_TO_REGISTRY>${dubbo-local-address}</DUBBO_IP_TO_REGISTRY>
- </environment>
- <jvmFlags>
- <jvmFlag>-Dzookeeper.address=${dubbo-local-address}</jvmFlag>
- </jvmFlags>
- </container>
- </configuration>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>dockerBuild</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>${docker-maven-plugin.version}</version>
- <configuration>
- <images>
- <image>
- <name>zookeeper:latest</name>
- <run>
- <ports>
- <port>${zookeeper.port}:${zookeeper.port}</port>
- </ports>
- </run>
- </image>
- <image>
- <name>${image.name}</name>
- <run>
- <ports>
- <port>${dubbo.port}:${dubbo.port}</port>
- </ports>
- <wait>
- <log>dubbo service started</log>
- </wait>
- </run>
- </image>
- </images>
- </configuration>
- <executions>
- <execution>
- <id>start</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- </execution>
- <execution>
- <id>stop</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</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>
- </build>
- </profile>
<!-- For jdk 11 above JavaEE annotation -->
<profile>
<id>javax.annotation</id>
diff --git a/dubbo-samples-governance/dubbo-samples-tagrouter/case-configuration.yml b/dubbo-samples-governance/dubbo-samples-tagrouter/case-configuration.yml
new file mode 100644
index 0000000..c251a4c
--- /dev/null
+++ b/dubbo-samples-governance/dubbo-samples-tagrouter/case-configuration.yml
@@ -0,0 +1,62 @@
+# 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.
+
+services:
+ zookeeper:
+ image: zookeeper:latest
+
+ dubbo-samples-tagrouter1:
+ type: app
+ basedir: .
+ mainClass: org.apache.dubbo.samples.governance.BasicProvider
+ systemProps:
+ - zookeeper.address=zookeeper
+ - zookeeper.port=2181
+ - dubbo.port=20880
+ waitPortsBeforeRun:
+ - zookeeper:2181
+ depends_on:
+ - zookeeper
+
+ dubbo-samples-tagrouter2:
+ type: app
+ basedir: .
+ mainClass: org.apache.dubbo.samples.governance.BasicProvider
+ systemProps:
+ - zookeeper.address=zookeeper
+ - zookeeper.port=2181
+ - dubbo.port=20881
+ waitPortsBeforeRun:
+ - zookeeper:2181
+ depends_on:
+ - zookeeper
+
+ dubbo-samples-tagrouter-test:
+ type: test
+ basedir: .
+ tests:
+ - "**/*IT.class"
+ systemProps:
+ - zookeeper.address=zookeeper
+ - zookeeper.port=2181
+ waitPortsBeforeRun:
+ - zookeeper:2181
+ - dubbo-samples-tagrouter1:20880
+ - dubbo-samples-tagrouter2:20881
+ depends_on:
+ - zookeeper
+ - dubbo-samples-tagrouter1
+ - dubbo-samples-tagrouter2
diff --git a/dubbo-samples-governance/dubbo-samples-tagrouter/pom.xml b/dubbo-samples-governance/dubbo-samples-tagrouter/pom.xml
index 2349361..d7b6ee0 100644
--- a/dubbo-samples-governance/dubbo-samples-tagrouter/pom.xml
+++ b/dubbo-samples-governance/dubbo-samples-tagrouter/pom.xml
@@ -33,186 +33,68 @@
<dubbo.version>2.7.7</dubbo.version>
<spring.version>4.3.16.RELEASE</spring.version>
<junit.version>4.12</junit.version>
- <docker-maven-plugin.version>0.30.0</docker-maven-plugin.version>
- <jib-maven-plugin.version>1.2.0</jib-maven-plugin.version>
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
- <maven-failsafe-plugin.version>2.21.0</maven-failsafe-plugin.version>
- <image.name>${project.artifactId}:${dubbo.version}</image.name>
- <java-image.name>openjdk:8</java-image.name>
- <dubbo.port.1>20880</dubbo.port.1>
- <dubbo.port.2>20881</dubbo.port.2>
- <zookeeper.port>2181</zookeeper.port>
- <main-class>org.apache.dubbo.samples.governance.BasicProvider</main-class>
</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>
+ <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-dependencies-zookeeper</artifactId>
+ <version>${dubbo.version}</version>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
<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>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>
<profiles>
- <profile>
- <id>dubbo-integration-test</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.dubbo</groupId>
- <artifactId>dubbo-maven-address-plugin</artifactId>
- <version>1.0-SNAPSHOT</version>
- <executions>
- <execution>
- <goals>
- <goal>local-address</goal>
- </goals>
- <configuration>
- <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>${java-image.name}</image>
- </from>
- <to>
- <image>${image.name}</image>
- </to>
- <container>
- <mainClass>${main-class}</mainClass>
- <environment>
- <DUBBO_IP_TO_REGISTRY>${dubbo-local-address}</DUBBO_IP_TO_REGISTRY>
- </environment>
- <jvmFlags>
- <jvmFlag>-Dzookeeper.address=${dubbo-local-address}</jvmFlag>
- </jvmFlags>
- </container>
- </configuration>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>dockerBuild</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>io.fabric8</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>${docker-maven-plugin.version}</version>
- <configuration>
- <images>
- <image>
- <name>zookeeper:latest</name>
- <run>
- <ports>
- <port>${zookeeper.port}:${zookeeper.port}</port>
- </ports>
- </run>
- </image>
- <image>
- <name>${image.name}</name>
- <run>
- <ports>
- <port>${dubbo.port.1}:${dubbo.port.1}</port>
- </ports>
- <wait>
- <log>dubbo service started</log>
- </wait>
- <env>
- <dubbo.port>${dubbo.port.1}</dubbo.port>
- </env>
- </run>
- </image>
- <image>
- <name>${image.name}</name>
- <run>
- <ports>
- <port>${dubbo.port.2}:${dubbo.port.2}</port>
- </ports>
- <wait>
- <log>dubbo service started</log>
- </wait>
- <env>
- <dubbo.port>${dubbo.port.2}</dubbo.port>
- </env>
- </run>
- </image>
- </images>
- </configuration>
- <executions>
- <execution>
- <id>start</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- </execution>
- <execution>
- <id>stop</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</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>
- </build>
- </profile>
<!-- For jdk 11 above JavaEE annotation -->
<profile>
<id>javax.annotation</id>