This page is a proposal to extends Buckminster in order to bring users from the non Java world a better experience.

This page is a proposal to extends Buckminster in order to bring users from the non Java world a better experience.

−

=== Executor Actor ===

+

=== Executor Actor (now available)===

This actor would add the possibility to execute programs directly from the CSpec without writing Ant Scripts.

This actor would add the possibility to execute programs directly from the CSpec without writing Ant Scripts.

Line 71:

Line 71:

* '''newenvironment''' : if set to true, the execution will start from a blank environment variables.

* '''newenvironment''' : if set to true, the execution will start from a blank environment variables.

** Note in early design development the opposite paradigm was chosen and one has to use '''inheritEnvVar''' to start from the system environment variables, now it's the default behavior.

** Note in early design development the opposite paradigm was chosen and one has to use '''inheritEnvVar''' to start from the system environment variables, now it's the default behavior.

+

* '''failonerror''' : if unset or set to true, the action will fail if execution returns non 0 return value. Default is true.

* '''exec''' : the program to execute

* '''exec''' : the program to execute

* '''execDir''' : the program execution directory (if not set : the component directory)

* '''execDir''' : the program execution directory (if not set : the component directory)

Line 80:

Line 81:

Those variables are set by surrounding properties or named path with '''${}'''. See examples [[Non_Java_projects_Proposal#Example|above]].

Those variables are set by surrounding properties or named path with '''${}'''. See examples [[Non_Java_projects_Proposal#Example|above]].

−

=== Fetcher Actor ===

+

=== Fetcher Actor (now available)===

This actor is used to materialize resources into the component. I'm still not sure this behavior should be provided by an actor or through the materialization process. It seems the actor can be used at will so it's more flexible than the materialization but this point can be discussed.

This actor is used to materialize resources into the component. I'm still not sure this behavior should be provided by an actor or through the materialization process. It seems the actor can be used at will so it's more flexible than the materialization but this point can be discussed.

Valid properties

newenvironment : if set to true, the execution will start from a blank environment variables.

Note in early design development the opposite paradigm was chosen and one has to use inheritEnvVar to start from the system environment variables, now it's the default behavior.

failonerror : if unset or set to true, the action will fail if execution returns non 0 return value. Default is true.

exec : the program to execute

execDir : the program execution directory (if not set : the component directory)

shell : a batch file to execute

Note that you have to choose between exec or shell keyword.

All those properties can contain variables.

Those variables are set by surrounding properties or named path with ${}. See examples above.

Fetcher Actor (now available)

This actor is used to materialize resources into the component. I'm still not sure this behavior should be provided by an actor or through the materialization process. It seems the actor can be used at will so it's more flexible than the materialization but this point can be discussed.

Valid Properties

If the resource you are accessing is protected with basic authentication, you can also specify :

login : the login to use with basic authentication

pass : the password to use with basic authentication

Note that both properties have to be set to enable authentication.

options : a set of options to customize the fetch operation, valid options are :

uncompress : specify that the resource pointed by the url is an archive and that it should be uncompressed

flatten : valid only with uncompress. If specified the folder hierarchy is flatten

include : a regular expression to include specific files only. Note that you can specify multiple include directives in the options line. Regular expressions beginning with the '-' (minus sign) will be considered as an exclusion. See examples below :

Options samples

full options sample, uncompress the archive and flattens the folder hierarchy, including only files in the binaries directory that are not html files

uncompress;flatten;include=binaries/*;include=-*.html

flatten and include keywords will NOT work until the uncompress keyword is set, the following options line will simply copy the url resource locally.

Builds a platform dependent shell script baking a set of environment variables. It is used to executes actions independently from Buckminster.
Sure, you will loose the dynamic aspect of Buckminster's actions but you'll get faster executions.

Features

sets the environment variable according to the platform

action's prerequisites are automatically set in the script

allow appending lines to the script

allow filtering of specific lines

allow unsetting of specific variables

Example

<cs:publicname="my.script"actor="script"><cs:actorProperties><cs:propertykey="append.0"value="echo Will be displayed anyway"/><cs:propertykey="append.1"value="echo Will be displayed on windows"/><cs:propertykey="append.2"value="echo Will be displayed on linux"/><cs:propertykey="append.3"value="echo BJAM=${BJAM}"/><cs:propertykey="filter.1"value="(target.os=win32)"/><cs:propertykey="filter.2"value="(target.os=linux)"/><cs:propertykey="script.dir"value="data"/><cs:propertykey="script.linux.shell"value="/bin/bash"/><cs:propertykey="script.name"value="script"/><cs:propertykey="unset"value="BJAM"/></cs:actorProperties><cs:prerequisites><cs:attributename="bjam"alias="BJAM"component="boost-1.36.0"/><cs:attributename="include"alias="BOOST_INCLUDE"component="boost-1.36.0"/><cs:attributename="libs"alias="BOOST_LIBS"component="boost-1.36.0"/></cs:prerequisites></cs:public>

On windows, would produce the file data/script.bat

set BOOST_INCLUDE="C:\PATH\TO\BOOST_INCLUDE"
set BOOST_LIBS="C:\PATH\TO\BOOST_LIBS"
echo Will be displayed anyway
echo Will be displayed on windows
echo BJAM="C:\PATH\TO\BJAM"