Set up source extraction Ant script
The WebSphere Commerce Build tool requires a custom source extraction Ant build file. Sample scripts can be found in...WCB_installdir/extract
SCM Sample script CVS wcbd-sample-extract-cvs.* ClearCase wcbd-sample-extract-clearcase.* Local file system wcbd-sample-extract-local.* Subversion wcbd-sample-extract-svn.* Git wcbd-sample-extract-git.*
If no sample scripts are provided for our SCM, we can develop a custom script.
Before beginning
For Git support.
- Install a Git client and ensure the Git commands are in the system or user path.
- Clone the Git project to your local machine, and make sure the git pull command can be successfully executed.
Use the ssh protocol to communicate with Git. Other protocols, such as https, are not supported.
- If we are using an alternative Git configuration, we can enable it by customizing the Ant script extract-git.xml.
Task info
The following steps use these conventions:
- Application specific scripts or property files are distinguished by application type. In following steps, apptype stands for the application type that is currently being built. It could take the values ts, crs, search, xc or data.
- scm refers to the method by which the source code is extracted. The scm can be local or any supported SCM type, for example, cvs, svn, or git.
In the following steps, scm refers to one of cvs, clearcase, local, or svn.
Procedure
- Set security-sensitive configurations that will be used in the extract process..
- If file...
WCB_installdir/extract/wcbd-sample-extract-scm.private.properties
...exists, copy the file as...
WCB_installdir/extract-scm-apptype.private.properties
For example,
extract-svn-ts.private.properties
- Open the file with a text editor and configure the properties according to the comments in the file.
- Set non-sensitive configurations that will be used in the extract process.
- Copy file...
WCB_installdir/extract/wcbd-sample-extract-scm.properties
...as...
WCB_installdir/extract-scm-apptype.properties
For example,
extract-svn-ts.properties
- Open the file with a text editor and configure the properties according to the comments in the file.
- Copy...
WCB_installdir/extract/wcbd-sample-extract-scm.xml
...as...
WCB_installdir/extract-scm.xml
For example,
extract-svn.xml
- Edit file...
WCB_installdir/extract-scm.xml
...and replace the name attribute of the root project element from wcbd-sample-extract-scm to extract-scm. For example, if the SCM is svn, then the WCB_installdir/extract-svn.xml should have the following line:
<project name="wcbd-sample-extract-svn" default="all">
...changed to...
<project name="extract-svn" default="all">
Related concepts
WebSphere Commerce Build tool repository structure
Advanced build features
Related tasks
Configure packaging settings
Build packages
Related reference
Build configuration references