This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 996875 - Project screen: the same dependency can be added multiple times
Project screen: the same dependency can be added multiple times
Status: VERIFIED
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
6.0.0
Unspecified Unspecified
low Severity low
: ---
: 6.2.0
Assigned To: Jan
Lukáš Petrovický
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-14 04:29 EDT by Zuzana Krejčová
Modified: 2016-07-31 21:18 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
same dependency added multiple times (28.93 KB, image/png)
2013-08-14 04:29 EDT, Zuzana Krejčová
no flags Details

  None (edit)
Description Zuzana Krejčová 2013-08-14 04:29:07 EDT
Created attachment 786432 [details]
same dependency added multiple times

Description of problem:
In the Project screen, if you go to Project Settings - Dependencies, you can add the same maven artifact multiple times. It can be done by either adding multiple new rows with "Add" button and then filling out the same GAV in each row, or by repeatedly clicking "Add from repository" and selecting the same artifact in the dialogue.


Version-Release number of selected component (if applicable):
kie-wb 6.0 CR1
Comment 1 Pedro Zapata 2013-10-01 04:07:32 EDT
If the user adds the dependency several, does this cause any execution or building problem? I guess that's probably already tackled by mvn and I haven't been able to see any particular problem caused by this.

If not, and given that's a user choice to add many times the dependency, I would not fix this now.

Of course a warning would be better, but I see that as a very small improvement and it's probably not worth the cost to fix this now.
Comment 2 Zuzana Krejčová 2013-10-01 11:54:04 EDT
(In reply to Pedro Zapata from comment #1)
> If the user adds the dependency several, does this cause any execution or
> building problem? I guess that's probably already tackled by mvn and I
> haven't been able to see any particular problem caused by this.
> 
> If not, and given that's a user choice to add many times the dependency, I
> would not fix this now.
> 
> Of course a warning would be better, but I see that as a very small
> improvement and it's probably not worth the cost to fix this now.

The pom.xml shows the same dependency added multiple times.
Build & deploy runs fine, deployed project shows the same thing in pom.xml.
Switching back to project explorer and project screen shows still the same dependency added multiple times.

So, I guess the only problem really is just that it looks a bit unprofessional and might confuse the user, if there are many (different) dependencies added as well.
Consider this case: User adds quite a few unique dependencies. Then by mistake adds again one that is already there. Later, the dependency might prove harmful to the project, so he removes it. But because it was added twice, one harmful dependency still remains.

I'd very much like to see this fixed, but will understand if you postpone this for a short time. But that is only my 2 cents, others might have a different idea.
Comment 6 Lukáš Petrovický 2014-02-04 14:46:27 EST
QE considers this optional for 6.0.1.
Comment 8 Zuzana Krejčová 2015-12-08 08:27:25 EST
The duplicates are no longer added to pom.xml, even if the user can still add them in the Project editor.

Currently, user will add duplicates, save the change. The Project editor will still show the duplicates, but the pom.xml only has one occurrence. If the user reopens the Project editor, the duplicate is gone. 

The main issue of duplicated dependencies is fixed in 6.2.

Note You need to log in before you can comment on or make changes to this bug.