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 >