Setting up source extraction Ant script
The HCL Commerce Build tool requires you to provide a custom source extraction Ant build file. This file is run as part of the build process.
The WCB_installdir/extract directory includes sample
scripts for some SCMs:
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 your SCM, you can develop a custom script. For more information, see Customizing the packaging process.
Before you begin
Note: For Git support,
- As a prerequisite, install a Git client and ensure the Git commands are in the system or user path.
- Before running a WCB build, clone your Git project to your local machine, and make sure that the
git pull command can be executed with success. Use the
ssh
protocol to communicate with Git. Other protocols, such ashttps
, are not supported. - If you are using an alternative Git configuration, you can enable it by customizing the Ant script extract-git.xml.
About this task
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
ordata
. - 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
, orgit
.
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..
-
Set non-sensitive configurations that will be used in the extract process.
-
Copy
WCB_installdir/extract/wcbd-sample-extract-scm.xml
as WCB_installdir/extract-scm.xml.
For example,
extract-svn.xml
-
Open WCB_installdir/extract-scm.xml
with a text editor 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:
changed to:<project name="wcbd-sample-extract-svn" default="all">
<project name="extract-svn" default="all">