Skip to main content Skip to complementary content

Generating POM files for your projects

The POM files for your projects are not generated by default for performance reasons. To execute a Continuous Integration build successfully, it is mandatory to generate POM files for your projects first. Talend CI Builder allows you to generate POM files for your projects using the mvn org.talend.ci:builder-maven-plugin:8.0.X:generateAllPoms command.

Before you begin

The update repositories for Continuous Integration have been set up. For more information, see Setting up update repositories for Talend Studio and Continuous Integration.

About this task

To generate POM files for your projects:

Procedure

  1. Check out your Git projects.
    For more information about how to check out a Git project, see Git Checkout.
  2. Run the mvn org.talend.ci:builder-maven-plugin:8.0.X:generateAllPoms command under the directory where your projects have been checked out to generate POM files for your projects.

    Pay attention to the following before generating POM files for your projects:

    • The process of generating POM files depends on the license of your product, the repository for Talend Studio feature packages, and the repository for Talend Studio updates, which can be specified via the corresponding -Dlicense.path, -Dtalend.studio.p2.base, and -Dtalend.studio.p2.update parameters. If there is any update for any of them, you need to regenerate POM files for your projects with the corresponding parameters.
    • If you have already installed Talend CommandLine in a standalone step and do not need to update the license and apply a Talend Studio monthly update, you can simply run the command with only the -Dproduct.path parameter. For more information, see Installing Talend CommandLine in a standalone step (optional).
    • In case of migration, you probably want to generate POM files for all projects and items. If you want to filter on specific projects and items, you can use the -DprojectFilter and -DitemFilter parameters.
    • If you have installed the 8.0 R2022-06 Talend Studio monthly update or a later one provided by Talend and if your main project has duplicated reference projects,
      • the modules of the duplicated reference projects are excluded from the POM files for the main project and the artifacts in the duplicated reference projects are installed into the Maven .m2 folder as dependencies by default, and
      • you do not need to add the -Dtalend.profile.mode parameter to activate the profiles when generating POM files for the main project.

    For more information about CI related parameters, see CI builder-related Maven parameters.

    Here is an example of installing Talend CommandLine, applying a Talend Studio monthly update, and generating all POM files for your projects:

    # To generate all POM files for your projects
    mvn org.talend.ci:builder-maven-plugin:8.0.X:generateAllPoms 
    -Dproduct.path=/home/talend/studio 
    -Dlicense.path=/home/talend/studio/license 
    <!-- This parameter is only supported for users with Talend Studio 8.0.1 R2024-04 or lower 
    -Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base -->
    -Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/R2023-02

    Here is an example of generating all POM files for your projects using Generating POM files for your projects, which calls the changeMavenVersion command to change the Maven version and the regenerateAllPoms command of Talend CommandLine to regenerate POM files for your projects:

    # The content of the script named upgrade_version.txt
    -pn gitProject -ul 'jobbuilder@talend.com' -gt
    changeMavenVersion 1.0.5 --item-filter 'label%*test5_pere*' --subjobs --snapshot
    regenerateAllPoms
    # To execute the custom script upgrade_version.txt
    mvn org.talend.ci:builder-maven-plugin:<version>:executeScript -s ./maven_settings.xml 
    -Dgeneration.type=local 
    -Dproduct.path=/home/talend/studio 
    -Dlicense.path=/home/talend/studio/license 
    -DscriptFile=/home/talend/upgrade_version.txt
  3. Test the build of your projects and package them using the Maven package command.

    Pay attention to the following before building and packaging your projects:

    • If the profiles are activated when generating POM files for your main project, you need to specify profiles using the -P parameter when building your projects and artifacts. For more information about the Maven profiles, see Introduction to Build Profiles. For more information about activating profiles, see the related description of the -Dtalend.profile.module parameter in CI builder-related Maven parameters.
    • If you have installed the 8.0 R2022-06 Talend Studio monthly update or a later one provided by Talend and if your main project has duplicated reference projects, when packaging your main project, its reference projects are not packaged and you need to package them separately.

    Here is an example:

    # To build your projects and package artifacts
    mvn clean package 
    -Dlicense.path=/home/talend/studio/license 
    <!-- This parameter is only supported and needed for users with Talend Studio 8.0.1 R2024-04 or lower 
    -Dtalend.studio.p2.base=https://update.talend.com/Studio/8/base -->
    -Dtalend.studio.p2.update=https://update.talend.com/Studio/8/updates/R2023-02

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!