Skip to Content
When you use the Change management service of the Java Development Infrastructure your evening as a QA person can look like this:

    • Once this is finished you can assemble everything by just clicking the assemble button. This takes another 10 minutes.
    • Then the built SCA (Software Component Archive) appears in the Test queue where you can import it.

But before that I usually undeploy all the previous archives from the Test server to make really sure that the DC usages are correctly maintained. Another 10 minutes.

    1. Then you import the SCA into Test another 10 minutes.
    2. Test the software.
    3. After that you approve it and you can import it into production.
    4. Then you can manually forward the SCA to other tracks (if you wish).
    5. The problem with this tasks are that there is not much to do, but usually a long wait time in between. (which can drive you nuts…)

      As I had the orders that each morning a new software had to be ready on Test (nightly builds) I was always the last one to sit at his desk and administrate the simple CMS workflow. Finally when I got enough of seeing all those happy co-developers heading for home, I invested some time to automate the tasks of importing, assembling and approving.

My first try was to use the CMS command line client which is delivered in the SAP /eclipse/tools folders.

A small readme.txt explains how it works. Basically you can quite easily script all the actions you do manually in the web ui with these batch commands.

This is an awesome features.

Still it has some shortcomings because it is hard to put some logic in their as one step always depends on a successfull outcome of a previous one.

Because I always do an undeployment before deployment this undeployment was only to happen when the assembly step of the CMS workflow was successfull.

Finally I ended up with some simple ANT tasks wrapping the commandline client that allow me to interrupt the workflow when the previous step was not successfull.

I also added an SDM undeployment task which is really usefull when your SCA already is quite large.

When you undeploy everything beforehand you really get sure that you deploy the current version and actually we always have problems deploying our SCA without first undeploying the previous one.

So here is my example build.xml:
      <property name=”sdm_dc_pattern” value=”dc1/.,dc2/.“>
          <fileset dir=”$“>
          <include name=”lib/*.“>
          <fileset dir=”$“>
               <include name=”program/lib/*/.jar”></include>
          <pathelement location=”sdmAnt.jar”></pathelement>
          <pathelement location=”$
          <connect cmsUrl=”$” domainid=”$” trackid=”$” user=”$” password=”$“/>
                  pattern=”$“>Installation Download ANT to your computer if you have not done so already. Download the tasks from here.

Unzip the and put the sdmAnt.jar and the cmsAnt.jar in the same directory as your build.xml.

In the cmstool directory run the copyjars.bat file.

Probably you will need to set the environment variable SAPDEVSTUDIOHOME first. Adjust the build.xml to your current environment. You have edit the value of the properties SDM_HOME and CMS_HOME to edit the path to your SDM Home, the server of the CMS and the server name of the SDM. You have to adjust the pattern of the undeploy task. It takes a regular expression. Each DC that fits this pattern will be undeployed.

Lastly you can write such a batch file where you set the correct path and execute the Ant script:

Good luck!

To report this post you need to login first.


You must be Logged on to comment or reply to a post.

Leave a Reply