This documentation supports the 20.02 version of BMC Helix Platform.

To view the documentation for the current version, select 20.08 from the Product version menu.

Creating a smart library of reusable components

You can create a smart library using BMC Helix Platform and it can be used as a reusable building block for building applications.

To create a smart library, perform the following steps:

  1. Create a library project.
  2. Deploy the library project.
  3. Create the required record definitions for the library. See Defining record definitions to store and manage data.
  4. Create the required view definitions for the library. See Defining the user interface through view definitions.
  5. Package the library.

To create a library project

You can create source files for a library project using Maven archetype. Create a directory to store the project code.

Note

BMC recommends that you should not create the the library project in the sdk folder.

  1. On the command prompt, navigate to the directory created.
    For example: C:\projects
  2. To create project, run the following command:

    mvn archetype:generate -DarchetypeGroupId=com.bmc.arsys -DarchetypeArtifactId=rx-sdk-archetype-lib -DarchetypeCatalog=local
    Archetype ArgumentDescription
    -DarchetypeGroupId=com.bmc.arsysMaven uses BMC archetypes
    -DarchetypeArtifactId=rx-sdk-archetype-libSelects the library archetype. This sets the POM file to create a library package and does not generates a working UI.

    -DarchetypeCatalog=local

    Uses only the local catalog
  3. The command starts the archetype plugin in interactive mode and prompts for the following options:

    Property DescriptionExample Values
    groupId

    Project group ID. The ID usually follows the naming conventions of Java package names.

    Note: You must provide the Developer ID as the groupID value.

    com.example
    artifactId

     Project ID that is used as a part of filename. It usually has a short name as the project is already name spaced by the groupId.

    Note: The artifactId cannot be a combination of '-' (hyphen) and numeric character. For example, work-order-lib-12 is not a valid artifactId. 

    work-order-lib
    version

    Project version. You can provide the value in any format (major.minor or major.minor.maintenance).

    1.0-SNAPSHOT
    package

    Default Java package for the project. The default value is groupId value.

    com.example
    name

    Bundle name. This is used by the archetype to display the name of the application on the login page.

    Work Order

    Confirm the configuration of all the properties.

After you create a new project, you should create a deployment package and deploy the package to BMC Helix Platform server.

To deploy the library project

To built and deploy the library project, navigate to the project directory and run the following command:

mvn clean install -Pdeploy 

For example:

\projects> cd suggestion-box
\projects\suggestion-box> mvn clean install -Pdeploy

Once the build is complete, verify that the library is available in the BMC Helix Innovation Studio.

To package the library

To create a deployment package for the library, on the command prompt, navigate to the library project and run the following command:

mvn install -Pexport -Pdeploy

For example:

projects> cd work-order-lib

work-order-lib> mvn install -Pexport -Pdeploy

The deployment package is created in the target folder located in the library project directory.

For example, the deployment package for work-order-lib is located at projects\work-order-lib\package\target\com.example.work-order-lib-1.0-SNAPSHOT.zip

The deployment package zip file contains the code bundle jar file and the def file which consists the definitions.

For example, com.example.work-order-lib-1.0-SNAPSHOT.jar file and com.example.work-order-lib-1.0-SNAPSHOT.def file.

Related topics

Creating a tailorable Digital Service application using definitions

Creating a Project using Maven and the Archetype

Was this page helpful? Yes No Submitting... Thank you

Comments