#1110 I18N effort for dubbo code base - dubbo

This commit is contained in:
Ian Luo 2017-12-25 16:51:34 +08:00
parent fd27e96e06
commit da0f63e81e
3 changed files with 67 additions and 27 deletions

53
dubbo/README.md Normal file
View File

@ -0,0 +1,53 @@
# Readme
## When to modify
### When a new module is introduced
Need to add one new `<artifactSet> -> <includes> -> <include>` in maven-shad-plugin's configuration:
```xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<configuration>
<artifactSet>
<includes>
<include>com.alibaba:new-module-name</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
```
### When a new extension type is introduced
Need to add one new `<transformers> -> <transformer>` in maven-shade-plugin's configuration:
```xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/dubbo/internal/com.alibaba.dubbo.NewTypeExtension</resource>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
```
All extension types in dubbo project could be listed by the following command:
```sh
$ find . -wholename */META-INF/dubbo/* -type f | grep -vF /test/ | awk -F/ '{print $NF}' | sort -u
```

View File

@ -1,17 +1,18 @@
<!--
- Copyright 1999-2011 Alibaba Group.
-
- Licensed 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.
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

View File

@ -1,14 +0,0 @@
修改注意:
1) 添加了新的模块要在POM中maven-shade-plugin的<artifactSet>中添加<include>
2) 添加了新的扩展点要在POM中maven-shade-plugin加上<transformer>
搜索出 扩展点配置文件 的命令
$ find . -wholename */META-INF/dubbo/* -type f | grep -vF /test/ | awk -F/ '{print $NF}' | sort -u
com.alibaba.dubbo.cache.CacheFactory
com.alibaba.dubbo.common.compiler.Compiler
com.alibaba.dubbo.common.extension.ExtensionFactory
...and so on...