Open.ControlTier > ModuleForge
 

AtgProjectBuilder

Builds and manages projects that use the ATG solution library

Overview

Open in Workbench AtgProjectBuilder: Builds and manages projects that use the ATG solution library

AtgProjectBuilder 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 Atg Module Library.

Obtaining the ATG solution library

Follow the steps below to obtain and install the content library.

1) Download the desired library jar file from Sourceforge:

Atg Module Library file release

2) Run the Register command specifying the following arguments:

ad -p project -t ProjectBuilder -o atg -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 atg -c load-library -- \
        -jar /path/to/downloaded/atg-version-seed.jar

The destination project should now have the ATG Solution Library types loaded.

Using the ATG Solution Library

If you do not have the ATG Solution Library types loaded, see the preceding section.

After the ATG Solution Library is installed, begin using the types in the library beginning with AtgProjectBuilder:

1) Run the Register command specifying the following arguments:

 ad -p project -t AtgProjectBuilder -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 AtgProjectBuilder -o name -c generate-objects -- \
        -name aName -defaults /path/to/your/defaults.xml -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 AtgUpdater -o aName -c BuildAndUpdate -- \
        -buildstamp buildstamp

Note
Optionally, you can upload the job definition to Job Center. The generate-objects command will have also generated a name-job.xml. Login to JobCenter and push the "Create a new Job" button and upload the name-job.xml file.

The generate-objects command reads two template files and a defaults.xml 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 AtgProjectBuilder -o object -c generate-objects --\
         -name aName -defaults /path/to/defaults.xml -load
      

Yields an object model like so in the project:

	+aName [AtgUpdater]
          |
          + aName [ConentBuilder]
          |  |
          |  |-aName [BuilderPackageInstallroot]
          |  |-aName [BuilderScmConnection]
          |  `-aName [BuilderScmModule]
          |
          ` aName [AtgSite]
             |
             `-aName [AtgDeployment]
      

The -defaults option specifies the defaults.xml file to use in conjunction with a object.template.xml file and provides a set of properties used during the generation process.

Example: defaults.xml

	#
	# Common name given to generated objects
	common.name=${opts.name}
	#
	# AtgBuilder settings
	#
	scmConnection=http://svn/repos/example-content
	scmModule=${opts.name}.war
	packageInstallroot=/apps/${opts.name}
	#
	# deployment locations
	# 
	common.node=${framework.node}
	AtgBuilder.node=${framework.node}
	AtgDeployment.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 AtgProjectBuilder

Constraints

Allowed Child Dependencies

  • BuilderBuildFile1
  • BuilderBuildTarget1
  • BuilderPackagePurgeRegex1
  • 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}/AtgProjectBuilder/lib/build.xml
buildTarget all
defaults ${modules.dir}/AtgProjectBuilder/templates/defaults.xml
docbase ${env.CTIER_ROOT}/src/doc
forresthome ${env.FORREST_HOME}
organizationDescription ControlTier Open Source project
organizationName Open.ControlTier
organizationURL http://open.controltier.com
projectDescription ATG Solution Library 1.3
projectName atg
projectURL http://open.controltier.com
scmBinding svn
scmConnection https://moduleforge.svn.sourceforge.net/svnroot/moduleforge/atg/branches/1.3
scmModule atg
stageextension jar
stagefilebase .*
templateDir ${modules.dir}/AtgProjectBuilder/templates

Commands

Note
Commandline options displayed in square brackets "[]" are optional. If an option expects arguments, then angle brackets are shown after the option "<>". Any default value is shown within the brackets.

Related Types

The following types are defined for use with AtgProjectBuilder.

AtgProjectBuilderSetting

Overview

Open in Workbench AtgProjectBuilderSetting: A AtgProjectBuilder setting.

Design

Super Type
Setting
Role Abstract. (Objects cannot be created.)
Instance Names Unique

Constraints

Allowed Parent Dependencies
  • Builder

AtgProjectBuilderDefaults

Overview

Open in Workbench AtgProjectBuilderDefaults: file containing project defaults properties

Design

Super Type
AtgProjectBuilderSetting
Role Concrete. (Objects can be created.)
Instance Names Unique

Attributes

Exported Attributes
Name Property
defaults settingValue

AtgProjectBuilderTemplateDir

Overview

Open in Workbench AtgProjectBuilderTemplateDir: file containing project template files

Design

Super Type
AtgProjectBuilderSetting
Role Concrete. (Objects can be created.)
Instance Names Unique

Attributes

Exported Attributes
Name Property
templateDir settingValue