Hi folks,

In my examples I've never declared the parent in the pom.xml like in here:

<parent>
    <artifactId>examples</artifactId>
    <groupId>org.apache.tomee</groupId>
    <version>8.0.0-SNAPSHOT</version>
</parent>

This is because I wanted to precisely control the dependencies on the project.

I was reviewing a PR from José Ventura and I noticed that even if he was using the right dependencies, the created WAR was way too big. I traced the issue to the the parent pom of TomEE. We include unneeded dependencies in all examples... See attached image with bundled libs.

In this example, for the /websocket-tls-basic-auth/ example, it doesn't declare a parent pom and it generates a WAR file with 5.5KB.

Adding a Parent definition boosts the WAR size to 7.3MB.

Additionally, the build goes from 9.18s to 13,89s. This has the potential of saving a lot of space and build time.

Test outcome is the same.

I'd say we have a problem here. What do you guys think we should do?

1. Remove Parent definition on examples and fix the ones that will break.
2. Use Parent always and fix the dependencies scope.
3. A mix of both. Use parent when needed and fix the dependencies scope.

Thoughts?

Cheers.

--
Bruno Baptista
https://twitter.com/brunobat_


Reply via email to