Hi,

Your pom agregator doesn't need to be aware about testing profiles, its job
is only agregating.
The 70 poms should have a parent pom (bom) within your testing profile.

Regardes,

Arnaud

Le jeu. 29 sept. 2022, 00:06, Delany <delany.middle...@gmail.com> a écrit :

> Shouldn't matter. Please give full pom.
> Delany
>
> On Wed, 28 Sep 2022, 23:15 Thai Le, <lnthai2...@gmail.com> wrote:
>
> > Thanks for your input. That's the first thing I tried. Unfortunately, if
> I
> > do that none of the modules recognized the profiles.
> >
> > On Wed, Sep 28, 2022, 17:08 Delany <delany.middle...@gmail.com> wrote:
> >
> > > Why did you duplicate modules in the profiles? Just leave them under
> > > project.
> > > Delany
> > >
> > >
> > > On Wed, 28 Sep 2022, 21:32 Thai Le, <lnthai2...@gmail.com> wrote:
> > >
> > > > Hello,
> > > >
> > > > I have an aggregator pom with 70 modules to be built.
> > > > <project>
> > > >   <modelVersion>4.0.0</modelVersion>
> > > >   <groupId>company</groupId>
> > > >   <artifactId>packaging-pom</artifactId>
> > > >   <version>1</version>
> > > >   <packaging>pom</packaging>
> > > >   <modules> 70 modules listed here </modules>
> > > > </project>
> > > > Recently we are introducing pact testing into our build pipeline so I
> > > made
> > > > 2 profiles. One is for running pact consumer test which excludes all
> > the
> > > > unit tests ending with *Test and only includes the consumer test. The
> > > other
> > > > one is for running pact provider tests which excludes all unit tests
> > and
> > > > pact consumer tests so that only pact provider tests can run. The 2
> > > > profiles should be applied to all the 70 modules. One way to do that
> is
> > > to
> > > > put the modules inside each profile thus the modules are duplicated.
> > > > <project>
> > > >   <modelVersion>4.0.0</modelVersion>
> > > >   <groupId>company</groupId>
> > > >   <artifactId>packaging-pom</artifactId>
> > > >   <version>1</version>
> > > >   <packaging>pom</packaging>
> > > >
> > > >   <profiles>
> > > >     <profile>
> > > >       <id>consumer-pact-test</id>
> > > >       *<modules> 70 modules listed here </modules>*
> > > >       <build>...</build>
> > > >     </profile>
> > > >
> > > >     <profile>
> > > >       <id>provider-pact-test</id>
> > > >       *<modules> 70 modules listed here </modules>*
> > > >       <build>...</build>
> > > >     </profile>
> > > >
> > > >   </profiles>
> > > > </project>
> > > > Imagine if I had to add 10 more profiles. Is there other ways to
> share
> > > the
> > > > same modules between multiple profiles without duplicating them ?
> > > >
> > > > Regards
> > > >
> > > > Thai Le
> > > >
> > >
> >
>

Reply via email to