You can import custom extensions into a new or existing developer toolkit environment to
add custom extensions from another developer toolkit environment or source control repository to
help you quickly set up or update the environment.
The process that you need to complete for importing extensions depends on whether you want to
import extensions into a new developer toolkit environment that you are planning to set up or into
an environment that is already set up:
- If you are setting up a developer toolkit environment, you can obtain the extensions to import
from Sterling Order Management System Software where you downloaded the development toolkit that you are using
to set up the environment or from an external customization package.
- To include extensions from the Sterling Order Management System Software environment, select the option
Include customizations when you run the process to download the developer
toolkit from the environment.
- To include extensions from an external customization package, add the full path to the
extensions.jar package when you are configuring the
devtoolkit_setup.properties file as part of setting up the developer toolkit
environment. For more information, see Setting up the Integrated Developer Toolkit environment.
- For importing into a developer toolkit environment that is set up, complete one or both of the
processes in the following procedure.
Procedure
- Optional:
Import extensions that are packaged within an extensions Java archive (JAR), such as an
extensions.jar that is exported from another developer toolkit environment or
provided by your SaaS Extensions Support Provider.
The archive can come from any source, but must conform to the required package structure. To
ensure that the archive conforms to this structure, ensure that the package is created with the
export capability of a developer toolkit environment for the Sterling Order Management System Software. For
more information about exporting extensions, see Exporting custom extensions from a developer toolkit environment.
-
In a command-line utility, go to the runtime/bin directory of your
developer toolkit environment.
Remember: In case of docker-based developer toolkit, runtime
directory is the extracted runtime directory.
-
Run the following command:
./sci_ant.sh -f
../devtoolkit/devtoolkit_extensions.xml import
-Dpackage=extension_archive_path
Where extension_archive_path is the full path to the
extensions.jar archive that you want to import.
- Optional:
Import custom extensions from a project that is set up for extension files and that is checked
out of your source control repository:
If you want to import from a project, you must manually structure your source code repository
project to match the expected project structure. The project must conform to the following structure
for you to successfully import the project:
<project root directory>
|-- files
| |-- extensions
| | |-- global
| | |-- <custom extension files>
| | |-- resources
| | |-- <custom resource files, such as any custom log4jconfig xml>
| |-- properties
| | |-- customer_overrides.properties
| | |-- <any other allowed overridable property file(s)>
| |-- repository
| |-- eardata
| |-- <relative path to any extension directory>
|--src
| |-- <custom source java files in proper package structure>
|--lib
|--<additional jar files for compiling custom source files>
- Include any custom extension files within the files/extensions/global
directory.
- Include any custom Java source files in the correct package in the src
directory.
- Include the custom JAR files that are and required for compilation of custom source files
directly within the lib directory and not within any sub-directory.
-
In a command-line utility, go to the bin directory of your target
developer toolkit environment.
-
Run the following command to deploy the extensions directly from the project into your
developer toolkit environment. Here, project_path is the
full path to the project root directory.
./sci_ant.sh -f ../devtoolkit/devtoolkit_extensions.xml importfromproject -Dprojectdir=project_path
When the command runs, custom source files are compiled into a
custom_impl.jar archive and copied to the
<runtime>/jar/custom_jars/1_0 directory along with other dependent Java
archives that are in the lib directory. These copied archives are added to all
class paths in the runtime component.
The importfromproject target also performs a set of validations that run during
the export process. These validations ensure that the integrity and correctness of the customization
files before they are compiled and deployed. For more information, see Validation checks.
If this command fails, such as from compilation errors, the project directory not conforming to
the structure specified, or other error, deploy the extensions manually to the runtime
component.