1

We have git repository with a set of sample applications. Each sample app has its own subdirectory and its own pom.xml, but no common parent pom. The root level has an aggregator pom that should list all the sample apps.

+- sample-apps
|  +- sample-app-A
|  +- sample-app-B
|  +- etc...

Because each sample app has a dependency to our core product, and we want the sample apps to use our latest version, we run the maven-versions-plugin from the root level to keep all apps up-to-date. However, developers that add new sample apps (subfolders) forget to add them to the aggregator pom. Hence, those sample apps will become stale over time.

Is there a way for maven to enforce that all subdirectories are listed as modules in the aggregator pom? We could write a custom enforcer rule for the maven-enforcer-plugin, but want to check for better alternatives first.

We do not want the sample apps to have a parent pom from our side, as the customer should be able to modify the sample app and inherit from his own parent.

gjoranv
  • 4,376
  • 3
  • 21
  • 37
  • How do you build your app? If you use CI and take the artifacts from the build server then developers will quickly notice if their new project is missing? – Ben Thurley Jan 24 '20 at 10:23

0 Answers0