COSMOS Developer's Guide


Setting up the Development Environment for the BTG

This topic will describe the steps needed to set up a development environment within Eclipse to both run and work on the BTG.

All of the following packages are available from the dev.eclipse.org CVS in the /cvsroot/technology repository. This repository has web access here.


Setting up the BTG

The BTG will be used to read various sources into SDD fragments and aggregate their content into a single SDD. The Aggregator is still under development; these examples will serve as a guide to use the readers and also how to kick off the merging process from within the Aggregator.

Requisite Packages

In order to use the BTG you will need to checkout the following projects from the Eclipse CVS at a minimum:


org.eclipse.cosmos.me.deployment.sdd.common.spi
org.eclipse.cosmos.me.deployment.sdd.common.validation
org.eclipse.cosmos.me.deployment.sdd.tooling.btg

Also you will need to pull down these packages if you wish to use them:


org.eclipse.cosmos.me.deployment.sdd.tooling.btg.aggregator
org.eclipse.cosmos.me.deployment.sdd.tooling.btg.plugin.sddreader
org.eclipse.cosmos.me.deployment.sdd.tooling.btg.plugin.rpmreader

Properties File

The BTG requires a properties file in order to operate. The format is as follows:

[org.eclipse.cosmos.me.deployment.sdd.tooling.btg]
OutputFileNameBase = ESR

followed by a list of the BTG plugins (i.e. the aggregator or any readers) you wish to invoke.

Example:

[org.eclipse.cosmos.me.deployment.sdd.tooling.btg.aggregator]
Enabled = true

[org.eclipse.cosmos.me.deployment.sdd.tooling.btg.plugin.sddreader]
Enabled = true
# Name of xml file to read from
FileName = C:\sdd1.xml

[org.eclipse.cosmos.me.deployment.sdd.tooling.btg.plugin.rpmreader]
Enabled = true
# Name of rpm file to read from
FileName = C:\sdd2.rpm

Command Line Arguments

The BTG requires that you specify the properties file's location with a command line argument. The format is as follows:

-propertiesFile "C:\BTG.ini"

Run Configuration

In order to run the BTG, you will need to create a run configuration for it within Eclipse. To do this, Click on the down arrow next to the run button in Eclipse and select run configurations. Then right click on Eclipse Application on the left, and select new. Call the new configuration whatever you'd like, I chose "btg". On the right under the main tab for the new configuration, make sure run an application is selected; specify the following application:

org.eclipse.cosmos.me.deployment.sdd.tooling.btg.application

Then under the arguments tab, clear out the program arguments section completely, and then add in the command line argument from above.

Using the Aggregator

The readers that are specified in the properties file will be invoked and their SDDs will be passed into the Aggregator's aggregateSDDData function within the Collection<SDDFragment> fragments variable. From there you can pass the fragments along to the DeploymentDescriptorType.merge(DeploymentDescriptor dd1, DeploymentDescriptor dd2) function. This will initiate the merging process.

RPM Reader Example

The RPM Reader will read in an RPM and convert it to an SDD, which can then be merged with other SDD's created by other readers.

You can specify its use in the properties file as such:


[org.eclipse.cosmos.me.deployment.sdd.tooling.btg.plugin.rpmreader]
Enabled = true
# Name of rpm file to read from
FileName = C:\sdd2.rpm


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]