Red Hat Bugzilla – Bug 996875
Project screen: the same dependency can be added multiple times
Last modified: 2016-07-31 21:18:17 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
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.
(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.
QE considers this optional for 6.0.1.
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.