wuchong commented on a change in pull request #8200: [FLINK-11614] [docs-zh] 
Translate the "Configuring Dependencies" page into Chinese
URL: https://github.com/apache/flink/pull/8200#discussion_r278543320
 
 

 ##########
 File path: docs/dev/projectsetup/dependencies.zh.md
 ##########
 @@ -99,31 +88,23 @@ When setting up a project manually, you need to add the 
following dependencies f
 </div>
 </div>
 
-**Important:** Please note that all these dependencies have their scope set to 
*provided*.
-That means that they are needed to compile against, but that they should not 
be packaged into the
-project's resulting application jar file - these dependencies are Flink Core 
Dependencies,
-which are already available in any setup.
+**注意事项:** 所有这些依赖项的作用域都应该设置为 *provided* 。
+这意味着需要这些依赖进行编译,但不应将它们打包到项目生成的应用程序jar文件中-- 
+因为这些依赖项是 Flink 的核心依赖,在应用启动前已经是可用的状态了。
 
-It is highly recommended to keep the dependencies in scope *provided*. If they 
are not set to *provided*,
-the best case is that the resulting JAR becomes excessively large, because it 
also contains all Flink core
-dependencies. The worst case is that the Flink core dependencies that are 
added to the application's jar file
-clash with some of your own dependency versions (which is normally avoided 
through inverted classloading).
+我们强烈建议保持这些依赖的作用域为 *provided* 。 如果它们的作用域未设置为 *provided* ,则最好的情况是因为包含了 Flink 
的核心依赖而导致生成的jar包变得过大。
+最糟糕的情况是添加到应用程序的 Flink 核心依赖项与你自己的一些依赖项版本冲突(通常通过反向类加载来避免)。
 
-**Note on IntelliJ:** To make the applications run within IntelliJ IDEA, the 
Flink dependencies need
-to be declared in scope *compile* rather than *provided*. Otherwise IntelliJ 
will not add them to the classpath and
-the in-IDE execution will fail with a `NoClassDefFountError`. To avoid having 
to declare the
-dependency scope as *compile* (which is not recommended, see above), the above 
linked Java- and Scala
-project templates use a trick: They add a profile that selectively activates 
when the application
-is run in IntelliJ and only then promotes the dependencies to scope *compile*, 
without affecting
-the packaging of the JAR files.
+**IntelliJ 上的一些注意事项:** 为了可以让 Flink 应用在 IntelliJ IDEA 中运行,这些 Flink 
核心依赖的作用域需要设置为 *compile* 而不是 *provided* 。
+否则 IntelliJ 不会添加这些依赖到 classpath,会导致应用运行时抛出 `NoClassDefFountError` 
异常。为了避免声明这些依赖的作用域为 *compile* (因为我们不推荐这样做),
+上文给出的的 Java 和 Scala 项目模板使用了一个小技巧:添加了一个可选择激活配置,仅当应用程序在 IntelliJ 中运行时该配置被激活,
 
 Review comment:
   Yes, agree with you.

----------------------------------------------------------------
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

Reply via email to