You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2020/06/08 01:15:15 UTC
[servicecomb-java-chassis] 02/03: [SCB-1989] Set up modules for
demo zeroconfig&schemadiscovery registries
This is an automated email from the ASF dual-hosted git repository.
liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git
commit 4f1385944124ed5f1198972802a620030480b87e
Author: Jun Gan <ju...@gmail.com>
AuthorDate: Thu Jun 4 21:29:01 2020 -0400
[SCB-1989] Set up modules for demo zeroconfig&schemadiscovery registries
---
.../pom.xml | 80 ++++++++++++++++++++
.../pom.xml | 88 ++++++++++++++++++++++
.../src/main/resources/application.yml | 29 +++++++
.../src/main/resources/logback.xml | 50 ++++++++++++
.../pom.xml | 54 +++++++++++++
demo/pom.xml | 1 +
6 files changed, 302 insertions(+)
diff --git a/demo/demo-zeroconfig-schemadiscovery-registry/demo-zeroconfig-schemadiscovery-registry-client/pom.xml b/demo/demo-zeroconfig-schemadiscovery-registry/demo-zeroconfig-schemadiscovery-registry-client/pom.xml
new file mode 100644
index 0000000..0f64a0f
--- /dev/null
+++ b/demo/demo-zeroconfig-schemadiscovery-registry/demo-zeroconfig-schemadiscovery-registry-client/pom.xml
@@ -0,0 +1,80 @@
+<?xml version="1.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.
+ -->
+
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>demo-zeroconfig-schemadiscovery-registry-client</artifactId>
+ <name>Java Chassis::Demo::ZeroConfig-SchemaDiscovery Registry Client</name>
+ <parent>
+ <groupId>org.apache.servicecomb.demo</groupId>
+ <artifactId>demo-zeroconfig-schemadiscovery-registry</artifactId>
+ <version>2.1.0-SNAPSHOT</version>
+ </parent>
+
+ <properties>
+ <demo.main>org.apache.servicecomb.demo.zeroconfig.Application</demo.main>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.servicecomb</groupId>
+ <artifactId>java-chassis-spring-boot-starter-servlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.servicecomb.demo</groupId>
+ <artifactId>demo-schema</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.github.odavid.maven.plugins</groupId>
+ <artifactId>mixin-maven-plugin</artifactId>
+ <configuration>
+ <mixins>
+ <mixin>
+ <groupId>org.apache.servicecomb.demo</groupId>
+ <artifactId>docker-run-config</artifactId>
+ <version>${project.version}</version>
+ </mixin>
+ </mixins>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>docker</id>
+ <properties>
+ <demo.service.name>demo-multi-registries-server</demo.service.name>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
+
+
diff --git a/demo/demo-zeroconfig-schemadiscovery-registry/demo-zeroconfig-schemadiscovery-registry-server/pom.xml b/demo/demo-zeroconfig-schemadiscovery-registry/demo-zeroconfig-schemadiscovery-registry-server/pom.xml
new file mode 100644
index 0000000..7edb45c
--- /dev/null
+++ b/demo/demo-zeroconfig-schemadiscovery-registry/demo-zeroconfig-schemadiscovery-registry-server/pom.xml
@@ -0,0 +1,88 @@
+<?xml version="1.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.
+ -->
+
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>demo-zeroconfig-schemadiscovery-registry-server</artifactId>
+ <name>Java Chassis::Demo::ZeroConfig-SchemaDiscovery Registry Server</name>
+ <parent>
+ <groupId>org.apache.servicecomb.demo</groupId>
+ <artifactId>demo-zeroconfig-schemadiscovery-registry</artifactId>
+ <version>2.1.0-SNAPSHOT</version>
+ </parent>
+
+ <properties>
+ <demo.main>org.apache.servicecomb.demo.zeroconfig.ServerApplication</demo.main>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>javax.ws.rs-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.servicecomb</groupId>
+ <artifactId>java-chassis-spring-boot-starter-servlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.servicecomb.demo</groupId>
+ <artifactId>demo-schema</artifactId>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>com.github.odavid.maven.plugins</groupId>
+ <artifactId>mixin-maven-plugin</artifactId>
+ <configuration>
+ <mixins>
+ <mixin>
+ <groupId>org.apache.servicecomb.demo</groupId>
+ <artifactId>docker-build-config</artifactId>
+ <version>${project.version}</version>
+ </mixin>
+ </mixins>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>docker</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.commonjava.maven.plugins</groupId>
+ <artifactId>directory-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
\ No newline at end of file
diff --git a/demo/demo-zeroconfig-schemadiscovery-registry/demo-zeroconfig-schemadiscovery-registry-server/src/main/resources/application.yml b/demo/demo-zeroconfig-schemadiscovery-registry/demo-zeroconfig-schemadiscovery-registry-server/src/main/resources/application.yml
new file mode 100644
index 0000000..99e7de1
--- /dev/null
+++ b/demo/demo-zeroconfig-schemadiscovery-registry/demo-zeroconfig-schemadiscovery-registry-server/src/main/resources/application.yml
@@ -0,0 +1,29 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+server:
+ port: 8080
+
+# java-chassis configurations
+
+APPLICATION_ID: demo-zeroconfig-schemadiscovery-registry
+service_description:
+ name: demo-zeroconfig-schemadiscovery-registry-server
+ version: 0.0.2
+servicecomb:
+ rest:
+ address: 0.0.0.0:8080
\ No newline at end of file
diff --git a/demo/demo-zeroconfig-schemadiscovery-registry/demo-zeroconfig-schemadiscovery-registry-server/src/main/resources/logback.xml b/demo/demo-zeroconfig-schemadiscovery-registry/demo-zeroconfig-schemadiscovery-registry-server/src/main/resources/logback.xml
new file mode 100644
index 0000000..0d627f2
--- /dev/null
+++ b/demo/demo-zeroconfig-schemadiscovery-registry/demo-zeroconfig-schemadiscovery-registry-server/src/main/resources/logback.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
+<configuration scan="true">
+ <appender name="STDOUT-TRACING" class="ch.qos.logback.core.ConsoleAppender">
+ <!-- If applicable, can use ch.qos.logback.classic.filter.MarkerFilter -->
+ <filter class="org.apache.servicecomb.foundation.logback.MarkerFilter">
+ <Marker>SERVICECOMB_MARKER</Marker>
+ <OnMismatch>DENY</OnMismatch>
+ <OnMatch>ACCEPT</OnMatch>
+ </filter>
+
+ <encoder>
+ <pattern>%d [%level] [%thread][%X{SERVICECOMB_TRACE_ID}] - %msg (%F:%L\)%n</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <!-- If applicable, can use ch.qos.logback.classic.filter.MarkerFilter -->
+ <filter class="org.apache.servicecomb.foundation.logback.MarkerFilter">
+ <Marker>SERVICECOMB_MARKER</Marker>
+ <OnMismatch>ACCEPT</OnMismatch>
+ <OnMatch>DENY</OnMatch>
+ </filter>
+
+ <encoder>
+ <pattern>%d [%level] [%thread] - %msg (%F:%L\)%n</pattern>
+ </encoder>
+ </appender>
+
+ <root level="info">
+ <appender-ref ref="STDOUT"/>
+ <appender-ref ref="STDOUT-TRACING"/>
+ </root>
+</configuration>
\ No newline at end of file
diff --git a/demo/demo-zeroconfig-schemadiscovery-registry/pom.xml b/demo/demo-zeroconfig-schemadiscovery-registry/pom.xml
new file mode 100644
index 0000000..ca45dc7
--- /dev/null
+++ b/demo/demo-zeroconfig-schemadiscovery-registry/pom.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ 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.
+ -->
+
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.servicecomb.demo</groupId>
+ <artifactId>demo-parent</artifactId>
+ <version>2.1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>demo-zeroconfig-schemadiscovery-registry</artifactId>
+ <name>Java Chassis::Demo::ZeroConfig-SchemaDiscovery Registry</name>
+ <packaging>pom</packaging>
+ <modules>
+ <module>demo-zeroconfig-schemadiscovery-registry-client</module>
+ <module>demo-zeroconfig-schemadiscovery-registry-server</module>
+ </modules>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.servicecomb</groupId>
+ <artifactId>java-chassis-spring-boot-starter-servlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.servicecomb</groupId>
+ <artifactId>registry-schema-discovery</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.servicecomb</groupId>
+ <artifactId>registry-zero-config</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.servicecomb</groupId>
+ <artifactId>foundation-test-scaffolding</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
diff --git a/demo/pom.xml b/demo/pom.xml
index d5bffc6..5e8ebd5 100644
--- a/demo/pom.xml
+++ b/demo/pom.xml
@@ -43,6 +43,7 @@
<module>demo-register-url-prefix</module>
<module>demo-local-registry</module>
<module>demo-multi-registries</module>
+ <module>demo-zeroconfig-schemadiscovery-registry</module>
<module>demo-spring-boot-provider</module>
<module>demo-spring-boot-transport</module>
<module>demo-edge</module>