Thanks Jean-Louis.
Fixed
Bruno Baptista
https://twitter.com/brunobat_
On 06/12/18 14:46, Jean-Louis Monteiro wrote:
There are some typos in there. See review
--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com
On Thu, Dec 6, 2018 at 3:43 PM Jean-Louis Monteiro <[email protected]>
wrote:
Thanks Bruno. I'll review it very quick
--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com
On Thu, Dec 6, 2018 at 2:44 PM Bruno Baptista <[email protected]> wrote:
Hi folks,
I've created a jira and a PR to define the rules/guidelines in the
creation of new examples.
Jira: https://issues.apache.org/jira/browse/TOMEE-2326
PR: https://github.com/apache/tomee/pull/257
Please feel free to comment and ask for changes.
Cheers.
Bruno Baptista
https://twitter.com/brunobat_
On 05/12/18 22:23, Bruno Baptista wrote:
Thanks for the context David.
I'll write a PR with README at the Examples project level with some
guidelines that we can discuss. There were some other resources to
help make new examples. Will research that too.
Cheers
Bruno Baptista
https://twitter.com/brunobat_
On 05/12/18 21:21, David Blevins wrote:
On Dec 5, 2018, at 10:28 AM, Bruno Baptista <[email protected]>
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