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 2022/10/31 11:25:26 UTC
[servicecomb-java-chassis] branch master updated (a1250a964 -> 0a62e4d4d)
This is an automated email from the ASF dual-hosted git repository.
liubao pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git
from a1250a964 Bump checkstyle from 10.3.4 to 10.4 (#3442)
new 7d2fc787b Fix IDEA import maven error
new 08c0fe89a fix random unit test fail in jdk 17
new 0a62e4d4d [SCB-2713]remove swagger html render in inspector module
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../client/common/AbstractAddressManagerTest.java | 12 ++--
demo/demo-crossapp/crossapp-client/pom.xml | 26 ++++----
demo/demo-crossapp/crossapp-server/pom.xml | 26 ++++----
demo/demo-edge/authentication/pom.xml | 26 ++++----
demo/demo-edge/business-1-1-0/pom.xml | 26 ++++----
demo/demo-edge/business-1.0.0/pom.xml | 26 ++++----
demo/demo-edge/business-2.0.0/pom.xml | 26 ++++----
demo/demo-edge/consumer/pom.xml | 40 ++++-------
demo/demo-edge/edge-service/pom.xml | 26 ++++----
demo/demo-filter/filter-client/pom.xml | 40 ++++-------
demo/demo-filter/filter-server/pom.xml | 26 ++++----
demo/demo-jaxrs/jaxrs-client/pom.xml | 40 ++++-------
demo/demo-jaxrs/jaxrs-server/pom.xml | 26 ++++----
.../demo-local-registry-client/pom.xml | 30 ++++-----
.../demo-local-registry-server/pom.xml | 26 ++++----
.../demo-multi-registries-client/pom.xml | 30 ++++-----
.../demo-multi-registries-server/pom.xml | 26 ++++----
.../demo-multi-service-center-serverA/pom.xml | 26 ++++----
.../demo-multi-service-center-serverB/pom.xml | 26 ++++----
demo/demo-multiple/multiple-client/pom.xml | 30 ++++-----
demo/demo-multiple/multiple-server/pom.xml | 27 ++++----
demo/demo-pojo/pojo-client/pom.xml | 40 ++++-------
demo/demo-pojo/pojo-server/pom.xml | 26 ++++----
.../demo-register-url-prefix-client/pom.xml | 30 ++++-----
.../demo-register-url-prefix-server/pom.xml | 26 ++++----
.../demo-spring-boot-jaxrs-client/pom.xml | 30 ++++-----
.../demo-spring-boot-jaxrs-server/pom.xml | 26 ++++----
.../demo-spring-boot-pojo-client/pom.xml | 32 ++++-----
.../demo-spring-boot-pojo-server/pom.xml | 26 ++++----
.../demo-spring-boot-springmvc-client/pom.xml | 30 ++++-----
.../demo-spring-boot-springmvc-server/pom.xml | 26 ++++----
demo/demo-springmvc/springmvc-client/pom.xml | 40 ++++-------
demo/demo-springmvc/springmvc-server/pom.xml | 26 ++++----
.../pom.xml | 26 ++++----
.../pom.xml | 26 ++++----
.../pom.xml | 26 ++++----
demo/pom.xml | 4 ++
inspector/pom.xml | 19 ------
.../inspector/internal/InspectorBootListener.java | 1 -
.../inspector/internal/InspectorConfig.java | 12 ----
.../inspector/internal/InspectorImpl.java | 78 +---------------------
.../internal/swagger/AppendStyleProcessor.java | 34 ----------
.../inspector/internal/TestInspectorImpl.java | 68 +------------------
43 files changed, 475 insertions(+), 764 deletions(-)
delete mode 100644 inspector/src/main/java/org/apache/servicecomb/inspector/internal/swagger/AppendStyleProcessor.java
[servicecomb-java-chassis] 02/03: fix random unit test fail in jdk 17
Posted by li...@apache.org.
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 08c0fe89acb4464f19d0292b9f40e2356b644472
Author: liubao <bi...@qq.com>
AuthorDate: Sun Oct 30 22:59:19 2022 +0800
fix random unit test fail in jdk 17
---
.../http/client/common/AbstractAddressManagerTest.java | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/clients/http-client-common/src/test/java/org/apache/servicecomb/http/client/common/AbstractAddressManagerTest.java b/clients/http-client-common/src/test/java/org/apache/servicecomb/http/client/common/AbstractAddressManagerTest.java
index d51083720..080e86f16 100644
--- a/clients/http-client-common/src/test/java/org/apache/servicecomb/http/client/common/AbstractAddressManagerTest.java
+++ b/clients/http-client-common/src/test/java/org/apache/servicecomb/http/client/common/AbstractAddressManagerTest.java
@@ -33,7 +33,6 @@ import org.junit.jupiter.api.Test;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
-import org.mockito.Mockito;
public class AbstractAddressManagerTest {
@@ -82,7 +81,12 @@ public class AbstractAddressManagerTest {
zoneAndRegion.put("sameZone", addressAZ);
zoneAndRegion.put("sameRegion", addressRG);
RefreshEndpointEvent event = new RefreshEndpointEvent(zoneAndRegion, "TEST");
- AbstractAddressManager addressManager = Mockito.spy(new AbstractAddressManager(addresses));
+ AbstractAddressManager addressManager = new AbstractAddressManager(addresses) {
+ @Override
+ protected boolean telnetTest(String address) {
+ return true;
+ }
+ };
addressManager.refreshEndpoint(event, "TEST");
@@ -115,8 +119,6 @@ public class AbstractAddressManagerTest {
.build();
cache.put("http://127.0.0.3:30100", true);
- // mock the address telnetTest is access
- Mockito.when(addressManager.telnetTest("http://127.0.0.3:30100")).thenReturn(true);
addressManager.setAddressIsolationStatus(cache);
Cache<String, Boolean> result = addressManager.getAddressIsolationStatus();
Assertions.assertEquals(true, result.get("http://127.0.0.3:30100", () -> false));
@@ -130,7 +132,7 @@ public class AbstractAddressManagerTest {
@Test
- public void testMiltiThread() throws Exception {
+ public void testMultipleThread() throws Exception {
AbstractAddressManager addressManager = new AbstractAddressManager(addresses);
String address = "http://127.0.0.3:30100";
[servicecomb-java-chassis] 01/03: Fix IDEA import maven error
Posted by li...@apache.org.
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 7d2fc787bd37bb4d013fef53de5e79023d752c4d
Author: liubao <bi...@qq.com>
AuthorDate: Sun Oct 30 22:45:20 2022 +0800
Fix IDEA import maven error
---
demo/demo-crossapp/crossapp-client/pom.xml | 26 +++++++-------
demo/demo-crossapp/crossapp-server/pom.xml | 26 +++++++-------
demo/demo-edge/authentication/pom.xml | 26 +++++++-------
demo/demo-edge/business-1-1-0/pom.xml | 26 +++++++-------
demo/demo-edge/business-1.0.0/pom.xml | 26 +++++++-------
demo/demo-edge/business-2.0.0/pom.xml | 26 +++++++-------
demo/demo-edge/consumer/pom.xml | 40 ++++++++--------------
demo/demo-edge/edge-service/pom.xml | 26 +++++++-------
demo/demo-filter/filter-client/pom.xml | 40 ++++++++--------------
demo/demo-filter/filter-server/pom.xml | 26 +++++++-------
demo/demo-jaxrs/jaxrs-client/pom.xml | 40 ++++++++--------------
demo/demo-jaxrs/jaxrs-server/pom.xml | 26 +++++++-------
.../demo-local-registry-client/pom.xml | 30 +++++++---------
.../demo-local-registry-server/pom.xml | 26 +++++++-------
.../demo-multi-registries-client/pom.xml | 30 +++++++---------
.../demo-multi-registries-server/pom.xml | 26 +++++++-------
.../demo-multi-service-center-serverA/pom.xml | 26 +++++++-------
.../demo-multi-service-center-serverB/pom.xml | 26 +++++++-------
demo/demo-multiple/multiple-client/pom.xml | 30 +++++++---------
demo/demo-multiple/multiple-server/pom.xml | 27 +++++++--------
demo/demo-pojo/pojo-client/pom.xml | 40 ++++++++--------------
demo/demo-pojo/pojo-server/pom.xml | 26 +++++++-------
.../demo-register-url-prefix-client/pom.xml | 30 +++++++---------
.../demo-register-url-prefix-server/pom.xml | 26 +++++++-------
.../demo-spring-boot-jaxrs-client/pom.xml | 30 +++++++---------
.../demo-spring-boot-jaxrs-server/pom.xml | 26 +++++++-------
.../demo-spring-boot-pojo-client/pom.xml | 32 +++++++----------
.../demo-spring-boot-pojo-server/pom.xml | 26 +++++++-------
.../demo-spring-boot-springmvc-client/pom.xml | 30 +++++++---------
.../demo-spring-boot-springmvc-server/pom.xml | 26 +++++++-------
demo/demo-springmvc/springmvc-client/pom.xml | 40 ++++++++--------------
demo/demo-springmvc/springmvc-server/pom.xml | 26 +++++++-------
.../pom.xml | 26 +++++++-------
.../pom.xml | 26 +++++++-------
.../pom.xml | 26 +++++++-------
demo/pom.xml | 4 +++
36 files changed, 464 insertions(+), 551 deletions(-)
diff --git a/demo/demo-crossapp/crossapp-client/pom.xml b/demo/demo-crossapp/crossapp-client/pom.xml
index b1b1571db..70468e4c1 100644
--- a/demo/demo-crossapp/crossapp-client/pom.xml
+++ b/demo/demo-crossapp/crossapp-client/pom.xml
@@ -52,19 +52,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-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-run-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
</plugins>
</build>
@@ -80,6 +67,19 @@
<groupId>io.fabric8</groupId>
<artifactId>docker-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-run-config</artifactId>
+ <version>${project.version}</version>
+ </mixin>
+ </mixins>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-crossapp/crossapp-server/pom.xml b/demo/demo-crossapp/crossapp-server/pom.xml
index b72f1f396..15d04177e 100644
--- a/demo/demo-crossapp/crossapp-server/pom.xml
+++ b/demo/demo-crossapp/crossapp-server/pom.xml
@@ -48,19 +48,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-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>
@@ -77,6 +64,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-edge/authentication/pom.xml b/demo/demo-edge/authentication/pom.xml
index 10c91db75..b09764458 100644
--- a/demo/demo-edge/authentication/pom.xml
+++ b/demo/demo-edge/authentication/pom.xml
@@ -44,19 +44,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-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>
@@ -73,6 +60,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-edge/business-1-1-0/pom.xml b/demo/demo-edge/business-1-1-0/pom.xml
index ab0cddbb9..391e8821c 100644
--- a/demo/demo-edge/business-1-1-0/pom.xml
+++ b/demo/demo-edge/business-1-1-0/pom.xml
@@ -54,19 +54,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-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>
@@ -83,6 +70,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-edge/business-1.0.0/pom.xml b/demo/demo-edge/business-1.0.0/pom.xml
index 7602f565c..46ea333bb 100644
--- a/demo/demo-edge/business-1.0.0/pom.xml
+++ b/demo/demo-edge/business-1.0.0/pom.xml
@@ -56,19 +56,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-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>
@@ -85,6 +72,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-edge/business-2.0.0/pom.xml b/demo/demo-edge/business-2.0.0/pom.xml
index a27b006c6..1dab55c03 100644
--- a/demo/demo-edge/business-2.0.0/pom.xml
+++ b/demo/demo-edge/business-2.0.0/pom.xml
@@ -56,19 +56,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-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>
@@ -85,6 +72,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-edge/consumer/pom.xml b/demo/demo-edge/consumer/pom.xml
index 20b88020d..c3cf73e5d 100644
--- a/demo/demo-edge/consumer/pom.xml
+++ b/demo/demo-edge/consumer/pom.xml
@@ -58,32 +58,7 @@
<version>${project.version}</version>
</dependency>
</dependencies>
- <build>
- <plugins>
- <!-- Because other demos depend on this module, if add classpath, the depended module will fail dual to spring configuration files duplication.
- So, we remove maven-dependency-plugin to make all integration tests run. In your applications, still need to add this to make packaged jar files run.
- -->
- <!--
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-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-run-config-edge</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
- </plugins>
- </build>
+
<profiles>
<profile>
<id>docker</id>
@@ -93,6 +68,19 @@
<groupId>io.fabric8</groupId>
<artifactId>docker-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-run-config-edge</artifactId>
+ <version>${project.version}</version>
+ </mixin>
+ </mixins>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-edge/edge-service/pom.xml b/demo/demo-edge/edge-service/pom.xml
index ca137a4c9..4c322c8e9 100644
--- a/demo/demo-edge/edge-service/pom.xml
+++ b/demo/demo-edge/edge-service/pom.xml
@@ -50,19 +50,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-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>
@@ -79,6 +66,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-filter/filter-client/pom.xml b/demo/demo-filter/filter-client/pom.xml
index e4be8a675..f198d9471 100644
--- a/demo/demo-filter/filter-client/pom.xml
+++ b/demo/demo-filter/filter-client/pom.xml
@@ -46,32 +46,7 @@
<properties>
<demo.main>org.apache.servicecomb.demo.filter.FilterClient</demo.main>
</properties>
- <build>
- <plugins>
- <!-- Because other demos depend on this module, if add classpath, the depended module will fail dual to spring configuration files duplication.
- So, we remove maven-dependency-plugin to make all integration tests run. In your applications, still need to add this to make packaged jar files run.
- -->
- <!--
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-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-run-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
- </plugins>
- </build>
+
<profiles>
<profile>
<id>docker</id>
@@ -84,6 +59,19 @@
<groupId>io.fabric8</groupId>
<artifactId>docker-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-run-config</artifactId>
+ <version>${project.version}</version>
+ </mixin>
+ </mixins>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-filter/filter-server/pom.xml b/demo/demo-filter/filter-server/pom.xml
index 6a138aa60..67cc6eb0d 100644
--- a/demo/demo-filter/filter-server/pom.xml
+++ b/demo/demo-filter/filter-server/pom.xml
@@ -48,19 +48,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-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>
@@ -77,6 +64,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-jaxrs/jaxrs-client/pom.xml b/demo/demo-jaxrs/jaxrs-client/pom.xml
index 751ab8ef2..7c11eb860 100644
--- a/demo/demo-jaxrs/jaxrs-client/pom.xml
+++ b/demo/demo-jaxrs/jaxrs-client/pom.xml
@@ -61,32 +61,7 @@
<properties>
<demo.main>org.apache.servicecomb.demo.jaxrs.JaxrsClient</demo.main>
</properties>
- <build>
- <plugins>
- <!-- Because other demos depend on this module, if add classpath, the depended module will fail dual to spring configuration files duplication.
- So, we remove maven-dependency-plugin to make all integration tests run. In your applications, still need to add this to make packaged jar files run.
- -->
- <!--
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-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-run-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
- </plugins>
- </build>
+
<profiles>
<profile>
<id>docker</id>
@@ -99,6 +74,19 @@
<groupId>io.fabric8</groupId>
<artifactId>docker-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-run-config</artifactId>
+ <version>${project.version}</version>
+ </mixin>
+ </mixins>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-jaxrs/jaxrs-server/pom.xml b/demo/demo-jaxrs/jaxrs-server/pom.xml
index 67e1ab2c9..a45d3ba35 100644
--- a/demo/demo-jaxrs/jaxrs-server/pom.xml
+++ b/demo/demo-jaxrs/jaxrs-server/pom.xml
@@ -59,19 +59,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-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>
@@ -87,6 +74,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-local-registry/demo-local-registry-client/pom.xml b/demo/demo-local-registry/demo-local-registry-client/pom.xml
index 02914971d..0ba662932 100644
--- a/demo/demo-local-registry/demo-local-registry-client/pom.xml
+++ b/demo/demo-local-registry/demo-local-registry-client/pom.xml
@@ -41,23 +41,6 @@
<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-local</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
- </plugins>
- </build>
<profiles>
<profile>
@@ -71,6 +54,19 @@
<groupId>io.fabric8</groupId>
<artifactId>docker-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-run-config-local</artifactId>
+ <version>${project.version}</version>
+ </mixin>
+ </mixins>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-local-registry/demo-local-registry-server/pom.xml b/demo/demo-local-registry/demo-local-registry-server/pom.xml
index ada42a52b..9c1d187b9 100644
--- a/demo/demo-local-registry/demo-local-registry-server/pom.xml
+++ b/demo/demo-local-registry/demo-local-registry-server/pom.xml
@@ -52,19 +52,6 @@
<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>
@@ -81,6 +68,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-multi-registries/demo-multi-registries-client/pom.xml b/demo/demo-multi-registries/demo-multi-registries-client/pom.xml
index bf7fe5e42..7deefc679 100644
--- a/demo/demo-multi-registries/demo-multi-registries-client/pom.xml
+++ b/demo/demo-multi-registries/demo-multi-registries-client/pom.xml
@@ -41,23 +41,6 @@
<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>
@@ -71,6 +54,19 @@
<groupId>io.fabric8</groupId>
<artifactId>docker-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-run-config</artifactId>
+ <version>${project.version}</version>
+ </mixin>
+ </mixins>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-multi-registries/demo-multi-registries-server/pom.xml b/demo/demo-multi-registries/demo-multi-registries-server/pom.xml
index 3b1cceab8..94ad9b9c6 100644
--- a/demo/demo-multi-registries/demo-multi-registries-server/pom.xml
+++ b/demo/demo-multi-registries/demo-multi-registries-server/pom.xml
@@ -52,19 +52,6 @@
<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>
@@ -81,6 +68,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-multi-service-center/demo-multi-service-center-serverA/pom.xml b/demo/demo-multi-service-center/demo-multi-service-center-serverA/pom.xml
index bc121e442..04a387f30 100644
--- a/demo/demo-multi-service-center/demo-multi-service-center-serverA/pom.xml
+++ b/demo/demo-multi-service-center/demo-multi-service-center-serverA/pom.xml
@@ -52,19 +52,6 @@
<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>
@@ -81,6 +68,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-multi-service-center/demo-multi-service-center-serverB/pom.xml b/demo/demo-multi-service-center/demo-multi-service-center-serverB/pom.xml
index 811762a74..9a6cc07fa 100644
--- a/demo/demo-multi-service-center/demo-multi-service-center-serverB/pom.xml
+++ b/demo/demo-multi-service-center/demo-multi-service-center-serverB/pom.xml
@@ -52,19 +52,6 @@
<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>
@@ -81,6 +68,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-multiple/multiple-client/pom.xml b/demo/demo-multiple/multiple-client/pom.xml
index 2a634b678..f0f482698 100644
--- a/demo/demo-multiple/multiple-client/pom.xml
+++ b/demo/demo-multiple/multiple-client/pom.xml
@@ -40,23 +40,6 @@
<properties>
<demo.main>org.apache.servicecomb.demo.multiple.client.MultipleClient</demo.main>
</properties>
- <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>
@@ -70,6 +53,19 @@
<groupId>io.fabric8</groupId>
<artifactId>docker-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-run-config</artifactId>
+ <version>${project.version}</version>
+ </mixin>
+ </mixins>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-multiple/multiple-server/pom.xml b/demo/demo-multiple/multiple-server/pom.xml
index 4a085188f..745205cd9 100644
--- a/demo/demo-multiple/multiple-server/pom.xml
+++ b/demo/demo-multiple/multiple-server/pom.xml
@@ -46,20 +46,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-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>
@@ -76,6 +62,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-pojo/pojo-client/pom.xml b/demo/demo-pojo/pojo-client/pom.xml
index 22cfbedd2..fdbc6ff63 100644
--- a/demo/demo-pojo/pojo-client/pom.xml
+++ b/demo/demo-pojo/pojo-client/pom.xml
@@ -50,32 +50,7 @@
<properties>
<demo.main>org.apache.servicecomb.demo.pojo.client.PojoClient</demo.main>
</properties>
- <build>
- <plugins>
- <!-- Because other demos depend on this module, if add classpath, the depended module will fail dual to spring configuration files duplication.
- So, we remove maven-dependency-plugin to make all integration tests run. In your applications, still need to add this to make packaged jar files run.
- -->
- <!--
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-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-run-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
- </plugins>
- </build>
+
<profiles>
<profile>
<id>docker</id>
@@ -88,6 +63,19 @@
<groupId>io.fabric8</groupId>
<artifactId>docker-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-run-config</artifactId>
+ <version>${project.version}</version>
+ </mixin>
+ </mixins>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-pojo/pojo-server/pom.xml b/demo/demo-pojo/pojo-server/pom.xml
index 65f1702e9..12a6a142b 100644
--- a/demo/demo-pojo/pojo-server/pom.xml
+++ b/demo/demo-pojo/pojo-server/pom.xml
@@ -47,19 +47,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-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>
@@ -75,6 +62,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-register-url-prefix/demo-register-url-prefix-client/pom.xml b/demo/demo-register-url-prefix/demo-register-url-prefix-client/pom.xml
index ca789bc1f..9590cbe18 100644
--- a/demo/demo-register-url-prefix/demo-register-url-prefix-client/pom.xml
+++ b/demo/demo-register-url-prefix/demo-register-url-prefix-client/pom.xml
@@ -41,23 +41,6 @@
<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>
@@ -71,6 +54,19 @@
<groupId>io.fabric8</groupId>
<artifactId>docker-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-run-config</artifactId>
+ <version>${project.version}</version>
+ </mixin>
+ </mixins>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-register-url-prefix/demo-register-url-prefix-server/pom.xml b/demo/demo-register-url-prefix/demo-register-url-prefix-server/pom.xml
index 288fced03..80922523e 100644
--- a/demo/demo-register-url-prefix/demo-register-url-prefix-server/pom.xml
+++ b/demo/demo-register-url-prefix/demo-register-url-prefix-server/pom.xml
@@ -56,19 +56,6 @@
<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>
@@ -85,6 +72,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-spring-boot-provider/demo-spring-boot-jaxrs-client/pom.xml b/demo/demo-spring-boot-provider/demo-spring-boot-jaxrs-client/pom.xml
index 6c3ad9079..f1fa09d32 100644
--- a/demo/demo-spring-boot-provider/demo-spring-boot-jaxrs-client/pom.xml
+++ b/demo/demo-spring-boot-provider/demo-spring-boot-jaxrs-client/pom.xml
@@ -40,23 +40,6 @@
</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>
@@ -69,6 +52,19 @@
<groupId>io.fabric8</groupId>
<artifactId>docker-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-run-config</artifactId>
+ <version>${project.version}</version>
+ </mixin>
+ </mixins>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-spring-boot-provider/demo-spring-boot-jaxrs-server/pom.xml b/demo/demo-spring-boot-provider/demo-spring-boot-jaxrs-server/pom.xml
index 597234f39..7cedad3ec 100644
--- a/demo/demo-spring-boot-provider/demo-spring-boot-jaxrs-server/pom.xml
+++ b/demo/demo-spring-boot-provider/demo-spring-boot-jaxrs-server/pom.xml
@@ -53,19 +53,6 @@
<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>
@@ -82,6 +69,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-spring-boot-transport/demo-spring-boot-pojo-client/pom.xml b/demo/demo-spring-boot-transport/demo-spring-boot-pojo-client/pom.xml
index dbc621595..24e3c4336 100644
--- a/demo/demo-spring-boot-transport/demo-spring-boot-pojo-client/pom.xml
+++ b/demo/demo-spring-boot-transport/demo-spring-boot-pojo-client/pom.xml
@@ -31,25 +31,6 @@
<properties>
<demo.main>org.apache.servicecomb.springboot.pojo.client.PojoClient</demo.main>
</properties>
- <dependencies>
- </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>
@@ -63,6 +44,19 @@
<groupId>io.fabric8</groupId>
<artifactId>docker-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-run-config</artifactId>
+ <version>${project.version}</version>
+ </mixin>
+ </mixins>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-spring-boot-transport/demo-spring-boot-pojo-server/pom.xml b/demo/demo-spring-boot-transport/demo-spring-boot-pojo-server/pom.xml
index ad18721e4..41275da5c 100644
--- a/demo/demo-spring-boot-transport/demo-spring-boot-pojo-server/pom.xml
+++ b/demo/demo-spring-boot-transport/demo-spring-boot-pojo-server/pom.xml
@@ -48,19 +48,6 @@
<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>
@@ -77,6 +64,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-spring-boot-transport/demo-spring-boot-springmvc-client/pom.xml b/demo/demo-spring-boot-transport/demo-spring-boot-springmvc-client/pom.xml
index d439eab42..59abc304e 100644
--- a/demo/demo-spring-boot-transport/demo-spring-boot-springmvc-client/pom.xml
+++ b/demo/demo-spring-boot-transport/demo-spring-boot-springmvc-client/pom.xml
@@ -45,23 +45,6 @@
</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>
@@ -74,6 +57,19 @@
<groupId>io.fabric8</groupId>
<artifactId>docker-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-run-config</artifactId>
+ <version>${project.version}</version>
+ </mixin>
+ </mixins>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-spring-boot-transport/demo-spring-boot-springmvc-server/pom.xml b/demo/demo-spring-boot-transport/demo-spring-boot-springmvc-server/pom.xml
index 05399a1b8..ef353e7c8 100644
--- a/demo/demo-spring-boot-transport/demo-spring-boot-springmvc-server/pom.xml
+++ b/demo/demo-spring-boot-transport/demo-spring-boot-springmvc-server/pom.xml
@@ -50,19 +50,6 @@
<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>
@@ -79,6 +66,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-springmvc/springmvc-client/pom.xml b/demo/demo-springmvc/springmvc-client/pom.xml
index 21c3380dd..c76fe03f8 100644
--- a/demo/demo-springmvc/springmvc-client/pom.xml
+++ b/demo/demo-springmvc/springmvc-client/pom.xml
@@ -63,32 +63,7 @@
<properties>
<demo.main>org.apache.servicecomb.demo.springmvc.SpringmvcClient</demo.main>
</properties>
- <build>
- <plugins>
- <!-- Because other demos depend on this module, if add classpath, the depended module will fail dual to spring configuration files duplication.
- So, we remove maven-dependency-plugin to make all integration tests run. In your applications, still need to add this to make packaged jar files run.
- -->
- <!--
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-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-run-config</artifactId>
- <version>${project.version}</version>
- </mixin>
- </mixins>
- </configuration>
- </plugin>
- </plugins>
- </build>
+
<profiles>
<profile>
<id>docker</id>
@@ -101,6 +76,19 @@
<groupId>io.fabric8</groupId>
<artifactId>docker-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-run-config</artifactId>
+ <version>${project.version}</version>
+ </mixin>
+ </mixins>
+ </configuration>
+ </plugin>
</plugins>
</build>
</profile>
diff --git a/demo/demo-springmvc/springmvc-server/pom.xml b/demo/demo-springmvc/springmvc-server/pom.xml
index f67b5eb02..429bd3034 100644
--- a/demo/demo-springmvc/springmvc-server/pom.xml
+++ b/demo/demo-springmvc/springmvc-server/pom.xml
@@ -68,19 +68,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-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>
@@ -97,6 +84,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
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
index 3c246f235..e74e360c1 100644
--- 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
@@ -67,19 +67,6 @@
<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>
@@ -96,6 +83,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/demo-zeroconfig-schemadiscovery-registry/demo-zeroconfig-schemadiscovery-registry-edge/pom.xml b/demo/demo-zeroconfig-schemadiscovery-registry/demo-zeroconfig-schemadiscovery-registry-edge/pom.xml
index fbc5e27ab..af6841b72 100644
--- a/demo/demo-zeroconfig-schemadiscovery-registry/demo-zeroconfig-schemadiscovery-registry-edge/pom.xml
+++ b/demo/demo-zeroconfig-schemadiscovery-registry/demo-zeroconfig-schemadiscovery-registry-edge/pom.xml
@@ -64,19 +64,6 @@
<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>
@@ -93,6 +80,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
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
index cb1669e60..7c368d7b6 100644
--- 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
@@ -64,19 +64,6 @@
<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>
@@ -93,6 +80,19 @@
<groupId>org.commonjava.maven.plugins</groupId>
<artifactId>directory-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>
</profile>
diff --git a/demo/pom.xml b/demo/pom.xml
index 484133987..fb6c12c2e 100644
--- a/demo/pom.xml
+++ b/demo/pom.xml
@@ -29,6 +29,10 @@
<artifactId>demo-parent</artifactId>
<name>Java Chassis::Demo</name>
+ <properties>
+ <demo.main></demo.main>
+ </properties>
+
<packaging>pom</packaging>
<modules>
<module>docker-build-config</module>
[servicecomb-java-chassis] 03/03: [SCB-2713]remove swagger html render in inspector module
Posted by li...@apache.org.
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 0a62e4d4dbbf403bd86cf59b765050253f4c45b1
Author: liubao <bi...@qq.com>
AuthorDate: Mon Oct 31 16:42:10 2022 +0800
[SCB-2713]remove swagger html render in inspector module
---
inspector/pom.xml | 19 ------
.../inspector/internal/InspectorBootListener.java | 1 -
.../inspector/internal/InspectorConfig.java | 12 ----
.../inspector/internal/InspectorImpl.java | 78 +---------------------
.../internal/swagger/AppendStyleProcessor.java | 34 ----------
.../inspector/internal/TestInspectorImpl.java | 68 +------------------
6 files changed, 4 insertions(+), 208 deletions(-)
diff --git a/inspector/pom.xml b/inspector/pom.xml
index f29c64bb3..2533cebc8 100644
--- a/inspector/pom.xml
+++ b/inspector/pom.xml
@@ -30,17 +30,6 @@
<artifactId>inspector</artifactId>
<name>Java Chassis::Inspector</name>
- <repositories>
- <repository>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- <id>jcenter-releases</id>
- <name>jcenter</name>
- <url>https://jcenter.bintray.com</url>
- </repository>
- </repositories>
-
<dependencies>
<dependency>
<groupId>org.apache.servicecomb</groupId>
@@ -50,14 +39,6 @@
<groupId>org.apache.servicecomb</groupId>
<artifactId>provider-jaxrs</artifactId>
</dependency>
- <dependency>
- <groupId>org.asciidoctor</groupId>
- <artifactId>asciidoctorj</artifactId>
- </dependency>
- <dependency>
- <groupId>io.github.swagger2markup</groupId>
- <artifactId>swagger2markup</artifactId>
- </dependency>
<dependency>
<groupId>org.apache.servicecomb</groupId>
<artifactId>registry-local</artifactId>
diff --git a/inspector/src/main/java/org/apache/servicecomb/inspector/internal/InspectorBootListener.java b/inspector/src/main/java/org/apache/servicecomb/inspector/internal/InspectorBootListener.java
index 7bd08a661..71d906b01 100644
--- a/inspector/src/main/java/org/apache/servicecomb/inspector/internal/InspectorBootListener.java
+++ b/inspector/src/main/java/org/apache/servicecomb/inspector/internal/InspectorBootListener.java
@@ -51,7 +51,6 @@ public class InspectorBootListener implements BootListener {
// will not register this schemas to service registry
InspectorImpl inspector = new InspectorImpl()
- .setInspectorConfig(inspectorConfig)
.setPropertyFactory(propertyFactory)
.setSchemas(RegistrationManager.INSTANCE.getMicroservice().getSchemaMap())
.correctBasePathForOnlineTest(event.getScbEngine());
diff --git a/inspector/src/main/java/org/apache/servicecomb/inspector/internal/InspectorConfig.java b/inspector/src/main/java/org/apache/servicecomb/inspector/internal/InspectorConfig.java
index 2103608d7..28f28ddb6 100644
--- a/inspector/src/main/java/org/apache/servicecomb/inspector/internal/InspectorConfig.java
+++ b/inspector/src/main/java/org/apache/servicecomb/inspector/internal/InspectorConfig.java
@@ -26,9 +26,6 @@ public class InspectorConfig {
@InjectProperty(keys = "enabled", defaultValue = "true")
private boolean enabled;
- @InjectProperty(keys = "swagger.html.asciidoctorCss", defaultValue = "https://cdnjs.cloudflare.com/ajax/libs/asciidoctor.js/1.5.9/css/asciidoctor.css")
- private String asciidoctorCss;
-
public boolean isEnabled() {
return enabled;
}
@@ -37,13 +34,4 @@ public class InspectorConfig {
this.enabled = enabled;
return this;
}
-
- public String getAsciidoctorCss() {
- return asciidoctorCss;
- }
-
- public InspectorConfig setAsciidoctorCss(String asciidoctorCss) {
- this.asciidoctorCss = asciidoctorCss;
- return this;
- }
}
diff --git a/inspector/src/main/java/org/apache/servicecomb/inspector/internal/InspectorImpl.java b/inspector/src/main/java/org/apache/servicecomb/inspector/internal/InspectorImpl.java
index 6fdb6de80..88581c405 100644
--- a/inspector/src/main/java/org/apache/servicecomb/inspector/internal/InspectorImpl.java
+++ b/inspector/src/main/java/org/apache/servicecomb/inspector/internal/InspectorImpl.java
@@ -42,7 +42,6 @@ import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response.Status;
-import com.google.common.annotations.VisibleForTesting;
import org.apache.commons.lang3.StringUtils;
import org.apache.servicecomb.common.rest.resource.ClassPathStaticResourceHandler;
import org.apache.servicecomb.common.rest.resource.StaticResourceHandler;
@@ -56,32 +55,20 @@ import org.apache.servicecomb.foundation.common.part.InputStreamPart;
import org.apache.servicecomb.foundation.common.utils.ClassLoaderScopeContext;
import org.apache.servicecomb.inspector.internal.model.DynamicPropertyView;
import org.apache.servicecomb.inspector.internal.model.PriorityPropertyView;
-import org.apache.servicecomb.inspector.internal.swagger.AppendStyleProcessor;
import org.apache.servicecomb.inspector.internal.swagger.SchemaFormat;
import org.apache.servicecomb.registry.RegistrationManager;
import org.apache.servicecomb.registry.definition.DefinitionConst;
import org.apache.servicecomb.swagger.SwaggerUtils;
import org.apache.servicecomb.swagger.invocation.Response;
import org.apache.servicecomb.swagger.invocation.exception.InvocationException;
-import org.asciidoctor.Asciidoctor;
-import org.asciidoctor.Asciidoctor.Factory;
-import org.asciidoctor.Attributes;
-import org.asciidoctor.Options;
-import org.asciidoctor.OptionsBuilder;
-import org.asciidoctor.SafeMode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.collect.Ordering;
+import com.google.common.annotations.VisibleForTesting;
import com.netflix.config.DynamicProperty;
-import io.github.swagger2markup.Swagger2MarkupConfig;
-import io.github.swagger2markup.Swagger2MarkupConverter;
-import io.github.swagger2markup.Swagger2MarkupConverter.Builder;
-import io.github.swagger2markup.builder.Swagger2MarkupConfigBuilder;
import io.swagger.annotations.ApiResponse;
import io.swagger.models.Swagger;
-import io.swagger.models.parameters.Parameter;
@Path("/inspector")
public class InspectorImpl {
@@ -91,19 +78,10 @@ public class InspectorImpl {
private final StaticResourceHandler resourceHandler = new ClassPathStaticResourceHandler();
- private InspectorConfig inspectorConfig;
-
private Map<String, String> schemas;
private PriorityPropertyFactory propertyFactory;
- private volatile Asciidoctor asciidoctor;
-
- public InspectorImpl setInspectorConfig(InspectorConfig inspectorConfig) {
- this.inspectorConfig = inspectorConfig;
- return this;
- }
-
public InspectorImpl setPropertyFactory(PriorityPropertyFactory propertyFactory) {
this.propertyFactory = propertyFactory;
return this;
@@ -172,9 +150,6 @@ public class InspectorImpl {
zos.putNextEntry(new ZipEntry(entry.getKey() + format.getSuffix()));
String content = entry.getValue();
- if (SchemaFormat.HTML.equals(format)) {
- content = swaggerToHtml(content);
- }
zos.write(content.getBytes(StandardCharsets.UTF_8));
zos.closeEntry();
}
@@ -204,13 +179,7 @@ public class InspectorImpl {
format = SchemaFormat.SWAGGER;
}
- byte[] bytes;
- if (SchemaFormat.HTML.equals(format)) {
- String html = swaggerToHtml(swaggerContent);
- bytes = html.getBytes(StandardCharsets.UTF_8);
- } else {
- bytes = swaggerContent.getBytes(StandardCharsets.UTF_8);
- }
+ byte[] bytes = swaggerContent.getBytes(StandardCharsets.UTF_8);
Part part = new InputStreamPart(null, new ByteArrayInputStream(bytes))
.setSubmittedFileName(schemaId + format.getSuffix());
@@ -223,49 +192,6 @@ public class InspectorImpl {
return response;
}
- // swagger not support cookie parameter
- // so if swaggerContent contains cookie parameter, will cause problem.
- private String swaggerToHtml(String swaggerContent) {
- if (asciidoctor == null) {
- synchronized (this) {
- if (asciidoctor == null) {
- // very slow, need a few seconds
- LOGGER.info("create AsciiDoctor start.");
- asciidoctor = Factory.create();
- asciidoctor.javaExtensionRegistry().docinfoProcessor(AppendStyleProcessor.class);
- LOGGER.info("create AsciiDoctor end.");
- }
- }
- }
-
- // swagger to markup
- Builder markupBuilder = Swagger2MarkupConverter.from(SwaggerUtils.parseSwagger(swaggerContent));
- // default not support cookie parameter
- // so must customize config
- Swagger2MarkupConfig markupConfig = new Swagger2MarkupConfigBuilder()
- .withParameterOrdering(Ordering
- .explicit("path", "query", "header", "cookie", "formData", "body")
- .onResultOf(Parameter::getIn))
- .build();
- String markup = markupBuilder.withConfig(markupConfig).build().toString();
-
- // markup to html
- OptionsBuilder builder = Options.builder();
- builder.docType("book")
- .backend("html5")
- .headerFooter(true)
- .safe(SafeMode.UNSAFE)
- .attributes(Attributes.builder()
- .attribute("toclevels", 3)
- .attribute(Attributes.TOC_2, true)
- .attribute(Attributes.TOC_POSITION, "left")
- .attribute(Attributes.LINK_CSS, true)
- .attribute(Attributes.STYLESHEET_NAME, inspectorConfig.getAsciidoctorCss())
- .attribute(Attributes.SECTION_NUMBERS, true)
- .attribute(Attributes.SECT_NUM_LEVELS, 4).build());
- return asciidoctor.convert(markup, builder.build());
- }
-
@Path("/{path : .+}")
@GET
@ApiResponse(code = 200, message = "", response = File.class)
diff --git a/inspector/src/main/java/org/apache/servicecomb/inspector/internal/swagger/AppendStyleProcessor.java b/inspector/src/main/java/org/apache/servicecomb/inspector/internal/swagger/AppendStyleProcessor.java
deleted file mode 100644
index cd1aa6f23..000000000
--- a/inspector/src/main/java/org/apache/servicecomb/inspector/internal/swagger/AppendStyleProcessor.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.servicecomb.inspector.internal.swagger;
-
-import org.asciidoctor.ast.Document;
-import org.asciidoctor.extension.DocinfoProcessor;
-import org.asciidoctor.extension.Location;
-import org.asciidoctor.extension.LocationType;
-
-@Location(LocationType.HEADER)
-public class AppendStyleProcessor extends DocinfoProcessor {
- @Override
- public String process(Document document) {
- return "<style>\n"
- + "html,body{height:100%;overflow-y:scroll;}"
- + "#header>h1 {overflow: hidden;font-size: 1.75em}\n"
- + "#header,#content,#footnotes,#footer{max-width: 90%}\n"
- + "</style>";
- }
-}
diff --git a/inspector/src/test/java/org/apache/servicecomb/inspector/internal/TestInspectorImpl.java b/inspector/src/test/java/org/apache/servicecomb/inspector/internal/TestInspectorImpl.java
index 4875d8dd9..c08c9f52b 100644
--- a/inspector/src/test/java/org/apache/servicecomb/inspector/internal/TestInspectorImpl.java
+++ b/inspector/src/test/java/org/apache/servicecomb/inspector/internal/TestInspectorImpl.java
@@ -57,9 +57,6 @@ import org.apache.servicecomb.swagger.invocation.exception.InvocationException;
import org.apache.servicecomb.transport.rest.servlet.ServletRestTransport;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
-
-import com.netflix.config.DynamicProperty;
-
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
@@ -68,6 +65,8 @@ import org.junit.jupiter.api.condition.EnabledForJreRange;
import org.junit.jupiter.api.condition.JRE;
import org.mockito.Mockito;
+import com.netflix.config.DynamicProperty;
+
public class TestInspectorImpl {
static Map<String, String> schemas = new LinkedHashMap<>();
@@ -99,7 +98,6 @@ public class TestInspectorImpl {
scbEngine.run();
InspectorImpl inspector = new InspectorImpl()
- .setInspectorConfig(scbEngine.getPriorityPropertyManager().createConfigObject(InspectorConfig.class))
.setSchemas(schemas);
inspector.correctBasePathForOnlineTest(scbEngine);
return inspector;
@@ -162,27 +160,6 @@ public class TestInspectorImpl {
}
}
- @Test
- public void downloadSchemas_html() throws IOException {
- Microservice microservice = Mockito.mock(Microservice.class);
- RegistrationManager spy = Mockito.spy(RegistrationManager.INSTANCE);
- RegistrationManager.setINSTANCE(spy);
- Mockito.when(spy.getMicroservice()).thenReturn(microservice);
- Mockito.when(microservice.getServiceName()).thenReturn("ms");
-
- Response response = inspector.downloadSchemas(SchemaFormat.HTML);
- Part part = response.getResult();
- Assertions.assertEquals("ms.html.zip", part.getSubmittedFileName());
-
- try (InputStream is = part.getInputStream()) {
- Map<String, String> unziped = unzip(is);
-
- Assertions.assertEquals(schemas.size(), unziped.size());
- Assertions.assertTrue(unziped.get("schema1.html").endsWith("</html>"));
- Assertions.assertTrue(unziped.get("schema2.html").endsWith("</html>"));
- }
- }
-
@Test
@EnabledForJreRange(min = JRE.JAVA_9)
public void downloadSchemas_failed() {
@@ -258,45 +235,6 @@ public class TestInspectorImpl {
}
}
- // create AsciiDoctor, cost seconds
- @Test
- public void getSchemaContentById_view_html() throws IOException {
- testViewHtmlById("schema1");
- testViewHtmlById("schema2");
- }
-
- private void testViewHtmlById(String schemaId) throws IOException {
- Response response = inspector.getSchemaContentById(schemaId, SchemaFormat.HTML, false);
-
- Part part = response.getResult();
- Assertions.assertEquals(schemaId + ".html", part.getSubmittedFileName());
- Assertions.assertEquals("inline", response.getHeader(HttpHeaders.CONTENT_DISPOSITION));
- Assertions.assertEquals(MediaType.TEXT_HTML, response.getHeader(HttpHeaders.CONTENT_TYPE));
-
- try (InputStream is = part.getInputStream()) {
- Assertions.assertTrue(IOUtils.toString(is, StandardCharsets.UTF_8).endsWith("</html>"));
- }
- }
-
- @Test
- public void getSchemaContentById_download_html() throws IOException {
- testDownloadHtmlById("schema1");
- testDownloadHtmlById("schema2");
- }
-
- private void testDownloadHtmlById(String schemaId) throws IOException {
- Response response = inspector.getSchemaContentById(schemaId, SchemaFormat.HTML, true);
-
- Part part = response.getResult();
- Assertions.assertEquals(schemaId + ".html", part.getSubmittedFileName());
- Assertions.assertNull(response.getHeader(HttpHeaders.CONTENT_DISPOSITION));
- Assertions.assertEquals(MediaType.TEXT_HTML, response.getHeader(HttpHeaders.CONTENT_TYPE));
-
- try (InputStream is = part.getInputStream()) {
- Assertions.assertTrue(IOUtils.toString(is, StandardCharsets.UTF_8).endsWith("</html>"));
- }
- }
-
@Test
public void getStaticResource_notExist() throws IOException {
Response response = inspector.getStaticResource("notExist");
@@ -334,8 +272,6 @@ public class TestInspectorImpl {
.collect(Collectors.toMap(DynamicPropertyView::getKey, Function.identity()));
Assertions.assertEquals(1, viewMap.get("yyy").getCallbackCount());
Assertions.assertEquals(0, viewMap.get("zzz").getCallbackCount());
- Assertions.assertEquals(0, viewMap.get("servicecomb.inspector.enabled").getCallbackCount());
- Assertions.assertEquals(0, viewMap.get("servicecomb.inspector.swagger.html.asciidoctorCss").getCallbackCount());
int count = ConfigUtil.getAllDynamicProperties().size();
ConfigUtil.getAllDynamicProperties().remove("yyy");