This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 222117 - CPExtender doesn't remove all deps of the library
Summary: CPExtender doesn't remove all deps of the library
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
: 222175 (view as bug list)
Depends on:
Blocks: 222175
  Show dependency tree
 
Reported: 2012-11-14 14:23 UTC by Martin Fousek
Modified: 2012-11-20 08:36 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch for fixing (654 bytes, patch)
2012-11-14 14:23 UTC, Martin Fousek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Fousek 2012-11-14 14:23:07 UTC
Created attachment 127784 [details]
patch for fixing

In the latest IDE (NetBeans IDE Dev (Build 20121114-81d2ab562d59)) the CPExtender removes from pom.xml only the first maven dependency it finds. I'm attaching really short patch which fixes this issue to me, I wanted to add also some test case but the current CPExtenderTest#testAddRemovePomLib() was failing to me so I didn't spent time with that.
Comment 1 Milos Kleint 2012-11-16 08:25:44 UTC
thanks..

http://hg.netbeans.org/core-main/rev/09cd69459cf1

please note however that in general dependency removal is fairly conservative and almost any manual change done by the user in the pom will cause the dependency not to be removed. That's correct however.
Comment 2 Quality Engineering 2012-11-17 02:45:11 UTC
Integrated into 'main-golden', will be available in build *201211170002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/09cd69459cf1
User: Milos Kleint <mkleint@netbeans.org>
Log: #222117 continue instead of break to remove all dependencies
Comment 3 Martin Fousek 2012-11-20 08:30:56 UTC
(In reply to comment #1)
> thanks..
> 
> http://hg.netbeans.org/core-main/rev/09cd69459cf1
> 
> please note however that in general dependency removal is fairly conservative
> and almost any manual change done by the user in the pom will cause the
> dependency not to be removed. That's correct however.

I know, anyway thanks for integrating...
Comment 4 Martin Fousek 2012-11-20 08:36:39 UTC
*** Bug 222175 has been marked as a duplicate of this bug. ***