Packaging files with the command-line
You must package your company files before you can export or import the company data.
- Syntax
$TOP/bin/runPackagingTool.sh --controlfilelocation=path_to_control_file --uploadlocation=path_to_upload_location --zippackage=true/false
- Parameters
- –controlfilelocation=path_to_control_file
- Specifies the control file location where path_to_control_file is the path to your control file.
- --uploadlocation=path_to_upload_location
- Specifies the upload location where path_to_upload_location is the path to your upload location.
- --zippackage=true/false
- Specifies whether the compressed file package is required.
The control file that you provide for the packaging tool has the same XML format as an import control file created by the environment export. You can refer to the ImportEnvControl.xml file in any export package that is created during the environment export for the format.
Inside the <File>
tag in this control file,
you must provide the complete path on the file system of the files
that are included in the package to be created. The “type” attribute
for the <Import>
tag provides the object type
of the objects whose description is provided in the files inside the <Import>
tag.
<Import enable="true" type="CATALOG">
<File>/Packaging_Tool/EXPORT_3/CATALOG/CATALOG.xml</File>
</Import>
You must also update all the files that have pointers to other files included in them.
Content data XML files
For the objects types catalog content, hierarchy content, lookup table content, and organization hierarchy content, the control file must provide a path of the XML file that in turn includes the path of the actual content files.
<Container>
<ContainerType>CATEGORY_TREE</ContainerType>
<ContainerName>Web</ContainerName>
<EntryDataFilePath>/Packaging_Tool/EXPORT_rde8/HIERARCHY_CONTENT/HIERARCHY_CONTENT_9206_DATA.csv</EntryDataFilePath>
<Encoding>UTF-8</Encoding>
</Container>
The tag <EntryDataFilePath>
provides
the complete path of the hierarchy content CSV file. Similar changes
are required for the XML files, which point to the CSV files for the
object types catalog content, lookup table content, and organization
hierarchy content. The absolute path of these data XML files must
be included in the control file that is mentioned in the Content data XML files section.
XML file for docstore
For the format of this file, refer to the DOCSTORE.xml file from any package that is created by environment export. This file can be located within the DOCSTORE directory in any export package. This file provides the path of the files to be imported in the docstore when this package is imported. You must provide one such file. The absolute path of this file must be provided in the control file that is mentioned previously.
<Doc type="any">
<LocalPath>/Packaging_Tool/EXPORT_rde19/DOCSTORE/FILES/1240493467 360-Preview</LocalPath>
<Action>CREATE_OR_UPDATE</Action>
<StorePath>/scripts/workflow/SalesWorkflow/Preview</StorePath>
<Attribs>
<Attrib name="CHARSET" value="UTF-8"/>
<Attrib name="LAST_MODIFIED_TIMESTAMP" value="14-APR-2009 19:29:13"/>
<Attrib name="COMPRESSED" value="false"/>
</Attribs>
</Doc>
In this case, you must provide the absolute
path of the file in <LocalPath>
tag so it can
be picked up by the packaging utility.
XML file for UDL content
This file provides
the path of the UDL content CSV files to be imported. The absolute
path of this file is provided in the control file. You must provide
the absolute path of CSV files in the tag <CSVFileName>
in
this file.
<UDL_CONTENT>
<Name>eCom_Delta_UDL</Name>
<ContainerType>CATEGORY_TREE</ContainerType>
<ContainerName>Emergency ColArea-Hierarchy</ContainerName>
<CSVFileName>/Packaging_Tool/EXPORT_5/UDL_CONTENT/CATEGORY_TREE_9208_811_DATA.csv</CSVFileName>
</UDL_CONTENT>
After the contents are provided, the packaging utility picks up the required files and packages them in a format that is understood by the Product Master environment import.
It is expected that you understand all the dependencies between objects and that you includes all the required object files within the control file so that they are included in the package.
Control file for map XML file
The control file provides the absolute path of the XML files for map objects. There is a one line reference for each of the map XML file provides the absolute path. The path should be changed to provide the absolute path of the XML files for maps. The format of this file is similar to any MAPS.xml file found within the maps folder in an exported package. The absolute path of this file must be given in the control file as mentioned in the Content data XML files section for the packaging utility.
/Packaging_Tool/EXPORT_20/MAPS/map1202.xml