Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
CSPEC Action (Buckminster)
< To: Buckminster Project
An action is something that can be executed. It can have zero or many prerequisites where each prerequisite is either a local or external reference to a component attribute. A local reference appoints something that it is declared in the same CSPEC. An external reference appoints a public attribute in a CSPEC of another component via a dependency. The execution of an action will often produce new artifacts.
There are two types of actions. The internal action that maps to some semantics that is present in your runtime and action that allows you to define the performer that will exectute the action and the optional script that it will make use of.
Actions such as the eclipse.incremental.build and buckminster.classpath.container are provided by the platform and thus, considered to be internal actions. It is important to be able to include these actions in the CSPEC since they have dependencies and will produce artifacts just like any other action. The performer and script of an internal action are implicit so these attributes are left out from the declaration.
Prior to the execution of an action, all the artifacts that it requires must come into existence. This might trigger the execution of other actions. An action might also express dependencies to other components. All such dependencies will have a purpose that maps to an export in the appointed component. Since such an export in turn may export artifacts or dependencies, the implied execution of actions may ripple through the whole dependency tree.
The products of an action describes the artifacts that the action will create. A products section can be in one of two forms:
- It may consist of one or several artifact declarations. Referencing any of these artifacts will trigger a build.
- Just a base and zero to many paths. This is what the action itself delivers.
Up to date Policy
The products section of an action can have an up to date policy defined that describes different policies to determine if the products are up to date with respect to the action prerequisites.
|MAPPER||pattern, replacement, and count||Each product artifact is matched to a corresponding prerequisite. The match is verbatim or using a regular expression pattern and a replacement. All files must match and be younger then their respective match. Can also be combined with count to express a requirement for additional files|
|COUNT||count||At least count number of files in the product must be younger then the youngest artifact in the prerequisites|
|NOT_EMPTY||At least one product artifact must be present and all found product artifacts must be younger then the youngest artifact among the prerequisites|
|DEFAULT||All products must be declared using explicit paths where all paths denote files rather then directories. All files must exist and all files must be younger then the youngest artifact among the prerequisites|
An action performer is the piece of code that will be executed when the action is triggered. Buckminster will provide a small set of performers that will enable you to call Ant scripts and operating system commands. New performers can be added using the extension points.
Please add examples