• Close
    • Close

One of the more common questions that we get asked is what is the best approach to combining one or more commands in ConfigNOW?

For example lets say you wanted to combine the ‘create_domain’ command, with the ‘start_wls_admin’ command to create a new command called, ‘create_and_start_domain’, which first created the domain and then started the admin server.

The simplest way to achieve this is by using a custom ANT command file through the standard command extensions approach.  Check out the documentation if you are looking for more information on how to do this.

In the [ConfigNOW]/custom/commands/ant directory, create a new ANT file called whatever you like, I’m calling mine ‘combine_commands.xml’


<project name=”Combine two commands” basedir=”.”>

<property name=”ConfigNOW.home” location=”D:/Work/ConfigNOW/ConfigNOW/” />
<property name=”ConfigNOW.environment” location=”local” />
<property name=”ConfigNOW.configuration” location=”simple” />

<target name=”create_and_start_domain” description=”Create domain, start admin”>
<echo message=”Create domain” />
<exec dir=”${ConfigNOW.home}” executable=”${ConfigNOW.home}/ConfigNOW.cmd”>
<arg line=”create_domain ${ConfigNOW.environment} ${ConfigNOW.configuration}” />
<echo message=”Start WLS Admin” />
<exec dir=”${ConfigNOW.home}” executable=”${ConfigNOW.home}/ConfigNOW.cmd”>
<arg line=”start_wls_admin ${ConfigNOW.environment} ${ConfigNOW.configuration}” />



It is important when you create a command using ANT that you want to execute, that you include a description in the ANT target.  It is the description that ConfigNOW uses to determine if the target is one it wants to show in the menu.

You will probably also notice that this ANT file has three properties:

  • ConfigNOW.home
  • ConfigNOW.environment
  • ConfigNOW.configuration

Set as properties in the ANT file.  This is because in the 4.1 RC1 release these properties are not passed through from ConfigNOW to the ANT script (but the rest of the properties from your inherited configuration file are).  We are addressing this issue and you should see these properties set automatically from  ConfigNOW 4.1 RC2 onwards, for the time being just manually set them.

Leave a Reply