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.
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.
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.rpmreaderThe 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
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"
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.
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.
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