Resynchronizing POM to avoid duplicate projects module definition in the POM for Talend CI builder - Cloud - 7.3

Talend Studio User Guide

Talend Big Data
Talend Big Data Platform
Talend Cloud
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Talend Studio
Design and Development
Last publication date

If a project is referenced by multiple reference projects in a main project, you need to resynchronize POM for all reference and main projects one by one, from the bottom level of the reference hierarchy to the top, to avoid duplicate projects module definition in the POM for Talend CI builder.

Note: The resynchronization of the POM is helpful only when building the main project in Talend CI builder.

For example, suppose a project ProjectSubRef is referenced by two reference projects ProjectRefA and ProjectRefB of a main project ProjectMain, you need to first resynchronize the POM for the third level project ProjectSubRef, then for the second level projects ProjectRefA and ProjectRefB (no priority for the projects at the same level), finally for the top level main project ProjectMain.

About this task

The following procedure shows you how to resynchronize the POM for a project:


  1. Open the project in Talend Studio.
  2. From the menu bar, click File > Edit Project properties to open the Project Settings dialog box.
  3. Expand Build and click Maven.
  4. Select the Set reference project modules in profile check box and click Force full re-synchronize poms.
  5. When done, click Apply and Close to close the dialog box.

What to do next

After resynchronizing the POM for all projects, you will find in the POM of each project that the reference project is set as a profile, with a unique ID <p_name>_<refp_name> to identify it, where <p_name> designates the name of the project and <refp_name> designates the name of its reference project, all in lower case, for example, projectmain_projectrefa and projectmain_projectrefb in the POM of the main project ProjectMain, projectrefa_projectsubref in the POM of the project ProjectRefA, and projectrefb_projectsubref in the POM of the project ProjectRefB.

When building a main project in Talend CI builder, you need to use the profile ID for each reference project in the command, and duplicate reference projects should appear only once, projectrefa_projectsubref and projectrefb_projectsubref in this example. Below are several examples:

mvn package/install/deploy -P !projectrefb_projectsubref
mvn install/deploy -P docker,projectmain_projectrefa,projectmain_projectrefb,projectrefa_projectsubref
mvn deploy -P cloud-publisher,projectmain_projectrefa,projectmain_projectrefb,projectrefb_projectsubref