打包处理程序代码
要让用 Java 或 Scala 编写的函数或过程处理程序代码更容易重用,可以构建一个包含处理程序及其依赖项的 JAR 文件。创建函数或过程时,在暂存区中引用处理程序 JAR。
本节中的主题介绍如何使用常用的构建工具构建处理程序。
For more information about using packaged handler code (as well as other dependencies) by referencing them on a stage, see Keeping handler code in-line or on a stage.
Note
You can also use an IntelliJ IDEA project (not an SBT project in IntelliJ) to create the handler JAR. For more information, see the instructions on setting up an artifact configuration (https://www.jetbrains.com/help/idea/compiling-applications.html#configure_artifact).
- Packaging Scala Handler Code with sbt
使用 sbt 构建 Scala 处理程序代码。
- Packaging Java or Scala Handler Code with Maven
使用 Maven 构建处理程序代码。