ContentProjectBuilder
Builds and manages projects that use the content library
Overview
ContentProjectBuilder:
Builds and manages projects that use the content library
ContentProjectBuilder is derived from ProjectBuilder providing the ability to manage a ControlTier project. If you are new to ProjectBuilder see the tutorial starting with: Getting started using ProjectBuilder
The following sections describe how to obtain, install and use the Content Module Library.
Obtaining the content library
Follow the steps below to obtain and install the content library.
1) Download the desired library jar file from Sourceforge:
Content Module Library file release
2) Run the Register command specifying the following arguments:
ad -p project -t ProjectBuilder -o content -c Register -- \ -basedir /path/to/basedir -installroot /path/to/targetdir
3) Run the load-library command specifying the following arguments:
ad -p project -t ProjectBuilder -o content -c load-library -- \
-jar /path/to/downloaded/content-version.jar
The destination project should now have the content library types loaded.
Using the content library
If you do not have the content types loaded, see the preceding section.
After the content library is installed, begin using the types in the library beginning with ContentProjectBuilder:
1) Run the Register command specifying the following arguments:
ad -p project -t ContentProjectBuilder -o name -c Register -- \
-basedir /path/to/module/srcdir -installroot /path/to/build/targetdir -install
2) Run the generate-objects command specifying the following arguments:
ad -p project -t ContentProjectBuilder -o name -c generate-objects -- \
-name aName -defaults /path/to/your/defaults.properties -load
The -name argument is used as the name for each generated object. The -load flag specifies to have loaded the object definitions loaded on the server.
3) Run the depot-setup command to deploy the objects in AntDepo:
depot-setup -p project -a deploy
The objects are now ready for use either via the AntDepo CLI command, ad, or via JobCenter webapp GUI.
The objects are now ready for use either via the AntDepo CLI command, ad, or via JobCenter webapp GUI.
4) Run the BuildAndUpdate command that will use the newly generated set of objects:
ad -p project -t ContentUpdater -o aName -c BuildAndUpdate -- \
-buildstamp buildstamp
The generate-objects command reads two template files and a defaults.properties file to generate two working files that can be used to load in the server. Without specific arguments, generate-objects will use templates from its templates directory as defined by the attribute templateDir.
Example:
ad -p project -t ContentProjectBuilder -o object -c generate-objects --\
-name aName -defaults /path/to/defaults.xml -load
Yields an object model like so in the project:
+aName [ContentUpdater]
|
+ aName [ConentBuilder]
| |
| |-aName [BuilderPackageInstallroot]
| |-aName [BuilderScmConnection]
| `-aName [BuilderScmModule]
|
` aName [ContentSite]
|
`-aName [ContentDeployment]
The -defaults option specifies the defaults.properties file to use in conjunction with a object.template.xml file and provides a set of properties used during the generation process.
Example: defaults.properties
#
# Common name given to generated objects
common.name=${opts.name}
#
# ContentBuilder settings
#
scmConnection=http://svn/repos/example-content
scmModule=${opts.name}.war
packageInstallroot=/apps/${opts.name}
#
# deployment locations
#
common.node=${framework.node}
ContentBuilder.node=${framework.node}
ContentDeployment.node=${framework.node}
Design
- Super Type
- ProjectBuilder
Extends ProjectBuilder
| Role | Concrete. (Objects can be created.) |
| Instance Names | Unique |
| Notification | false |
| Template Directory | |
| Data View | Children, proximity: 1 |
| Logger Name | ContentProjectBuilder |
Constraints
Allowed Child Dependencies
- BuilderBuildFile1
- BuilderBuildTarget1
- BuilderScmBinding1
- BuilderScmConnection1
- BuilderScmLabel1
- BuilderScmModule1
- BuilderStageExtension1
- BuilderStageFilebase1
- ProjectBuilderDefaults1
- ProjectBuilderDocBase1
- ProjectBuilderForrestHome1
- ProjectBuilderOrganizationDescription1
- ProjectBuilderOrganizationName1
- ProjectBuilderOrganizationURL1
- ProjectBuilderProjectDescription1
- ProjectBuilderProjectName1
- ProjectBuilderProjectURL1
- ProjectBuilderTemplateDir1
1: These types have a Singleton constraint. Only one instance may be added as a resource.
Allowed Parent Dependencies
- Node
Attributes
Exported Attributes
| Name | Property |
|---|---|
| basedir | deployment-basedir |
| targetdir | deployment-install-root |
Defaults for Imported Attributes
| Name | Default |
|---|---|
| buildfile | ${modules.dir}/ContentProjectBuilder/lib/build.xml |
| buildtarget | all |
| defaults | ${modules.dir}/ContentProjectBuilder/templates/defaults.properties |
| organizationDescription | Maker of the ControlTier software |
| organizationName | ControlTier |
| organizationURL | http://www.controltier.com |
| projectDescription | The content deployment types |
| projectName | content |
| projectURL | http://open.controltier.com |
| scmConnection | https://moduleforge.svn.sourceforge.net/svnroot/moduleforge/trunk |
| scmModule | content |
| stageextension | jar |
| stagefilebase | .* |
| templateDir | ${modules.dir}/ContentProjectBuilder/templates |
Commands
Related Types
The following types are defined for use with ContentProjectBuilder.
ContentProjectBuilderSetting
Overview
ContentProjectBuilderSetting:
A ContentProjectBuilder setting.
Design
- Super Type
- Setting
| Role | Abstract. (Objects cannot be created.) |
| Instance Names | Unique |
Constraints
Allowed Parent Dependencies
- Builder
ContentProjectBuilderDefaults
Overview
ContentProjectBuilderDefaults:
file containing project defaults properties
Design
- Super Type
- ContentProjectBuilderSetting
| Role | Concrete. (Objects can be created.) |
| Instance Names | Unique |
Attributes
Exported Attributes
| Name | Property |
|---|---|
| defaults | settingValue |
ContentProjectBuilderTemplateDir
Overview
ContentProjectBuilderTemplateDir:
file containing project template files
Design
- Super Type
- ContentProjectBuilderSetting
| Role | Concrete. (Objects can be created.) |
| Instance Names | Unique |
Attributes
Exported Attributes
| Name | Property |
|---|---|
| templateDir | settingValue |


