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.
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
- Open the project in Talend Studio.
- From the menu bar, click Project Settings dialog box. to open the
Expand Build and click Maven.
- Select the Set reference project modules in profile check box and click Force full re-synchronize poms.
- When done, click Apply and Close to close the dialog box.
What to do next
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