[jira] [Commented] (SCB-325) report sdk version when register to SC
[ https://issues.apache.org/jira/browse/SCB-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16356637#comment-16356637 ] ASF GitHub Bot commented on SCB-325: liubao68 closed pull request #544: [SCB-325] report sdk version when register to SC URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/544 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java b/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java index 71f885f32..f2fc0d77a 100644 --- a/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java +++ b/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java @@ -19,15 +19,12 @@ import java.util.HashMap; import java.util.Map; -import java.util.Map.Entry; - import org.apache.servicecomb.core.CseContext; import org.apache.servicecomb.demo.DemoConst; import org.apache.servicecomb.demo.TestMgr; import org.apache.servicecomb.demo.controller.Controller; import org.apache.servicecomb.demo.controller.Person; import org.apache.servicecomb.foundation.common.utils.BeanUtils; -import org.apache.servicecomb.foundation.common.utils.JsonUtils; import org.apache.servicecomb.foundation.common.utils.Log4jUtils; import org.apache.servicecomb.metrics.common.MetricsDimension; import org.apache.servicecomb.metrics.common.MetricsPublisher; diff --git a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/base/ServiceCombConstants.java b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/base/ServiceCombConstants.java index 547c17279..e6613fa3e 100644 --- a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/base/ServiceCombConstants.java +++ b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/base/ServiceCombConstants.java @@ -59,8 +59,6 @@ String CONFIG_FRAMEWORK_DEFAULT_NAME = "servicecomb-java-chassis"; - String CONFIG_FRAMEWORK_DEFAULT_VERSION = ""; - String CONFIG_DEFAULT_REGISTER_BY = "SDK"; } diff --git a/pom.xml b/pom.xml index 51412e5f4..f0e1171ba 100644 --- a/pom.xml +++ b/pom.xml @@ -253,6 +253,18 @@ findbugs-exclude.xml + +org.apache.maven.plugins +maven-jar-plugin + + + + true + true + + + + diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/Versions.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/Versions.java new file mode 100644 index 0..5e4adfb61 --- /dev/null +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/Versions.java @@ -0,0 +1,23 @@ +/* + * 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.serviceregistry.api; + +import java.util.Map; + +public interface Versions { + public Map loadVersion(); +} diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/FrameworkVersions.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/FrameworkVersions.java new file mode 100644 index 0..5c878552d --- /dev/null +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/FrameworkVersions.java @@ -0,0 +1,43 @@ +/* + * 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 fil
[jira] [Commented] (SCB-325) report sdk version when register to SC
[ https://issues.apache.org/jira/browse/SCB-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16355539#comment-16355539 ] ASF GitHub Bot commented on SCB-325: coveralls commented on issue #544: [SCB-325] report sdk version when register to SC URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/544#issuecomment-362467090 [![Coverage Status](https://coveralls.io/builds/15415248/badge)](https://coveralls.io/builds/15415248) Coverage decreased (-0.06%) to 87.251% when pulling **32291a719294191f790bc0fc82c79116278f39c1 on weichao666:CSE1364** into **25fe20db66cfa96c524111c775f9415b16917c75 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on 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 > report sdk version when register to SC > -- > > Key: SCB-325 > URL: https://issues.apache.org/jira/browse/SCB-325 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: WeiChao >Assignee: WeiChao >Priority: Major > > 1、SDK report their framework type and version when register to SC > 2、Each service with specific version has a certain framework+version > 3、Present the type/version information in console in Service+Version level > 4、In gov service, send the different command to CC according to the > type/version when doing > management -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-325) report sdk version when register to SC
[ https://issues.apache.org/jira/browse/SCB-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16355417#comment-16355417 ] ASF GitHub Bot commented on SCB-325: weichao666 opened a new pull request #544: [SCB-325] report sdk version when register to SC URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/544 Follow this checklist to help us incorporate your contribution quickly and easily: - [x] 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. - [x] Each commit in the pull request should have a meaningful subject line and body. - [x] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Run `mvn clean install` 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). --- after mvn package,MicroserviceFactory.class.getPackage().getImplementationVersion() will read version from MANIFEST.MF, it also been tested in tomcat This is an automated message from the Apache Git Service. To respond to the message, please log on 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 > report sdk version when register to SC > -- > > Key: SCB-325 > URL: https://issues.apache.org/jira/browse/SCB-325 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: WeiChao >Assignee: WeiChao >Priority: Major > > 1、SDK report their framework type and version when register to SC > 2、Each service with specific version has a certain framework+version > 3、Present the type/version information in console in Service+Version level > 4、In gov service, send the different command to CC according to the > type/version when doing > management -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-325) report sdk version when register to SC
[ https://issues.apache.org/jira/browse/SCB-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16353652#comment-16353652 ] ASF GitHub Bot commented on SCB-325: weichao666 closed pull request #544: [SCB-325] report sdk version when register to SC URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/544 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java b/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java index 71f885f32..f2fc0d77a 100644 --- a/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java +++ b/demo/demo-springmvc/springmvc-client/src/main/java/org/apache/servicecomb/demo/springmvc/client/SpringmvcClient.java @@ -19,15 +19,12 @@ import java.util.HashMap; import java.util.Map; -import java.util.Map.Entry; - import org.apache.servicecomb.core.CseContext; import org.apache.servicecomb.demo.DemoConst; import org.apache.servicecomb.demo.TestMgr; import org.apache.servicecomb.demo.controller.Controller; import org.apache.servicecomb.demo.controller.Person; import org.apache.servicecomb.foundation.common.utils.BeanUtils; -import org.apache.servicecomb.foundation.common.utils.JsonUtils; import org.apache.servicecomb.foundation.common.utils.Log4jUtils; import org.apache.servicecomb.metrics.common.MetricsDimension; import org.apache.servicecomb.metrics.common.MetricsPublisher; diff --git a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/base/ServiceCombConstants.java b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/base/ServiceCombConstants.java index 547c17279..e6613fa3e 100644 --- a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/base/ServiceCombConstants.java +++ b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/base/ServiceCombConstants.java @@ -59,8 +59,6 @@ String CONFIG_FRAMEWORK_DEFAULT_NAME = "servicecomb-java-chassis"; - String CONFIG_FRAMEWORK_DEFAULT_VERSION = ""; - String CONFIG_DEFAULT_REGISTER_BY = "SDK"; } diff --git a/pom.xml b/pom.xml index 51412e5f4..51090e59d 100644 --- a/pom.xml +++ b/pom.xml @@ -266,6 +266,18 @@ + + org.apache.maven.plugins + maven-jar-plugin + + + + true + true + + + + diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/MicroserviceFactory.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/MicroserviceFactory.java index fad8bf998..82a8f0963 100644 --- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/MicroserviceFactory.java +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/MicroserviceFactory.java @@ -19,7 +19,6 @@ import static org.apache.servicecomb.foundation.common.base.ServiceCombConstants.CONFIG_APPLICATION_ID_KEY; import static org.apache.servicecomb.foundation.common.base.ServiceCombConstants.CONFIG_DEFAULT_REGISTER_BY; import static org.apache.servicecomb.foundation.common.base.ServiceCombConstants.CONFIG_FRAMEWORK_DEFAULT_NAME; -import static org.apache.servicecomb.foundation.common.base.ServiceCombConstants.CONFIG_FRAMEWORK_DEFAULT_VERSION; import static org.apache.servicecomb.foundation.common.base.ServiceCombConstants.CONFIG_QUALIFIED_MICROSERVICE_DESCRIPTION_KEY; import static org.apache.servicecomb.foundation.common.base.ServiceCombConstants.CONFIG_QUALIFIED_MICROSERVICE_NAME_KEY; import static org.apache.servicecomb.foundation.common.base.ServiceCombConstants.CONFIG_QUALIFIED_MICROSERVICE_ROLE_KEY; @@ -71,7 +70,7 @@ private Microservice createMicroserviceFromDefinition(Configuration configuratio // use default values, we can add configure item in future. Framework framework = new Framework(); framework.setName(CONFIG_FRAMEWORK_DEFAULT_NAME); -framework.setVersion(CONFIG_FRAMEWORK_DEFAULT_VERSION); +framework.setVersion("ServiceComb:" + MicroserviceFactory.class.getPackage().getImplementationVersion()); microservice.setFramework(framework); microservice.setRegisterBy(CONFIG_DEFAULT_REGISTER_BY); This is an automated message fro
[jira] [Commented] (SCB-325) report sdk version when register to SC
[ https://issues.apache.org/jira/browse/SCB-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16351359#comment-16351359 ] ASF GitHub Bot commented on SCB-325: coveralls commented on issue #544: [SCB-325] report sdk version when register to SC URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/544#issuecomment-362467090 [![Coverage Status](https://coveralls.io/builds/15357062/badge)](https://coveralls.io/builds/15357062) Coverage decreased (-0.05%) to 87.27% when pulling **9291552f322c79e5d64e9f8b8a85a04129b0434d on weichao666:CSE1364** into **25fe20db66cfa96c524111c775f9415b16917c75 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on 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 > report sdk version when register to SC > -- > > Key: SCB-325 > URL: https://issues.apache.org/jira/browse/SCB-325 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: WeiChao >Assignee: WeiChao >Priority: Major > > 1、SDK report their framework type and version when register to SC > 2、Each service with specific version has a certain framework+version > 3、Present the type/version information in console in Service+Version level > 4、In gov service, send the different command to CC according to the > type/version when doing > management -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-325) report sdk version when register to SC
[ https://issues.apache.org/jira/browse/SCB-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16351318#comment-16351318 ] ASF GitHub Bot commented on SCB-325: weichao666 commented on issue #544: [SCB-325] report sdk version when register to SC URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/544#issuecomment-362791065 Linux‘s Local deployment and docker container deployment are also validated ok This is an automated message from the Apache Git Service. To respond to the message, please log on 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 > report sdk version when register to SC > -- > > Key: SCB-325 > URL: https://issues.apache.org/jira/browse/SCB-325 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: WeiChao >Assignee: WeiChao >Priority: Major > > 1、SDK report their framework type and version when register to SC > 2、Each service with specific version has a certain framework+version > 3、Present the type/version information in console in Service+Version level > 4、In gov service, send the different command to CC according to the > type/version when doing > management -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-325) report sdk version when register to SC
[ https://issues.apache.org/jira/browse/SCB-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16349691#comment-16349691 ] ASF GitHub Bot commented on SCB-325: coveralls commented on issue #544: [SCB-325] report sdk version when register to SC URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/544#issuecomment-362467090 [![Coverage Status](https://coveralls.io/builds/15338214/badge)](https://coveralls.io/builds/15338214) Coverage decreased (-0.02%) to 87.292% when pulling **f10e3d76c6e630cf33b93278893d5470df612a34 on weichao666:CSE1364** into **25fe20db66cfa96c524111c775f9415b16917c75 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on 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 > report sdk version when register to SC > -- > > Key: SCB-325 > URL: https://issues.apache.org/jira/browse/SCB-325 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: WeiChao >Assignee: WeiChao >Priority: Major > > 1、SDK report their framework type and version when register to SC > 2、Each service with specific version has a certain framework+version > 3、Present the type/version information in console in Service+Version level > 4、In gov service, send the different command to CC according to the > type/version when doing > management -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-325) report sdk version when register to SC
[ https://issues.apache.org/jira/browse/SCB-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16349647#comment-16349647 ] ASF GitHub Bot commented on SCB-325: weichao666 opened a new pull request #544: [SCB-325] report sdk version when register to SC URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/544 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` 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). --- after mvn package,MicroserviceFactory.class.getPackage().getImplementationVersion() will read version from MANIFEST.MF, it also been tested in tomcat This is an automated message from the Apache Git Service. To respond to the message, please log on 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 > report sdk version when register to SC > -- > > Key: SCB-325 > URL: https://issues.apache.org/jira/browse/SCB-325 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: WeiChao >Assignee: WeiChao >Priority: Major > > 1、SDK report their framework type and version when register to SC > 2、Each service with specific version has a certain framework+version > 3、Present the type/version information in console in Service+Version level > 4、In gov service, send the different command to CC according to the > type/version when doing > management -- This message was sent by Atlassian JIRA (v7.6.3#76005)