简体   繁体   中英

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. (The package is a maven based project)

Thank you.

I'm not familiar with Bigtop, but I am familiar with Gradle. See here for the Gradle task definition that you're referring to: 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> . command is an array of arguments defined just above that directive. 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.

So:

  1. "Slurp" the BOM configuation into the config object
  2. For each "component" defined within the config configuration, produce a set of tasks ( ${package}-rpm and others)
  3. When configuring the ${package}-rpm task, use the BOM configuration to derive the command arguments using the logic provided within the task closure
  4. Upon execution, run rpmbuild with the aforementioned command arguments

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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