List of Targets
This list divides the SDK targets into the following categories:
Project Management Targets
The project management targets provided with the SDK include:
addMigrateData
Use this target to upgrade a project data from one release (the source) to another (the target). Check the Sterling Multi-Channel Selling Suite Implementation Guide to see if an upgrade is supported for your release. To run this target, enter:
sdk addMigrateData DEBS_m_to_DEBS_nWhere m is the release number of the source release and n is the target release. For example:
sdk addMigrateData DEBS_7_0_2_to_DEBS_7_1addMigrateSegData
Use this target to upgrade segmentation project data from one release (the source) to another (the target). Check the Sterling Multi-Channel Selling Suite Implementation Guide to see if an upgrade is supported for your release. To run this target, enter:
sdk addMigrateSegData DEBS_m_to_DEBS_nWhere m is the release number of the source release and n is the target release. For example:
sdk addMigrateSegData DEBS_7_0_2_to_DEBS_7_1cleandeploy
Use this target to build the current project and copy it over to the deployment directory of your servlet container. This target deletes the contents of the build directory and any pre-existing deployment of the project in the servlet container. To run this target, enter:
sdk cleandeploycopyproject
Use this target to make a copy of the current project. To run this target, enter:
sdk copyproject <Name of new project>After running this target to create a new project, then the first time you run the merge target, make sure to run it with the -clean flag: that is:
sdk merge -cleancreateCustomDB
Runs the custom SQL scripts that you have created as part of your project. To run this target, enter:
sdk createCustomDBcreateDB
Creates the transactional database schema in the target database. The database type used is determined by the value of the DB_TYPE property specified in the project_env.properties file. To run this target, enter:
sdk createDBMake sure that you double-check the entries for the database properties in the project_env.properties before running this target: any existing data will be erased as the database schema is created.
To run this target, make sure that you have the appropriate database client applications installed. See the Sterling Multi-Channel Selling Suite Implementation Guide for further information.
createSegDB
Creates the segmentation database schema in the target database.The database type used is determined by the value of the DB_TYPE property specified in the project_env.properties file. To run this target, enter:
sdk createSegDBThis target applies to Release 8.x and later.
customize
Copies files from the appropriate sdk_home/releases/ directory to the corresponding directory under the project label. To run this target, enter:
sdk customize <name of file>This target copies files from the release WAR file or from the release overlay directory: if the file exists under the release overlay/ directory, then this copy takes precedence.
customizeFile
Copies files from the appropriate sdk_home/releases/ directory to the corresponding directory under the project label. Specify the full pathname of the file.To run this target, enter:
sdk customize <pathname>\<name of file>This target copies files from the release WAR file or from the release overlay directory: if the file exists under the release overlay/ directory, then this copy takes precedence.
default-dist
Called by the distWar command.
deleteproject
Removes the project and build directory for the named project. To run this target, enter:
sdk deleteproject <name of project>deploy
This target should only be used when you run Apache Tomcat on the same machine as the SDK. It copies the files from the sdk_home/builds/project/ directory over to the servlet container directory. To run this target, enter:
sdk deployTo use this target you must specify the container.home and container.version properties in the sdk_home/local-sdk.properties file. For example:
container.version=4.1
container.home=C:/Program Files/Apache Tomcat 4.0The container version should be in the form m.n. You must use forward slashes on both UNIX and Windows systems.
dist
Creates a WAR file from the merged project and puts it in the sdk_home/dist/ directory. The WAR file is named with a timestamp. To run this target, enter:
sdk distAn optional -release flag will set the name of the generated WAR file to Comergent.war (releases earlier than 8.x) or Sterling.war (releases 8.x and later). If the container.name property is set to “weblogic” and the container.version property is set to “7.0.2” or “7.1”, then the generated WAR file is created with the JSP pages under web/ rather than WEB-INF/web/.
distData
Use this target to create a JAR file to use with the data loading tool. To run this target, enter:
sdk distDatadistSQL
Use this target to create a JAR file to use with the schema creation. To run this target, enter:
sdk distSQLdistWar
Use this target to create a WAR file for your project. To run this target, enter:
sdk distWareclipseSetup
Use this target to enable a project to work with the Eclipse plugin. See CHAPTER 3, “Eclipse Plugin” for more information about the Eclipse plugin. This target creates files within the sdk_home/projects/project/ directory so that the SDK project can be run as an Eclipse project. To run this target, enter:
sdk eclipseSetupThe target creates a .project configuration file that specifies Eclipse properties for the project, and a .classpath configuration file that specifies the classpath that should be used when using Eclipse to build and debug the project.
encryptVal
Use this target to encrypt strings. To run this target, enter:
sdk encryptVal <string to be encrypted>The result is an encrypted form of the string. The string is encrypted using a default encryption scheme that is provided with the Software Development Kit.
env.setDBType
Sets the DB_TYPE property in the current project_env.properties file. It also modifies the DataServices.xml file to comment in or out the JDBCDriver elements. To run this target, enter:
sdk env.setDBType <Database type>Valid values for the database type parameter are:
DB2: for installations running against IBM DB2 Universal Database connecting through a JDBC driver.
MsSql: for Release 6.3.1 and earlier installations running against SQL Server and connecting through the MSSql DLL.
MSSQLJDBC: for Release 7.0.1 and later installations running against SQL Server and connecting through a JDBC driver.
ODBC: for Release 6.4.1 through 7.2 installations running against SQL Server and connecting through the ODBC DLL.
Oracle: for installations running against Oracle Database Server connecting through a JDBC driver.
The optional -all flag sets the DB_TYPE property for all environments in the project. For example:
sdk env.setDBType Oracle -allexamine
Copies files from the release WAR file or from the release overlay directory to a sdk_home/releases/release/examine/ directory. This is a convenience method so you can examine files without copying them over to the project directory. To run this target, enter:
sdk examine <name of file>fastcleandeploy
This target is the equivalent of running merge -clean followed by fastdeploy. To run this target, enter:
sdk fastcleandeployfastdeploy
This target should only be used when you run Apache Tomcat on the same machine as the SDK. Note that it behaves differently depending on your version of Tomcat as follows.
For Version 4.1.x, this target:
Modifies the Tomcat server.xml configuration file by specifying that the Comergent context uses the files under the sdk_home/builds/project/ directory as the Web application.
Adds an XML file to the container_home/webapps/ directory that declares the Comergent context.
For Version 5.5.x, this target:
Adds an XML file to the container_home/conf/Catalina/localhost/ directory that declares the Comergent context.
Modifies the sdk_home/builds/project/WEB-INF/web.xml configuration file to point to a local copy of the prefs.xml configuration file.
To use this target you must specify the container.name, container.home, and container.version properties in the sdk_home/my-sdk.properties file. For example:
container.name=tomcat
container.version=4.1
container.home=C:/tomcat4129container.name=tomcat
container.version=5.5
container.home=C:/tomcat559Note that this target also changes the Tomcat server configuration using the container.server properties. Check these before running fastdeploy.
To undo the effect of this target, you must remove the Comergent.xml from the appropriate directory and remove the appropriate Context element from the server.xml file.
fileConvert
For Release 7.0 and higher, use this target to convert Java and JSP files so that they use the public APIs supported by the current release. This target takes a parameter specifying the conversion path. For example:
sdk fileConvert 702to71converts Release 7.0.2 Java and JSP files to use the public APIs supported by Release 7.1.
fileConvert67to70
Use this target to convert Java and JSP files so that they use the public APIs supported by Release 7.0.1. To run this target, enter:
sdk fileConvert67to70When this target encounters a file that needs to be upgraded it saves a copy of the original file with the suffix “.orig”.
generateBean
Generates beans from the sdk_home/builds/project/WEB-INF/schema/ files. Before generating the beans, any customized business objects in sdk_home/projects/project/WEB-INF/schema/ and sdk_home/projects/project/WEB-INF/schema/custom/ are merged with the data objects in sdk_home/builds/project/WEB-INF/schema/. To run this target, enter:
sdk generateBeanNote that if you add data objects to the schema, then you must add the corresponding data elements and recipes to the DsDataElements.xml and DsRecipes.xml configuration files in the sdk_home/projects/project/WEB-INF/schema/custom/ directory. You must run the merge target before running the generateBean target because the schema files are read from the builds directory for the project.
generateDTD
Generates the DTDs from the sdk_home/builds/project/WEB-INF/schema/ files. Before generating the DTDs, any customized data objects in sdk_home/projects/project/WEB-INF/schema/ and sdk_home/projects/project/WEB-INF/schema/custom/ are merged with the data objects in sdk_home/builds/project/WEB-INF/schema/. To run this target, enter:
sdk generateDTDgenerateIndexFile
Generates the SDK index page. This is the main home page for the SDK documentation and information about your releases and projects. To run this target, enter:
sdk generateIndexFilegenerateJSPResourceBundles
Use this target to generate JSP resource bundles for internationalizing a project. This target creates .properties files for each .jsp in your project directory. You can then bundle the .properties files for translation. To run this target, enter:
sdk generateJSPResourceBundlesgetVal
Use this target to retrieve the current value of a property in your project. To run this target, enter:
sdk getVal <name of property>The name of the property should be specified as its qualified location in the property tree, but without the “Comergent.” root: for example, “C3_Campaigns.CampaignSMTPServer”.
help
Use this target to obtain a list of executable targets. If you provide the name of a target as a parameter, then you can read what the target does and what parameters it takes. To run this target, enter:
sdk helpsdk help <name of target>importProperties
Use this target to generate a prefs.xml file using your project’s current properties. To run this target, enter:
sdk importPropertiesinfo
Use this target to query an installation JAR file: the target reports on the vcersion information provided by the version.xml file contained in the JAR file. To run this target, enter:
sdk info <location of JAR file>install
Copies the files from the Sterling Multi-Channel Selling Suite Web application WAR file to the appropriate sub-directory of the sdk_home/releases/ directory. This target supports two modes:
A mode to support installations of SDK Archive files built to the Version 2.0 standard. You can install releases, documentation, tools, and hot fixes using this mode. To run this target in this mode, enter:
sdk install <location of JAR file>A backward-compatible mode to support installations of older releases. To run this target in this mode, enter:
sdk install debs-6.3.1 <location of Comergent.war file>
<location of Source.jar file>If you install a hot fix using this target, then when you next build your project, you must run merge -clean or merge -full.
installDB2
Updates the project files to include the appropriate JDBC driver JAR file. When new projects are created, then JAR file is copied over to the lib/directory of the project. To run this target, enter:
sdk installDB2 <full path to JAR file>installMsSql
Copies the MsSqlJNI.dll file to the system32/directory of the machine on which the SDK is running. In Version 2.0.1and higher, a separate target, env.setDBType, is used to change the DataServices.xml file. To run this target, enter:
sdk installMsSql
This does not copy the MsSqlJNI.dll file to the servlet container machine. Copying this file to the system32/ directory of the servlet container machine must be done manually.
installMSSQLJDBC
Installs the JDBC JAR file provided as the parameter into the overlay/ directory of the current release, and WEB-INF/lib/ directory of the current project. When new projects are created, then the JAR file is copied over to the lib/directory of the project. To run this target, enter:
sdk installMSSQLJDBC <full path to JAR file>installODBC
Copies the ODBCJNI.dll library file to the system32/ directory of the machine on which the SDK is running. Use the windows.system.dir property in my_sdk.properties file to specify where this (usually C:/WINDOWS/system32 or C:/WINNT/system32). To run this target, enter:
sdk installODBCinstallOracle
Installs the JAR file provided as the parameter into the overlay/ directory of the current release, and WEB-INF/lib/ directory of the current project. When new projects are created, then the JAR file is copied over to the lib/directory of the project. To run this target, enter:
sdk installOracle <full path to JAR file>loadAnderelDB
Used for development and testing purposes. This target loads the Anderel reference data for the specified project. To run this target, enter:
sdk loadAnderelDBloadDB
This target will load data for the specified project. It executes the MinimalData.lst file in the sdk_home/builds/project/WEB‑INF/scripts/ directory to load a minimal set of data. Developers should extend the MinimalData.lst file to include references to any additional XML files they require to be loaded as part of a database initialization. To run this target, enter:
sdk loadDBBy default, only the minimal data set as defined by the Sterling Multi-Channel Selling Suite is loaded.
loadMatrixDB
Used for development and testing purposes. This target loads the Matrix reference data for the specified project. To run this target, enter:
sdk loadMatrixDBloadSegDB
This target loads the segmentation database created with the createSegDB target. This target applies to Release 8.x and later.
loadSegMatrixDB
Used for development and testing purposes. This target loads the segmentation database created with the createSegDB target with Matrix reference data. To run this target, enter:
sdk loadSegMatrixDBmerge
Merges in the customizations from the sdk_home/projects/project/ directory. It compiles any classes that are either modifications of a Sterling Multi-Channel Selling Suite Java source or new class files written as part of the customization. To run this target, enter:
sdk mergeIf you run this target with the -clean flag, then the sdk_home/builds/project/ directory is deleted, and the project is built against a fresh copy of the current release. If you have installed any hot fixes into the release, then you must run merge -clean to ensure that the hot fix is built into the build of the project.
If you run this target with the -light flag, then only the project Java code is compiled.
methodology
This target copies the methodology template files.
migrateDB
Use this target to upgrade a project’s transactional database schema from one release (the source) to another (the destination). Check the Sterling Multi-Channel Selling Suite Implementation Guide to see if an upgrade is supported for your release. To run this target, enter:
sdk migrateDB DEBS_m_to_DEBS_nHere m is release number of the source release and n is the destination release. For example:
sdk migrateDB DEBS_7_0_2_to_DEBS_7_1In Release 8.x and later, the migrateDB target migrates the transactional database to the new release.
migrateSegDB
Use this target to upgrade a project’s segmentation database schema from one release (the source) to another (the destination). Check the Sterling Multi-Channel Selling Suite Implementation Guide to see if an upgrade is supported for your release. To run this target, enter:
sdk migrateSegDB DEBS_m_to_DEBS_nHere m is release number of the source release and n is the destination release. For example:
sdk migrateSegDB DEBS_7_0_2_to_DEBS_7_1In Release 8.x and later, the migrateSegDB target migrates the segmentation database to the new release.
newproject
Creates the new project sub-directories. It takes the following argument:
This target copies files from the appropriate release to the sdk_home/builds/ directory for use in this project. The release is set in the default.debs.version property of sdk-settings.properties. It also generates custom *.sql files that can be used to manage any customizations that you want to make to the database schema. To run this target, enter:
sdk newproject <name of new project>project
This target is used to invoke a target that is defined in a build.xml file that is present in the project. It provides a way of provding custom targets that are specific to a release or a project. To run this target, enter:
sdk project <name of target>The named target must be defined in the sdk_home/projects/project/build.xml file (if it exists).
project.analyze
Use this target as part of preparation for upgrading your project. This target examines the current project, identifies files that have been customized, and creates two files in the sdk_home/reports/project/upgrade directory: project_files_list.xml, containing the list of the changed files, and project_status.html for viewing the list. Use this list to ensure that your customizations are preserved during the upgrade process.
project.createHotFix
Creates a JAR file that can be applied to a release as a patch using the install target. You must provide a designator that identifies this hot fix: this can be a bug number or other unique identifier. To run this target, enter:
sdk project.createHotFix <hot fix designator>The resulting JAR file is created in the sdk_home/dist/ directory. Its name is hotfix_<Hot fix designator>_<Timestamp>.jar. An optional flag -release removes the timestamp from the name of the hot fix JAR file. For example:
sdk project.createHotFix -release 5208project.generateIndexFile
This target generates a new index file for the specified project. To run this target, enter:
sdk project.generateIndexFile debs-<release>sdk generate.generateIndexFile debs-8.0project.preCompileAllJSPs
This target precompiles all JSPs in your project. To run this target, enter:
sdk project.preCompileAllJSPssetupDB
This target creates the transactional and segmentation databases and loads them with the reference dataset. This target applies to Release 8.x and later.
The setupDB target runs the following targets in this order:
Note that setupDB runs the loadDB target to load the transactional database with the minimal data set. If you plan to use the Matrix reference data, you must run each of the setupDB targets manually, substituting loadMatrixDB for loadDB.
sdk setupDBsetupMatrixDB
This target creates the transactional and segmentation databases and loads them with the Matrix reference dataset. This target is used for development and testing purposes. This target applies to Release 8.x and later.
The setupMatrixDB target runs the following targets in this order:
sdk setupMatrixDBProject Migration Targets
The following project targets are used to upgrade a project from one release of the Sterling Multi-Channel Selling Suite to another:
project.premigrate
Performs an analysis of the project by comparing it to the new release to which you want to upgrade it. It takes one argument: the release to which you want to upgrade the project. The target release must support upgrades from the current release.
sdk project.premigrate debs-6.7project.migratefiles
Migrates the files that require modification in the project.
Make sure that you have your three-way merge tool set up correctly before running this target. See Merge Tools for more information.
When this target encounters a file that needs to be merged it saves a copy of the original file with the suffix “.save”.
project.postmigratecleanup
This target tidies up temporary files and directories generated by the migration process.
In general, after you have migrated a project to a new release, make sure that you switch to using the new release (using the switchdebs target) and then run merge ‑clean to delete the current project builds directory for the project and re‑populate it with the new release. If you are working with the Eclipse plugin, then you should also run the eclipseSetup target: this will regenerate the .classpath configuration file against the new release.
project.merge
Merges the current project with a second project to create a third. To run this target, enter:
sdk project.merge <second project> <new project>project.mergfiles
Run this target after you run the project.merge target.
projectjar
Use this target to JAR up the current project. To run this target, enter:
sdk projectjarServlet Specification Targets
The setservletspec targets ensure that when the Sterling Multi-Channel Selling Suite Web application Sterling.war file is created, it conforms to the servlet specification suitable for the intended servlet container. You must run a setservletspec target for each project, so that if you switch projects or create a new project, make sure that you run one of these targets after switching to the new project. The Sterling Multi-Channel Selling Suite Implementation Guide provides a summary of which versions of the servlet specification are supported by each servlet container.
setservletspec2.2
Switches to using the J2EE Servlet Specification 2.2. To run this target, enter:
sdk setservletspec2.2setservletspec2.3
Switches to using the J2EE Servlet Specification 2.3. To run this target, enter:
sdk setservletspec2.3setup
Generates the my_sdk.properties file. Run this target immediately after you install the SDK. To run this target, enter:
sdk setupTo migrate projects from an earlier installation of the SDK, enter:
sdk setup <sdk_home of Version 7.2>Projects in the Version 1.1 SDK are copied over to the new SDK. You must run merge -clean on these migrated projects to ensure that the builds directory is created for each project.
setVal
Use this target to set the value of a property used by a Release 7.0 or later installation of the Sterling Multi-Channel Selling Suite. To run this target, enter:
sdk setVal <name of property> <value of property>startPreferencesTool
Use this target to run the Preferences tool used to set values in the prefs.xml configuration file. To run this target, enter:
sdk startPreferencesToolswitchdebs
Changes the value of the default.debs.version property in sdk‑settings.properties. To run this target, enter:
sdk switchdebs <new release of DEBS, such as debs-6.3>switchenv
Changes the value of the deploy.environment property in the sdk‑settings.properties file. This property determines which project_env.properties file is used in building projects. To run this target, enter:
sdk switchenv <dev|local|prod|qa>switchproject
Changes the value of the project.name property in sdk‑settings.properties so that you can work on a different project. To run this target, enter:
sdk switchproject <new project name>switchproject-helper
Changes the value of the project.name property in sdk‑settings.properties so that you can work on a different project. To run this target, enter:
sdk switchproject-helper <new project name>touchfile
Use this target to update the timestamp of the specifed file(s). To run this target, enter:
sdk touchfileYou can use the “*” wild card character to match the name of more than one file in your project.
touchproject
Updates the timestamp of all the files in the current (as specified by the project.name property) project directory. This ensures that these files are all regarded as being newer than the corresponding files in the build directory, and hence they will be copied across to the build directory. To run this target, enter:
sdk touchprojectversion
Provides basic information about the SDK. To run this target, enter:
sdk versionUse the optional -check flag to test whether the SDK has been modified.