[GitHub] [servicecomb-java-chassis] sunjinghan7331 commented on issue #1477: 过滤器不生效
sunjinghan7331 commented on issue #1477: 过滤器不生效 URL: https://github.com/apache/servicecomb-java-chassis/issues/1477#issuecomment-568392230 重新配置了过滤器文件,过滤器生效了,谢谢 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] sunjinghan7331 closed issue #1477: 过滤器不生效
sunjinghan7331 closed issue #1477: 过滤器不生效 URL: https://github.com/apache/servicecomb-java-chassis/issues/1477 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1477: 过滤器不生效
liubao68 commented on issue #1477: 过滤器不生效 URL: https://github.com/apache/servicecomb-java-chassis/issues/1477#issuecomment-568385769 配置正确一般日志会打印loadSortedService,然后下面有你的类的名字。没有的话,看看services文件的名称,目录名称等是不是有误,导致JDK没有加载到对应的文件。 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1476: servicecomb按照样例启动成功后,偶然会报以下错误Unexpected error in server.cause:IOException,message:Connection reset by peer
liubao68 commented on issue #1476: servicecomb按照样例启动成功后,偶然会报以下错误Unexpected error in server.cause:IOException,message:Connection reset by peer URL: https://github.com/apache/servicecomb-java-chassis/issues/1476#issuecomment-568384755 是某次业务调用的时候出现这个错误还是其他情况?有可能是某些状态检查服务,给这个服务发送一个telnet命令,马上又关闭了连接。这种情况不用管,如果是业务调用异常,需要结合实际情况详细分析,通常的原因有:1. 网络错误;2. 客户端/服务端由于内存不足、CPU忙等因素,或者某个请求处理了很长时间, 关闭了长期闲置的连接。 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-toolkit] kakulisen opened a new pull request #73: [SCB-1676] nested complex properties are not parsed and added to the …
kakulisen opened a new pull request #73: [SCB-1676] nested complex properties are not parsed and added to the … URL: https://github.com/apache/servicecomb-toolkit/pull/73 parse nested complex properties and add to the component This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-toolkit] chanjarster merged pull request #66: [SCB-1660] change deploy.sh format
chanjarster merged pull request #66: [SCB-1660] change deploy.sh format URL: https://github.com/apache/servicecomb-toolkit/pull/66 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[servicecomb-toolkit] 02/02: [SCB-1660] remove the tagged commit check
This is an automated email from the ASF dual-hosted git repository. chanjarster pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-toolkit.git commit 7ca2bdf50844382d88eba5ca6345651ced2f66a3 Author: kakulisen <18813972...@163.com> AuthorDate: Fri Dec 13 17:36:31 2019 +0800 [SCB-1660] remove the tagged commit check Signed-off-by: kakulisen <18813972...@163.com> --- scripts/deploy.sh | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 5ca8fd5..5b6e129 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -17,16 +17,9 @@ ## --- #bin/sh -TAGGEDCOMMIT=$(git tag -l --contains HEAD) -if [ "$TAGGEDCOMMIT" == "" ]; then - TAGGEDCOMMIT=false -else - TAGGEDCOMMIT=true -fi -echo "${green}[SCRIPT] TAGGEDCOMMIT=$TAGGEDCOMMIT${reset}" VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) -if [[ "$TAGGEDCOMMIT" == "true" ]] || [[ ! $VERSION =~ "SNAPSHOT" ]]; then - echo "${green}[SCRIPT] Skipping the Non-Signed Staging deploy as it is tagged commit.${reset}" +if [[ ! $VERSION =~ "SNAPSHOT" ]]; then + echo "${green}[SCRIPT] Not Snapshot Version,Skipping Deployment.${reset}" else echo "Deploy a Non-Signed Staging Release" mvn deploy -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B -DskipTests --settings .travis.settings.xml
[servicecomb-toolkit] 01/02: [SCB-1660] change deploy.sh format
This is an automated email from the ASF dual-hosted git repository. chanjarster pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-toolkit.git commit 7f67be431bc3b692f967aa93c32f25cef0daf8d6 Author: kakulisen <18813972...@163.com> AuthorDate: Thu Dec 12 09:55:23 2019 +0800 [SCB-1660] change deploy.sh format Signed-off-by: kakulisen <18813972...@163.com> --- scripts/deploy.sh | 67 --- 1 file changed, 39 insertions(+), 28 deletions(-) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index b68544c..5ca8fd5 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -1,28 +1,39 @@ -#!/usr/bin/env bash -## --- -## 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. -## --- -#bin/sh - -echo "Deploy a Non-Signed Staging Release" -mvn deploy -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B -DskipTests --settings .travis.settings.xml -if [ $? == 0 ]; then - echo "${green}Snapshot Deployment is Success, please log on to Nexus Repo to see the snapshot release..${reset}" -else - echo "${red}Snapshot deployment failed.${reset}" -fi - -echo "Deployment Completed" +#!/usr/bin/env bash +## --- +## 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. +## --- +#bin/sh + +TAGGEDCOMMIT=$(git tag -l --contains HEAD) +if [ "$TAGGEDCOMMIT" == "" ]; then + TAGGEDCOMMIT=false +else + TAGGEDCOMMIT=true +fi +echo "${green}[SCRIPT] TAGGEDCOMMIT=$TAGGEDCOMMIT${reset}" +VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) +if [[ "$TAGGEDCOMMIT" == "true" ]] || [[ ! $VERSION =~ "SNAPSHOT" ]]; then + echo "${green}[SCRIPT] Skipping the Non-Signed Staging deploy as it is tagged commit.${reset}" +else + echo "Deploy a Non-Signed Staging Release" + mvn deploy -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B -DskipTests --settings .travis.settings.xml + if [ $? == 0 ]; then +echo "${green}Snapshot Deployment is Success, please log on to Nexus Repo to see the snapshot release..${reset}" + else +echo "${red}Snapshot deployment failed.${reset}" + fi + echo "Deployment Completed" +fi
[servicecomb-toolkit] branch master updated (84f0c9d -> 7ca2bdf)
This is an automated email from the ASF dual-hosted git repository. chanjarster pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-toolkit.git. from 84f0c9d [SCB-1663] test cli.sh in travis ci and fix some bug new 7f67be4 [SCB-1660] change deploy.sh format new 7ca2bdf [SCB-1660] remove the tagged commit check The 2 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: scripts/deploy.sh | 60 +-- 1 file changed, 32 insertions(+), 28 deletions(-)
[GitHub] [servicecomb-toolkit] chanjarster merged pull request #70: [SCB-1663] add scripts
chanjarster merged pull request #70: [SCB-1663] add scripts URL: https://github.com/apache/servicecomb-toolkit/pull/70 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[servicecomb-toolkit] 04/04: [SCB-1663] test cli.sh in travis ci and fix some bug
This is an automated email from the ASF dual-hosted git repository. chanjarster pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-toolkit.git commit 84f0c9d69766ec65a9c177dd4fff8d3df95cdc13 Author: kakulisen <18813972...@163.com> AuthorDate: Mon Dec 16 11:06:24 2019 +0800 [SCB-1663] test cli.sh in travis ci and fix some bug Signed-off-by: kakulisen <18813972...@163.com> --- .travis.yml| 2 + .../servicecomb/toolkit/cli/DocGenerate.java | 22 ++-- .../servicecomb/toolkit/cli/ToolkitMain.java | 2 +- .../docgen/ContractsSwaggerUIGenerator.java| 2 +- scripts/cliTest.sh | 119 + 5 files changed, 138 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 513de34..3e27791 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,5 +38,7 @@ jobs: include: - stage: Test script: ./scripts/test.sh + - stage: Cli Test +script: ./scripts/cliTest.sh - stage: Deploy on script: if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then bash ./scripts/deploy.sh; fi diff --git a/cli/src/main/java/org/apache/servicecomb/toolkit/cli/DocGenerate.java b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/DocGenerate.java index 7426846..cb39268 100755 --- a/cli/src/main/java/org/apache/servicecomb/toolkit/cli/DocGenerate.java +++ b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/DocGenerate.java @@ -19,7 +19,6 @@ package org.apache.servicecomb.toolkit.cli; import java.io.File; import java.io.IOException; -import java.net.URI; import java.nio.file.FileVisitResult; import java.nio.file.Files; import java.nio.file.Path; @@ -29,14 +28,16 @@ import java.nio.file.attribute.BasicFileAttributes; import java.util.HashMap; import java.util.Map; -import org.apache.servicecomb.swagger.SwaggerUtils; -import org.apache.servicecomb.toolkit.GeneratorFactory; import org.apache.servicecomb.toolkit.DocGenerator; +import org.apache.servicecomb.toolkit.GeneratorFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import io.airlift.airline.Command; import io.airlift.airline.Option; +import io.swagger.parser.OpenAPIParser; +import io.swagger.v3.oas.models.OpenAPI; +import io.swagger.v3.parser.core.models.SwaggerParseResult; @Command(name = "docgenerate", description = "Generate document by OpenAPI specification file") public class DocGenerate implements Runnable { @@ -50,7 +51,7 @@ public class DocGenerate implements Runnable { @Option(name = {"-f", "--format"}, title = "document format", required = false, description = "format of document, as swagger-ui or asciidoc-html (swagger-ui by default)") - private String format = "html"; + private String format = "swagger-ui"; @Option(name = {"-o", "--output"}, title = "output directory", description = "location of the generated document (current dir by default)") @@ -73,7 +74,7 @@ public class DocGenerate implements Runnable { @Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { -docGeneratorConfig.put("contractContent", SwaggerUtils.parseSwagger(file.toUri().toURL())); +docGeneratorConfig.put("contractContent", parseOpenApi(specPath)); docGeneratorConfig.put("outputPath", output + File.separator + file.toFile().getName().substring(0, file.toFile().getName().indexOf("."))); docGenerator.configure(docGeneratorConfig); @@ -85,7 +86,7 @@ public class DocGenerate implements Runnable { } else if (Files.isRegularFile(specPath)) { fileName[0] = specPath.toFile().getName(); -docGeneratorConfig.put("contractContent", SwaggerUtils.parseSwagger(specPath.toUri().toURL())); +docGeneratorConfig.put("contractContent", parseOpenApi(specPath)); docGeneratorConfig.put("outputPath", output + File.separator + new File(specFile).getName() .substring(0, new File(specFile).getName().indexOf("."))); docGenerator.configure(docGeneratorConfig); @@ -93,7 +94,7 @@ public class DocGenerate implements Runnable { } else { fileName[0] = specFile; -docGeneratorConfig.put("contractContent", SwaggerUtils.parseSwagger(URI.create(specFile).toURL())); +docGeneratorConfig.put("contractContent", parseOpenApi(specPath)); docGeneratorConfig.put("outputPath", output + File.separator + new File(specFile).getName() .substring(0, new File(specFile).getName().indexOf("."))); docGenerator.configure(docGeneratorConfig); @@ -105,4 +106,11 @@ public class DocGenerate implements Runnable { LOGGER.error(e.getMessage()); } } + + public OpenAPI parseOpenApi(Path file) { +SwaggerParseResult swaggerParseResult = new OpenAPIParser() +.readLocation(file.toString(), null, null); +
[servicecomb-toolkit] branch master updated (9b19903 -> 84f0c9d)
This is an automated email from the ASF dual-hosted git repository. chanjarster pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-toolkit.git. from 9b19903 [SCB-1657] fix test error on windows new 11de7d9 [SCB-1663] add scripts new b5726fb fix bug of script in Mac new 0c420e6 [SCB-1663] determine script name based on system property new 84f0c9d [SCB-1663] test cli.sh in travis ci and fix some bug The 4 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: .travis.yml| 2 + README-ZH.md | 24 +++-- README.md | 21 ++-- cli/scripts/cli.cmd| 67 scripts/deploy.sh => cli/scripts/cli.sh| 78 +- .../servicecomb/toolkit/cli/DocGenerate.java | 22 ++-- .../servicecomb/toolkit/cli/ToolkitMain.java | 11 +- .../docgen/ContractsSwaggerUIGenerator.java| 2 +- scripts/cliTest.sh | 119 + toolkit-distribution/src/assembly/bin.xml | 8 ++ 10 files changed, 301 insertions(+), 53 deletions(-) create mode 100644 cli/scripts/cli.cmd copy scripts/deploy.sh => cli/scripts/cli.sh (53%) create mode 100755 scripts/cliTest.sh
[servicecomb-toolkit] 02/04: fix bug of script in Mac
This is an automated email from the ASF dual-hosted git repository. chanjarster pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-toolkit.git commit b5726fb0195e7e2ee23c5f6cf82928782a8d2016 Author: kakulisen <18813972...@163.com> AuthorDate: Fri Dec 13 11:58:03 2019 +0800 fix bug of script in Mac Signed-off-by: kakulisen <18813972...@163.com> --- cli/scripts/cli.sh| 15 ++- .../org/apache/servicecomb/toolkit/cli/ToolkitMain.java | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/cli/scripts/cli.sh b/cli/scripts/cli.sh index 9360bba..81752d1 100755 --- a/cli/scripts/cli.sh +++ b/cli/scripts/cli.sh @@ -24,7 +24,20 @@ if [ -z "$JAVA_HOME" -o ! -f "$JAVA_HOME/bin/java" ]; then exit 1 fi -shellDir=$(dirname $(readlink -f "$0")) +# resolve links - $0 may be a softlink +PRG="$0" + +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then +PRG="$link" + else +PRG=`dirname "$PRG"`/"$link" + fi +done + +shellDir=`dirname "$PRG"` # check if jar file exist jarFile=$(find ${shellDir} -name "cli-*.jar" | head -n 1) diff --git a/cli/src/main/java/org/apache/servicecomb/toolkit/cli/ToolkitMain.java b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/ToolkitMain.java index 8b637e7..ac3ac01 100755 --- a/cli/src/main/java/org/apache/servicecomb/toolkit/cli/ToolkitMain.java +++ b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/ToolkitMain.java @@ -33,7 +33,7 @@ public class ToolkitMain { initialProjectVersion(); -Cli.CliBuilder builder = Cli.builder("java -jar toolkit-cli-" + projectVersion + ".jar"); +Cli.CliBuilder builder = Cli.builder("cli.sh"); builder.withDescription("Microservice development toolkit(version " + projectVersion + "). "); builder.withDefaultCommand(Help.class);
[servicecomb-toolkit] 01/04: [SCB-1663] add scripts
This is an automated email from the ASF dual-hosted git repository. chanjarster pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-toolkit.git commit 11de7d9b4069d1523e88f4c3b33195cf781e68b0 Author: kakulisen <18813972...@163.com> AuthorDate: Thu Dec 12 22:39:36 2019 +0800 [SCB-1663] add scripts Signed-off-by: kakulisen <18813972...@163.com> --- README-ZH.md | 17 README.md | 17 cli/scripts/cli.cmd | 67 +++ cli/scripts/cli.sh| 37 + toolkit-distribution/src/assembly/bin.xml | 8 5 files changed, 130 insertions(+), 16 deletions(-) diff --git a/README-ZH.md b/README-ZH.md index 8fc4c2c..1dcd770 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -234,13 +234,14 @@ mvn toolkit:verify ### 3.3 使用toolkit cli工具 -可执行jar包位于toolkit/cli/target/bin目录下 +* 如果你使用的是正式发布版本(>=0.2.0),可以在解压二进制包后直接使用cli.sh +* 如果你是通过源码构建,可以将`cli/scripts/cli.sh`与`cli/target/bin/toolkit-cli-{version}.jar`放置在同一目录,然后使用cli.sh ```shell -$ java -jar toolkit-cli-{version}.jar help +$ ./cli.sh help ``` 3.3.1 契约生成微服务工程 ```shell -$ java -jar toolkit-cli-{version}.jar codegenerate -m ServiceComb -i swagger.yaml -o ./project -p SpringMVC +$ ./cli.sh codegenerate -m ServiceComb -i swagger.yaml -o ./project -p SpringMVC ``` > **codegenerate** 命令选项说明: * -m, --microservice-framework : 指定微服务框架,现支持ServiceComb @@ -266,7 +267,7 @@ $ java -jar toolkit-cli-{version}.jar codegenerate -m ServiceComb -i swagger.ya 3.3.2 契约生成文档 ```shell -$ java -jar toolkit-cli-{version}.jar docgenerate -i swagger.yaml -o ./document +$ ./cli.sh docgenerate -i swagger.yaml -o ./document ``` > **docgenerate** 命令选项说明: * -i, --input : 指定遵循OpenAPI规范的契约文件,支持yaml和json格式,支持指定本地和网络文件 @@ -279,9 +280,9 @@ $ java -jar toolkit-cli-{version}.jar docgenerate -i swagger.yaml -o ./document 3.3.3 契约风格检查 ```shell -$ java -jar toolkit-cli-{version}.jar checkstyle -r style-check-rules.yaml -f oas.yaml +$ ./cli.sh checkstyle -r style-check-rules.yaml -f oas.yaml or -$ java -jar toolkit-cli-{version}.jar cs -r style-check-rules.yaml -f oas.yaml +$ ./cli.sh cs -r style-check-rules.yaml -f oas.yaml ``` > **checkstyle** Command argument @@ -293,9 +294,9 @@ $ java -jar toolkit-cli-{version}.jar cs -r style-check-rules.yaml -f oas.yaml 3.3.4 契约兼容性检查 ```shell -$ java -jar toolkit-cli-{version}.jar checkcompatibility left-oas.yaml right-oas.yaml +$ ./cli.sh checkcompatibility left-oas.yaml right-oas.yaml 或者 -$ java -jar toolkit-cli-{version}.jar cc left-oas.yaml right-oas.yaml +$ ./cli.sh cc left-oas.yaml right-oas.yaml ``` > **checkcompatibility** Command argument diff --git a/README.md b/README.md index 6ee5217..55123d7 100644 --- a/README.md +++ b/README.md @@ -229,13 +229,14 @@ mvn toolkit:verify ### 3.3 Use the toolkit cli -The executable jar package is located in the toolkit/cli/target/bin directory +* If you are using the official release version ( >=0.2.0 ), you can use cli.sh directly after decompressing the binary package +* If you are building from source, you can put `cli/scripts/cli.sh` in the same directory as`cli/target/bin/toolkit-cli-{version}.jar` and then use cli.sh ```shell -$ java -jar toolkit-cli-{version}.jar help +$ ./cli.sh help ``` 3.3.1 Service contract generation microservice project ```shell -$ java -jar toolkit-cli-{version}.jar codegenerate -m ServiceComb -i swagger.yaml -o ./project -p SpringMVC +$ ./cli.sh codegenerate -m ServiceComb -i swagger.yaml -o ./project -p SpringMVC ``` > **codegenerate** Command option * -m, --microservice-framework. Specify microservices framework, now supports ServiceComb. @@ -261,7 +262,7 @@ e.g.:--service-type provider 3.3.2 Service contract generation document ```shell -$ java -jar toolkit-cli-{version}.jar docgenerate -i swagger.yaml -o ./document +$ ./cli.sh docgenerate -i swagger.yaml -o ./document ``` > **docgenerate** Command option * -i, --input. Specifies contract files that follow the OpenAPI specification, supports yaml and json formats, and supports specifying local and network files. @@ -274,9 +275,9 @@ e.g:-f swagger-ui 3.3.3 Service contract style checking ```shell -$ java -jar toolkit-cli-{version}.jar checkstyle -r style-check-rules.yaml -f oas.yaml +$ ./cli.sh checkstyle -r style-check-rules.yaml -f oas.yaml or -$ java -jar toolkit-cli-{version}.jar cs -r style-check-rules.yaml -f oas.yaml +$ ./cli.sh cs -r style-check-rules.yaml -f oas.yaml ``` > **checkstyle** Command argument @@ -288,9 +289,9 @@ See [style check rules](oas-validator/README.md) 3.3.4 Service contract compatibility checking ```shell -$ java -jar toolkit-cli-{version}.jar checkcompatibility left-oas.yaml right-oas.yaml +$ ./cli.sh checkcompatibility left-oas.yaml right-oas.yaml or -$ java -jar
[servicecomb-toolkit] 03/04: [SCB-1663] determine script name based on system property
This is an automated email from the ASF dual-hosted git repository. chanjarster pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-toolkit.git commit 0c420e6e418756d68701d1e5f62aa03a8ad5e1b6 Author: kakulisen <18813972...@163.com> AuthorDate: Fri Dec 13 15:35:19 2019 +0800 [SCB-1663] determine script name based on system property Signed-off-by: kakulisen <18813972...@163.com> --- README-ZH.md | 11 +-- README.md | 8 ++-- cli/scripts/cli.cmd | 2 +- cli/scripts/cli.sh| 2 +- .../java/org/apache/servicecomb/toolkit/cli/ToolkitMain.java | 11 ++- 5 files changed, 27 insertions(+), 7 deletions(-) diff --git a/README-ZH.md b/README-ZH.md index 1dcd770..f61eee0 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -234,8 +234,15 @@ mvn toolkit:verify ### 3.3 使用toolkit cli工具 -* 如果你使用的是正式发布版本(>=0.2.0),可以在解压二进制包后直接使用cli.sh -* 如果你是通过源码构建,可以将`cli/scripts/cli.sh`与`cli/target/bin/toolkit-cli-{version}.jar`放置在同一目录,然后使用cli.sh + + 3.3.0 获取 +* 如果你使用的是正式发布版本(>=0.2.0),可以在解压二进制包后直接使用里面的脚本文件 + * 在Linux及Mac环境,请使用cli.sh + * 在Windows环境,请使用cli.cmd + +* 如果你是通过源码构建,可以将`cli/scripts/cli.*`与`cli/target/bin/toolkit-cli-{version}.jar`放置在同一目录,然后根据不同环境选择不同脚本 + +以下所有示例均通过Linux环境的cli.sh进行介绍 ```shell $ ./cli.sh help ``` diff --git a/README.md b/README.md index 55123d7..015129a 100644 --- a/README.md +++ b/README.md @@ -229,8 +229,12 @@ mvn toolkit:verify ### 3.3 Use the toolkit cli -* If you are using the official release version ( >=0.2.0 ), you can use cli.sh directly after decompressing the binary package -* If you are building from source, you can put `cli/scripts/cli.sh` in the same directory as`cli/target/bin/toolkit-cli-{version}.jar` and then use cli.sh +* If you are using the official release version ( >=0.2.0 ), you can use the script files directly after decompressing the binary package + * In Linux and Mac environment, please use cli.sh + * In the Windows environment, please use cli.cmd +* If you are building from source, you can put `cli/scripts/cli.*` in the same directory as`cli/target/bin/toolkit-cli-{version}.jar` and then choose different scripts according to different environments + +All the examples below are introduced through cli.sh for Linux environment ```shell $ ./cli.sh help ``` diff --git a/cli/scripts/cli.cmd b/cli/scripts/cli.cmd index 0e07d35..5d7e25c 100644 --- a/cli/scripts/cli.cmd +++ b/cli/scripts/cli.cmd @@ -55,7 +55,7 @@ if "%allparam:~-1%"==" " set "allparam=%allparam:~0,-1%" intercept_right :eof -java -jar %jarFile% %allparam% +java -Dscript.name="cli.cmd" -jar %jarFile% %allparam% exit /B %SUCCESS_CODE% :JAVA_HOME_ERROR diff --git a/cli/scripts/cli.sh b/cli/scripts/cli.sh index 81752d1..cdc22c8 100755 --- a/cli/scripts/cli.sh +++ b/cli/scripts/cli.sh @@ -47,4 +47,4 @@ if [[ ! -f ${jarFile} ]]; then exit 1 fi -java -jar ${jarFile} $* +java -Dscript.name="cli.sh" -jar ${jarFile} $* diff --git a/cli/src/main/java/org/apache/servicecomb/toolkit/cli/ToolkitMain.java b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/ToolkitMain.java index ac3ac01..851289d 100755 --- a/cli/src/main/java/org/apache/servicecomb/toolkit/cli/ToolkitMain.java +++ b/cli/src/main/java/org/apache/servicecomb/toolkit/cli/ToolkitMain.java @@ -21,6 +21,8 @@ import java.io.IOException; import java.util.Optional; import java.util.Properties; +import org.apache.commons.lang3.StringUtils; + import io.airlift.airline.Cli; import io.airlift.airline.Help; @@ -33,7 +35,14 @@ public class ToolkitMain { initialProjectVersion(); -Cli.CliBuilder builder = Cli.builder("cli.sh"); +String scriptName = System.getProperty("script.name"); +Cli.CliBuilder builder = null; +if (StringUtils.isNotEmpty(scriptName)) { + builder = Cli.builder(scriptName); +} else { + builder = Cli.builder("java -jar toolkit-cli-" + projectVersion + ".jar"); +} + builder.withDescription("Microservice development toolkit(version " + projectVersion + "). "); builder.withDefaultCommand(Help.class);
[GitHub] [servicecomb-java-chassis] coveralls commented on issue #1478: [SCB-1675][HIGHWAY-WEAK]turn on commented highway, probuffer-common m…
coveralls commented on issue #1478: [SCB-1675][HIGHWAY-WEAK]turn on commented highway, probuffer-common m… URL: https://github.com/apache/servicecomb-java-chassis/pull/1478#issuecomment-568348770 [![Coverage Status](https://coveralls.io/builds/27758570/badge)](https://coveralls.io/builds/27758570) Coverage decreased (-0.6%) to 83.861% when pulling **c44000cc582b0b36ef5889eeca9bed10cfeb75a6 on liubao68:highway** into **9185b8c6515c63a75da26d4bb83e0ab2d41d45c1 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[servicecomb-website] branch master updated (f323c43 -> 0408ec1)
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/servicecomb-website.git. from f323c43 Adjusted the document directory structure and fixed error 404 for some linked pages add 0408ec1 Fixed the broken links of footer No new revisions were added by this update. Summary of changes: _data/navigation.yml | 6 +++--- _data/ui-text.yml | 2 +- _includes/footer.html | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
[servicecomb-website] 01/02: Merge branch 'master' into asf-site
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/servicecomb-website.git commit 19c97c576746947782eb5522b815d7f16c8e0b9d Merge: ce95bcb 0408ec1 Author: Willem Jiang AuthorDate: Mon Dec 23 12:00:06 2019 +0800 Merge branch 'master' into asf-site _data/navigation.yml | 6 +++--- _data/ui-text.yml | 2 +- _includes/footer.html | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
[servicecomb-website] branch asf-site updated (ce95bcb -> 6990fa1)
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a change to branch asf-site in repository https://gitbox.apache.org/repos/asf/servicecomb-website.git. from ce95bcb Publish the website add 0408ec1 Fixed the broken links of footer new 19c97c5 Merge branch 'master' into asf-site new 6990fa1 Publish the website The 2 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: _data/navigation.yml | 6 +++--- _data/ui-text.yml | 2 +- _includes/footer.html | 4 ++-- content/404.html | 6 +++--- content/cn/404.html| 4 ++-- content/cn/developers/becomming-a-commiter.html| 4 ++-- content/cn/developers/contributing.html| 4 ++-- content/cn/developers/index.html | 4 ++-- content/cn/developers/release-guide/index.html | 4 ++-- content/cn/developers/release-validation-guide/index.html | 4 ++-- content/cn/developers/setup-committer-rights/index.html| 4 ++-- content/cn/developers/setup-develop-environment/index.html | 4 ++-- content/cn/developers/sonarcloud-how-to/index.html | 4 ++-- content/cn/developers/submit-codes/index.html | 4 ++-- content/cn/developers/submit-issues/index.html | 4 ++-- content/cn/developers/subscribe-mail-list/index.html | 4 ++-- content/cn/developers/team/index.html | 4 ++-- content/cn/developers/use-gitter/index.html| 4 ++-- content/cn/developers/use-jira/index.html | 4 ++-- .../Apache-ServiceComb-Meetup-2018-Shanghai-Report/index.html | 4 ++-- .../cn/docs/Apache-ServiceComb-Meetup-2018-Shanghai/index.html | 4 ++-- .../index.html | 4 ++-- .../Apache-ServiceComb-Meetup-2019-Shanghai-Report/index.html | 4 ++-- content/cn/docs/apache-servicecomb-day-slides/index.html | 4 ++-- content/cn/docs/apache-servicecomb-incubating-day/index.html | 4 ++-- .../cn/docs/apache-servicecomb-introduction-slides/index.html | 4 ++-- content/cn/docs/autoscale-on-company/index.html| 4 ++-- .../build-java-chassis-microservices-using-gradle/index.html | 4 ++-- .../docs/chuanzhiboke-servicecomb-tutoria-release/index.html | 4 ++-- content/cn/docs/communication-btw-sc-ms/index.html | 4 ++-- content/cn/docs/company-on-kubernetes/index.html | 4 ++-- content/cn/docs/config_center_integration/index.html | 4 ++-- content/cn/docs/consul-servicemesh.html| 4 ++-- content/cn/docs/crm-part-I/index.html | 4 ++-- content/cn/docs/customized-tracing-with-servicecomb/index.html | 4 ++-- .../cn/docs/distributed-transaction-of-services-1/index.html | 4 ++-- .../cn/docs/distributed-transaction-of-services-2/index.html | 4 ++-- .../distributed-transactions-saga-implementation/index.html| 4 ++-- content/cn/docs/distributed_saga_1/index.html | 4 ++-- content/cn/docs/distributed_saga_2/index.html | 4 ++-- content/cn/docs/distributed_saga_3/index.html | 4 ++-- content/cn/docs/getting-started/index.html | 4 ++-- content/cn/docs/go-to-cloud/index.html | 4 ++-- content/cn/docs/how-to-do-microservice-accept-test/index.html | 4 ++-- .../docs/how-to-grow-up-to-be-an-apache-committer/index.html | 4 ++-- content/cn/docs/how-to-reform-a-legacy-system/index.html | 4 ++-- content/cn/docs/jira_beginner_guide/index.html | 4 ++-- content/cn/docs/join_the_community/index.html | 4 ++-- content/cn/docs/linuxcon-workshop-demo/index.html | 4 ++-- content/cn/docs/loadtest-saga-with-kubernetes.html | 4 ++-- content/cn/docs/maven_dependency_management/index.html | 4 ++-- content/cn/docs/open-design/index.html | 4 ++-- .../cn/docs/opensource-project-is-not-so-far-away/index.html | 4 ++-- content/cn/docs/osi-microservices/index.html | 4 ++-- .../cn/docs/performance-test-on-seckill-with-jmeter/index.html | 4 ++-- .../index.html | 4 ++-- .../index.html | 4 ++-- content/cn/docs/products/java-chassis/advance/index.html | 4 ++-- content/cn/docs/products/java-chassis/bmi/index.html | 4 ++--
[GitHub] [servicecomb-java-chassis] liubao68 opened a new pull request #1478: [SCB-1675][HIGHWAY-WEAK]turn on commented highway, probuffer-common m…
liubao68 opened a new pull request #1478: [SCB-1675][HIGHWAY-WEAK]turn on commented highway, probuffer-common m… URL: https://github.com/apache/servicecomb-java-chassis/pull/1478 …odule and resolve compile problems Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `mvn clean install -Pit` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). --- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1474: 在ServiceComb下运行redis连接池出错
liubao68 commented on issue #1474: 在ServiceComb下运行redis连接池出错 URL: https://github.com/apache/servicecomb-java-chassis/issues/1474#issuecomment-568339860 You can follow the ways provided by my first answer and check out the differences of jedis dependency. First find out which library change caused by the problem. Maybe you can debug the code which error caused initializing Jeids class fail. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1475: 微服务安全有了TLS,是不是不需要RSA鉴权呢,RSA是不是多此一举呢
liubao68 commented on issue #1475: 微服务安全有了TLS,是不是不需要RSA鉴权呢,RSA是不是多此一举呢 URL: https://github.com/apache/servicecomb-java-chassis/issues/1475#issuecomment-568338840 They are different ways to provide application security. Choose the one best fit for your. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [servicecomb-java-chassis] sunjinghan7331 commented on issue #1477: 过滤器不生效
sunjinghan7331 commented on issue #1477: 过滤器不生效 URL: https://github.com/apache/servicecomb-java-chassis/issues/1477#issuecomment-568324737 我在resources文件夹下新建了META-INF/services/org.apache.servicecomb.common.rest.filter.HttpServerFilter 文件,里面以包名+类名的全路径方式指定了我的过滤器,过滤器类实现了HttpServerFilter,并且在afterReceiveRequest()方法中打印一行控制台信息。 微服务运行后收到请求,日志中有如下信息: [2019-12-23 09:21:50,886][INFO][vert.x-eventloop-thread-8][SPIServiceUtils.java][]Found SPI service javax.ws.rs.core.Response$StatusType, count=0. org.apache.servicecomb.foundation.common.utils.SPIServiceUtils.loadSortedService(SPIServiceUtils.java:79) [2019-12-23 09:21:50,889][INFO][vert.x-eventloop-thread-8][SPIServiceUtils.java][]Found SPI service org.apache.servicecomb.core.tracing.TraceIdGenerator, count=1. org.apache.servicecomb.foundation.common.utils.SPIServiceUtils.loadSortedService(SPIServiceUtils.java:79) [2019-12-23 09:21:50,889][INFO][vert.x-eventloop-thread-8][SPIServiceUtils.java][] 0. org.apache.servicecomb.core.tracing.BraveTraceIdGenerator. org.apache.servicecomb.foundation.common.utils.SPIServiceUtils.loadSortedService(SPIServiceUtils.java:82) 没有我自定义的过滤器类,同时自定义的过滤器也没有生效。请看一下是什么问题 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services