Creating a POM file for an external library

The Project Object Model (POM) file contains information about the external library and configuration details that are used by Maven to build the library.

Decision Intelligence Client Managed Software provides a Maven archetype that you can use to easily create POM files for external libraries.

Note: For more information about setting up the Maven archetype plug-in in Decision Intelligence, see Using an external Maven repository.

You can either run the archetype in interactive mode or in non-interactive mode. In the interactive mode, you are prompted to enter values for each required parameter after running the archetype. In the non-interactive mode, you must specify all the required parameters directly in the command line.

Important: You must use JDK 25.0+ and Maven 3.9 to run the Maven archetype.

When the POM file is generated, you need to update it to configure the Decision Intelligence plug-ins.

To see a complete sample of a POM file, see the Using an external library tutorial available on GitHub External link opens a new window or tab.

Generating a POM file in interactive mode

  1. Open a command prompt and run the following command:
    mvn archetype:generate \
    -DarchetypeGroupId=com.ibm.decision \
    -DarchetypeArtifactId=maven-archetype-external-library \
    -DarchetypeVersion=16.5.1
  2. When prompted, enter values for the following parameters:
    • groupId
    • artifactId
    • version
    • dependencies
    • locales
    • importMethods

Generating a POM file in non-interactive mode

Open a command prompt and run the following command:

mvn archetype:generate \
-DarchetypeGroupId=com.ibm.decision \
-DarchetypeArtifactId=maven-archetype-external-library \
-DarchetypeVersion=16.5.1 \
-DgroupId=<groupID> \
-DartifactId=<artifactId> \
-Dversion=<version> \
-Ddependencies=<dependencies> \
-Dlocales=<locales> \
-DimportMethods=<true|false> \
-B 

Parameter details

Table 1. Archetype identifiers
Parameter Details
archetypeGroupId The archetypeGroupId, archetypeArtifactId, and archetypeVersion parameters define the coordinates of the archetype to be used as a template.
archetypeArtifactId
archetypeVersion
Table 2. External library identifiers
Parameter Details
groupId

The groupId, artifactId, and version parameters define the Maven coordinates of the external library. Maven coordinates uniquely identify a project.

These parameters will be used to import the external library into Decision Designer.

artifactId
version
dependencies Your external library might depend on another project to build correctly, such as your own Java™ library or a third party library. The dependencies parameter lets you declare these dependencies.

It accepts a list of values that are separated by commas. For example: GroupId1:ArtifactId1:Version1,GroupId2:ArtifactId2:Version2,GroupId3:ArtifactId3:Version3

locales

The locales parameter defines the locales that the external library supports. It accepts a list of values that are separated by commas. For example: en_US, fr_FR

The following locales are supported in Decision Designer:

  • en_US - American English (default locale)
  • de_DE - German
  • es_ES - Spanish
  • fr_FR - French
  • it_IT - Italian
  • ja_JP - Japanese
  • pt_BR - Brazilian Portuguese
  • zh_CN - simplified Chinese
importMethods When the importMethods parameter is set to true, Java class methods are automatically verbalized. When set to false, Java class methods are not verbalized.

What to do next

When you have created the POM file, you are ready to generate the external library files.