This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Building modules

Compiling and building the Python modules and Java libraries using the source.

1 - Building the Python Modules

Compiling and building the Python module.

The protegrity-developer-python repository is part of the Protegrity AI Developer Edition suite. This repository provides the Python module for integrating Protegrity’s Data Discovery and Protection APIs into GenAI and traditional applications. Customize, compile, and use the module as per your requirement.

Note: This module should only be built and used if the source and default behavior are to be changed. Ensure that the Protegrity AI Developer Edition is running before installing this module.
For setup instructions, refer to installation steps.

Prerequisites

Build the protegrity-developer-python module

  1. Clone the repository.

    git clone https://github.com/Protegrity-Developer-Edition/protegrity-developer-python.git
    

    FOR TESTING:

    git clone git@source.protegrity.com:developer-edition/protegrity-developer-python.git
    
  2. Navigate to the protegrity-developer-python directory in the cloned location.

  3. Optional: Update the files in the Python source directory as required.

  4. Activate the Python virtual environment.

  5. Install the dependencies.

    pip install -r requirements.txt
    
  6. Build and install the Python module by running the following command from the root directory of the repository.

    pip install .
    

    The installation completes and the success message is displayed.

2 - Building the Java Libraries

Compiling and building the Java libraries.

The protegrity-developer-java repository is part of the Protegrity AI Developer Edition suite. This repository provides the Java library for integrating Protegrity’s Data Discovery and Protection APIs into GenAI and traditional applications. Customize, compile, and use the Java library as per your requirement.

Note: This module should only be built and used if the source and default behavior are to be changed. Ensure that the Protegrity AI Developer Edition is running before installing the Java library.
For setup instructions, refer to installation steps.

Prerequisites

Build and test the protegrity-developer-java library

  1. Clone the repository.

    git clone https://github.com/Protegrity-Developer-Edition/protegrity-developer-java.git
    
  2. Navigate to the protegrity-developer-java directory in the cloned location.

  3. Optional: Update the files in the Java source directory as required.

  4. Build the project using Maven wrapper. It is recommended to use this method.

    ./mvnw clean install
    

    OR Build the project using system Maven.

    mvn clean install
    

    The build completes and the success message is displayed. This creates:

    • application-protector-java/target/ApplicationProtectorJava-1.0.1.jar (fat JAR with dependencies)
    • protegrity-developer-edition/target/ProtegrityDeveloperJava-1.0.1.jar (fat JAR with dependencies)
    • Maven artifacts in your local repository (.m2/repository)
  5. To run integration tests (optional):

    mvn clean verify -DskipITs=false