[Hawkular-dev] Parent POM and Wildfly BOM

Peter Palaga ppalaga at redhat.com
Tue Jul 14 07:06:17 EDT 2015


Hi Thomas,

As I noted in your PR 
https://github.com/hawkular/hawkular-parent-pom/pull/33 if we remove 
<scope>import</scope> from the WF BoM dependency, all artifacts declared 
in the WF BoM will effectivelly become invisible in Hawkular projects. 
The WF BoM dependency here in parent would thus become completely 
useless (and can thus be removed completely), would it not?

As far as I can see your main motivation for this change was to stop 
forcing Wildfly BOM on projects that do not need it. The way how we 
should depend on WildFly BoM is a complicated topic. To build my own 
position, I tried to figure out,

   (1) which projects depend on artifacts from WF BoM and
   (2) and which artifacts from WF BoM are those that any of the HK
       projects depends on.

I did it only manually, using my eyes and IDE search - hence my findings 
are rather sketchy.

My findings are as follows:

(i) WF BoM manages JBoss Logging. We manage it too [1] in the parent, 
but that comes from pre-WF-BoM times and I'd personally found it better 
not to have the logging deps in our parent and rather to rely on 
versions imported from WF BoM (note that our logging versions got out of 
date compared to WF9 BoM). The number of HK projects using JBoss logging 
is pretty high: HK main, Accounts, Agent, Alerts, BTM, Bus and Inventory

(ii) WF BoM manages RESTeasy The number of HK projects using JBoss 
logging is pretty high too: HK main, Accounts, Alerts, BTM, Bus, 
Inventory and Metrics.

(iii) Then there is a substantial group of EE7 dependencies, like ejb, 
javax.annotation, servlet, transaction, xml.rpc, jms, ... that are used 
by HK main, Accounts, Bus, Commons (Embedded C*), Metrics and Inventory

Union of HK projects named in (i), (ii) and (iii) answers the question 
(1) - the set of projects that depend on something managed in WF BoM:

   HK main, Accounts, Agent, Alerts, BTM, Bus, Commons (Embedded C*),
   Metrics and Inventory

Note that this pretty much equal to the list of projects that have 
hawkular-parent as their parent. hawkular-android-client is not there, 
but that is a special case that does not need to be considered.

So what happens if we remove the WF BoM import from the HK Parent? - I 
see two options:

   (a) we'd have to add the very same WF BoM import in every child of HK
       Parent

or

   (b) we'd have to manage the artifacts we need from WF BoM ourselves
       in HK parent

I see no advantage in going with (a).

I used to prefer (b) earlier when I thought that Hawkular should target 
other containers than those from the WF/EAP family. Apparently, we do 
not target anything outside WF/EAP and (b) makes no sense to me anymore.

Based on the above, I'd say that we should keep the WF BoM import as is 
in HK Parent.

Best,

Peter

[1] 
https://github.com/hawkular/hawkular-parent-pom/blob/68227696f6fc9e102c81e2e50aa99022660bcdb7/pom.xml#L242-L256

On 03/07/15 16:52, Thomas Segismont wrote:
> I've just sent a PR "Upgrade to Wildfly 9.0.0.Final"
>
> https://github.com/hawkular/hawkular-parent-pom/pull/33
>
> Note that:
> - the Wildfly BOM is no longer forced on every project
> - the Wildfly Maven plugin is configured to use our Wildfly version by
> default, instead of the default version specified in the Maven plugin
>
>
> Le 22/06/2015 16:18, Thomas Segismont a écrit :
>> Hi everyone,
>>
>> I've been working on the changes needed in Metrics for the parent POM
>> upgrade to version 16 (those introducing Wildfly 9).
>>
>> There are three things I noticed which I believe are worth sharing.
>>
>> Firstly beware that the Wildfly guys have changed their philosophy about
>> the BOM: now they force the "provided" scope in the BOM and exclude all
>> the dependencies they think you shouldn't care about as a EE7
>> application developer.
>> On one hand it frees you from adding the provided scope declaration in
>> your application POM. On the other hand, if you use one of the artifacts
>> in tests then dependency resolution could suddenly be broken.
>>
>> Secondly our parent POM does not only declare the Wildfly POM in
>> dependency management section, in also imports it. Which means that all
>> our projects get forced versioning and scope, even if they are not
>> Wildfly based.
>>
>> Thirdly, minor issue, the Wildfly Maven plugin does not configure a
>> default Wildfly version which means that we are all forced to declare in
>> components parent POMs. Like this in Metrics:
>> https://github.com/hawkular/hawkular-metrics/blob/master/pom.xml#L190-L196
>>
>> Going forward, I propose that we no longer "import" the BOM in Hawkular
>> parent, and let components do it where needed. And that we declare the
>> Wildfly version to start with the Wildfly Maven plugin in the parent.
>>
>>
>> Regards,
>> Thomas
>> _______________________________________________
>> hawkular-dev mailing list
>> hawkular-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hawkular-dev
>>
>
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev
>



More information about the hawkular-dev mailing list