Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 899617 (JBPAPP6-13)

Summary: jboss-parent contains dependencyManagement sections
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Karel Piwko <kpiwko>
Component: Maven RepositoryAssignee: Paul Gier <pgier>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.0.0CC: atangrin, kpiwko, no-reply, pgier, sgilda
Target Milestone: ---   
Target Release: EAP 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBPAPP6-13
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-04 23:40:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
eap-vs-community.pdf none

Description Karel Piwko 2011-11-30 16:27:44 UTC
project_key: JBPAPP6

Following problem was identified:

jboss-parent:6-redhat-1 contains dependencyManagement, however, jboss-parent:6 does not. 

This means that every project (e.g. richfaces) which depends on jboss-parent has an assumption that there is no dependencyManagement in that parent. This is however broken in jboss-parent:6-redhat-1

This means that importing richfaces-bom:4.1.0.CR1 works as expected, however importing richfaces-bom:4.1.0.CR1-redhat-1 will import everything in EAP, such as Hibernate 4, Hibernate Validators, etc.

This is very undesirable behavior.

Could we remove dependencyManagement sections from the jboss-parent?

Comment 1 RH Bugzilla Integration 2011-11-30 16:28:06 UTC
Bugzilla References: Added: https://bugzilla.redhat.com/show_bug.cgi?id=758739


Comment 2 Karel Piwko 2011-11-30 16:28:45 UTC
Linking Richfaces specific issue

Comment 3 Karel Piwko 2011-11-30 16:28:45 UTC
Link: Added: This issue relates to RF-11760


Comment 4 Paul Gier 2011-11-30 22:36:06 UTC
Bugzilla References: Removed: https://bugzilla.redhat.com/show_bug.cgi?id=758739 Added: https://bugzilla.redhat.com/show_bug.cgi?id=758739


Comment 5 Paul Gier 2011-11-30 22:43:28 UTC
I believe the reason we put dependencyManagement into the parent is to control the versions of all EAP related project builds.  It seems like you would want this even for non-EAP product builds.

What is the problem with importing the dependencyManagement information?  This wouldn't have any effect on the classpath, it just forces you to use the correct versions of any eap dependencies.

Comment 6 Karel Piwko 2011-12-01 11:57:03 UTC
I have problems with using richfaces-bom in the dependency managemement.
See following example:

{code:xml}
    <dependencyManagement>
        <dependencies>
                <dependency>
                <groupId>org.richfaces</groupId>
                <artifactId>richfaces-bom</artifactId>
                <type>pom</type>
                <scope>import</scope>
                <version>4.1.0-CR1-redhat-1</version>
                </dependency>            
        </dependencies>
    </dependencyManagement>
{code}

I have following dependencies in the example which I don't want to be overridden:

{code:xml}
<dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>3.5.0-Final</version> <!-- not possible, will be overridden to 4.0.x -->
</dependency>

<dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.5.8</version> <!-- not possible, will be overridden to 1.6.x -->
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
            <version>3.0.6.RELEASE</version> <!-- not possible, will be overridden to 2.5.6.x -->
        </dependency>
        ... 
{code}

As you can see, users using richfaces-bom:4.1.0-CR1-redhat-1 will won't get Richfaces dependencies only but he will get even Hibernate, Hibernate Validator, Spring!, basically everything from jboss-dependency-management-eap and jboss-dependency-management-build.

This is definitely not desired. Richfaces-bom uses jboss-parent to have the same plugin versions for deployment and release, for instance. In the community it does not matter, as community version have no dependencyManagement. However, productized version of jboss-parent has a dependencyManagement and therefore it becomes a part of richfaces-bom.

Linked richfaces issue is about making bom file independent of jboss-parent. However, following issue will affect any project which defines a *consumable bom* which has jboss-parent somethere. Might it be Hibernate Search or something from EDG, SOA, etc. next time.


Comment 7 Karel Piwko 2011-12-02 14:46:58 UTC
Attached a diagram to illustrate the problem

Comment 8 Karel Piwko 2011-12-02 14:46:58 UTC
Attachment: Added: eap-vs-community.pdf


Comment 9 RH Bugzilla Integration 2011-12-08 15:54:03 UTC
Marek Novotny <mnovotny> changed the Status of [bug 758739|https://bugzilla.redhat.com/show_bug.cgi?id=758739] from NEW to ON_DEV

Comment 10 RH Bugzilla Integration 2011-12-08 20:41:28 UTC
Marek Novotny <mnovotny> made a comment on [bug 758739|https://bugzilla.redhat.com/show_bug.cgi?id=758739]

removed parent from richfaces-bom and also removed richfaces-bom from richfaces-root-parent

Comment 11 RH Bugzilla Integration 2011-12-09 08:02:04 UTC
Marek Novotny <mnovotny> changed the Status of [bug 758739|https://bugzilla.redhat.com/show_bug.cgi?id=758739] from ON_DEV to ON_QA

Comment 12 Paul Gier 2011-12-14 15:29:04 UTC
Removed the dependency management from the jboss-parent in [e4ffe797|http://git.app.eng.bos.redhat.com/?p=jboss/jboss-parent-pom.git;a=commit;h=e4ffe797b898127182fefe7e06d7cd43168d7dd8].
Unfortunately, this change will make a lot of our current POMs invalid, but we will gradually fix them.

Comment 13 Paul Gier 2011-12-15 16:50:24 UTC
Because of the effect this has on breaking the builds, we decided to revert the jboss-parent version 6-redhat-1, and create a new jboss-parent with an updated version: JBPAPP-7773

Comment 14 Paul Gier 2011-12-15 16:50:44 UTC
Link: Added: This issue relates to JBPAPP-7773


Comment 15 Karel Piwko 2012-01-13 17:39:46 UTC
Link: Added: This issue is related to JBPAPP-7913


Comment 16 Anne-Louise Tangring 2012-11-04 14:32:39 UTC
Docs QE Status: Removed: NEW 


Comment 17 Anne-Louise Tangring 2012-11-04 23:40:05 UTC
Fixing Affects and Fix in Version