简体   繁体   English

“./gradlew {package}-rpm”之后会发生什么

[英]What happen after "./gradlew {package}-rpm"

I am new to bigtop architecture, I would like to know how does bigtop know the real build command to launch for this specific package after ./gradlew {package}-rpm , I assume there must be some kind of configs define the real build command.我是 bigtop 架构的新手,我想知道 bigtop 如何知道在./gradlew {package}-rpm之后为这个特定package启动的真正构建命令,我假设必须有某种配置定义真正的构建命令. (The package is a maven based project) (该package是一个基于 maven 的项目)

Thank you.谢谢你。

I'm not familiar with Bigtop, but I am familiar with Gradle.我不熟悉 Bigtop,但我熟悉 Gradle。 See here for the Gradle task definition that you're referring to: https://github.com/apache/bigtop/blob/2d6f3dd7b7241aa2191c9ebc5a502a1415932464/packages.gradle#L460有关您所指的 Gradle 任务定义,请参见此处: https : //github.com/apache/bigtop/blob/2d6f3dd7b7241aa2191c9ebc5a502a1415932464/packages.gradle#L460

The command that the task will execute is given under the exec directive: rpmbuild <command> .任务将执行的命令在exec指令下给出: rpmbuild <command> command is an array of arguments defined just above that directive. command是在该指令上方定义的参数数组。 Most of its arguments are derived from the config object, which is basically a nested map (like a JSON object) produced by Groovy's ConfigSlurper , which reads the input BOM file as if it were a Groovy file.它的大部分参数来自config对象,它基本上是由 Groovy 的ConfigSlurper生成的嵌套映射(如 JSON 对象),它读取输入 BOM 文件,就像它是 Groovy 文件一样。

So:所以:

  1. "Slurp" the BOM configuation into the config object将 BOM config “吸食”到config对象中
  2. For each "component" defined within the config configuration, produce a set of tasks ( ${package}-rpm and others)对于config配置中定义的每个“组件”,生成一组任务( ${package}-rpm等)
  3. When configuring the ${package}-rpm task, use the BOM configuration to derive the command arguments using the logic provided within the task closure配置${package}-rpm任务时,使用 BOM 配置使用任务闭包中提供的逻辑派生命令参数
  4. Upon execution, run rpmbuild with the aforementioned command arguments执行后,使用上述命令参数运行rpmbuild

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM