Search code examples
javamavencontinuous-integrationazure-devopstalend

How to avoid DuplicateProjectException exception


Hy,

I have a multi-module maven project. I use to create these projects with Talend studion. I try to create a CI/CD build flow in MS Azure devops based on the Talend studion generated code. The generated maven poms are look like:

 Parent pom:
<Modules>
    <Module>Project A<Module>
    <Module>Project B<Module>
</Modules>

Module A pom:
// no reference to other module

Module B pom:
<Modules>
    <Module>Project A<Module>
    <Module>pom-control-bundle.xml<Module>
    <Module>pom-feature.xml<Module>
</Modules>

When I try to queue with MS Azure devops, I encounter this error message:

DuplicateProjectException : Project A is duplicated in the reactor @

Any idea, what should I configure to solve this problem?


Solution

  • I just recognised no need to build the whole project but the subproject. In Talend, you create jobs, services, route, and they are separated java projects. If they will publish somewhere you need to upload the job, service, route, not the whole project. So, I need to run the build flow on the job, service, route. So I need to point on the job's -also service, route, etc...- pom.xml not the parent project's pom.xml. So you can avoid this error above, if you build the modules separate.