> On Dec 5, 2018, at 10:28 AM, Bruno Baptista <bruno...@gmail.com> wrote: > > I'd say we have a problem here. What do you guys think we should do? > > • Remove Parent definition on examples and fix the ones that will break. > • Use Parent always and fix the dependencies scope. > • A mix of both. Use parent when needed and fix the dependencies scope.
Historically we've not used parents because the goal of each example is to be completely independent in every way from the other examples and the TomEE build overall. The intention is people can grab an example and build on it in their own projects without having to perform surgery to "cut it free" from the parent pom. This conversation typically comes up because people are trying to remove duplication between the examples, which is good habit normally and therefore most people's initial gut reaction. When you're on the learning side, however, it significantly increases the complexity of the example because: - basic "project" structure is moved to the example parent, which then has complexity of removing duplication between 139 examples - some of that complexity will then move to the top-level tomee parent pom to reduce duplication further - inevitably someone will say "maybe MicroProfile examples should have their own parent pom" The result is then if a user would want to make their own tiny project based on a MicroProfile example they would need to spend a few hours learning how to untangle this theoretical pom inheritance chain: - tomee/examples/microprofile/metrics-counted/pom.xml - tomee/examples/microprofile/pom.xml - tomee/examples/pom.xml - tomee/pom.xml As coders we'll be thrilled by how much duplication we removed. As someone learning, you basically have to be an expert in maven and our build structure and be extremely willing to invest time in trial and error to recreate your own truly independent example you can then build from. For certain things like Arquillian, the pom is the hardest part, so if it isn't completely self contained and independent, it is pretty much an unusable example. At least that's how the conversation has historically gone. We can certainly have it again and maybe create some documentation to help example authors understand the goals/motivations. -David