Build Artifacts

Building a Fabric project compiles the Java sources of each Logical Unit and packages them into deployment artifacts. The output per LU is:

  • ludb.jar — compiled Java bytecode
  • ludbXMLs.zip — LU configuration and schema metadata

These artifacts are the input for the deployment phase. They can be built and deployed in one step, or built once and deployed to multiple environments separately.

CI/CD pipelines should build artifacts on a dedicated build server using a Docker image that contains Fabric. Fabric itself does not need to be running to build artifacts.

Build from Fabric Studio

To build artifacts in the Fabric Studio:

  1. Right-click the object (for example, Web Services) and click Build Deploy Artifacts. A notification displays following a successful build.

Build Deploy Artifacts

  1. Right-click the same object and select Open Folder. Windows Explorer opens at:
    [Your PC Folder]\K2View Fabric Studio\Projects\[Project Name]\Implementation\LogicalUnits\[LU Name]

  2. Locate the generated ludb.JAR and ludbXMLs.ZIP files.

Build on a Server using buildArtifacts.sh

Run buildArtifacts.sh on a server to compile and package the project artifacts. The script is located under $K2_HOME/fabric/scripts.

Usage:

./buildArtifacts.sh -pd <PATH_TO_PROJECT> [options]

Options:

Option

Description

Mandatory

Default

-pd / --project-dir

Path to the project directory. The folder name must match the .k2proj file name.

Y

-l / --lu-type-name

LU name(s) to build. Accepts a comma-separated list (e.g., -l Customer,Orders).

N

All LUs in the project

-d / --output-direction

Output directory for generated artifacts.

N

<project>/Implementation/LogicalUnits

-pn / --project-name

Project name override.

N

Project folder name

-v / --jdk-version

JDK version for compilation.

N

21

-h / --help

Displays usage information.

N

Example — build all LUs:

./buildArtifacts.sh -pd /opt/apps/MyProject

Example — build specific LUs into a custom output directory:

./buildArtifacts.sh -pd /opt/apps/MyProject -l Customer,Orders -d /tmp/artifacts

After a successful build, each LU folder under the output directory contains ludb.jar and ludbXMLs.zip.

Next Step

Once artifacts are built, deploy them to the target Fabric server. See Deploy a Project.

Previous

Build Artifacts

Building a Fabric project compiles the Java sources of each Logical Unit and packages them into deployment artifacts. The output per LU is:

  • ludb.jar — compiled Java bytecode
  • ludbXMLs.zip — LU configuration and schema metadata

These artifacts are the input for the deployment phase. They can be built and deployed in one step, or built once and deployed to multiple environments separately.

CI/CD pipelines should build artifacts on a dedicated build server using a Docker image that contains Fabric. Fabric itself does not need to be running to build artifacts.

Build from Fabric Studio

To build artifacts in the Fabric Studio:

  1. Right-click the object (for example, Web Services) and click Build Deploy Artifacts. A notification displays following a successful build.

Build Deploy Artifacts

  1. Right-click the same object and select Open Folder. Windows Explorer opens at:
    [Your PC Folder]\K2View Fabric Studio\Projects\[Project Name]\Implementation\LogicalUnits\[LU Name]

  2. Locate the generated ludb.JAR and ludbXMLs.ZIP files.

Build on a Server using buildArtifacts.sh

Run buildArtifacts.sh on a server to compile and package the project artifacts. The script is located under $K2_HOME/fabric/scripts.

Usage:

./buildArtifacts.sh -pd <PATH_TO_PROJECT> [options]

Options:

Option

Description

Mandatory

Default

-pd / --project-dir

Path to the project directory. The folder name must match the .k2proj file name.

Y

-l / --lu-type-name

LU name(s) to build. Accepts a comma-separated list (e.g., -l Customer,Orders).

N

All LUs in the project

-d / --output-direction

Output directory for generated artifacts.

N

<project>/Implementation/LogicalUnits

-pn / --project-name

Project name override.

N

Project folder name

-v / --jdk-version

JDK version for compilation.

N

21

-h / --help

Displays usage information.

N

Example — build all LUs:

./buildArtifacts.sh -pd /opt/apps/MyProject

Example — build specific LUs into a custom output directory:

./buildArtifacts.sh -pd /opt/apps/MyProject -l Customer,Orders -d /tmp/artifacts

After a successful build, each LU folder under the output directory contains ludb.jar and ludbXMLs.zip.

Next Step

Once artifacts are built, deploy them to the target Fabric server. See Deploy a Project.

Previous