I think a BOM POM will work for your situation.  The developers add your CI
POM as a dependency in dependencyManagement using import scope:

      <dependency>
        <groupId>ci.pom.group</groupId>
        <artifactId>ci.pom</artifactId>
        <version>${ci.pom.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

Read about the import scope here: https://maven.apache.org/
guides/introduction/introduction-to-dependency-mechanism.html


On Tue, May 30, 2017 at 9:44 AM, George Kopf <george.k...@gmail.com> wrote:

> I apologize if this topic has already been discussed.  I searched all over
> the web and the archives and didn't find anything, but I can't believe that
> I'm the only person with this request.
>
> I'm running the CI/CD pipeline for several java projects.
>
> We're using Git, Maven, Jenkins, Sonar, and Nexus.
>
> I would like to to have the developers create and own their own POM.XML
> that will be used for Snapshots and Release Candidates.
>
> I want to add my build specific POM elements to the effective POM for the
> CI process but I don't want their POM to have to include all the extra
> elements for Jacoco and Sonar (and whatever else we add in the future).
>
> I can do this with profiles but then their POM will have everything in it.
> I can do this with a parent POM but they already have a parent POM
> (springboot) so that they can run locally.  I would have to insert my
> parent pom in between and that seems fragile since mine is only for CI
> builds.
>
> I can't do this with the settings.xml, on the build server, because it
> doesn't have all the required elements.
>
> I hope that there is something obvious that I've missed (like a Jenkins
> plugin) but I'm about to give up and just require the developers to live
> with an excessively complicated POM file.
>
> Thanks.
>
> --
> George Kopf
>

Reply via email to