Bug 222942 - 'Move Unmanaged Dependency to Dependency Management' hint doesn't work for current pom.xml
'Move Unmanaged Dependency to Dependency Management' hint doesn't work for cu...
Status: VERIFIED FIXED
Product: projects
Classification: Unclassified
Component: Maven
7.3
PC Windows 7
: P3 (vote)
: 7.3
Assigned To: Milos Kleint
issues@projects
: PATCH_AVAILABLE
Depends on: 223226
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-29 07:11 UTC by mienamoo
Modified: 2012-12-14 07:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
patch (5.18 KB, patch)
2012-12-04 12:28 UTC, Milos Kleint
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mienamoo 2012-11-29 07:11:23 UTC
NetBeans build 201211260002
JDK 7u9 64-bit

While testing the Maven sanity test spec [1], I was testing the 'Move Unmanaged Dependency to Dependency Management' hint. The first project I was working with was a Maven-based Java Application. I tried to move a dependency to the management section. All that it did was add

    <dependencyManagement/>

and the original dependency remained unchanged. The hint remained there and could be triggered multiple times with no subsequent effect.

Then I tried on a NetBeans Platform module that is part of a NetBeans Platform Application. When moving to the dependency management section of the module's pom.xml, the same happens. When moving it to the parent's dependency management it works as expected.

[1] http://wiki.netbeans.org/STS_73_Maven#Test_suite:_Edit_pom.xml_file
Comment 1 Milos Kleint 2012-12-04 12:28:06 UTC
Created attachment 128834 [details]
patch

patch to be applied once the new xml api addition is included in the build.
Comment 2 Milos Kleint 2012-12-12 09:36:41 UTC
http://hg.netbeans.org/core-main/rev/af5cbdebc623

we've always had rather heuristic methods of how to get from selected text to selected dependency, now with the new api in xam modules we only include those dependencies that are entirely selected.. starting before <dependency> and ending after </dependency>
Comment 3 Quality Engineering 2012-12-14 02:43:48 UTC
Integrated into 'main-golden', will be available in build *201212140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/af5cbdebc623
User: Milos Kleint <mkleint@netbeans.org>
Log: #222942 both start and end boundaries of dependency element have to be included in selection in order to trigger the hint
Comment 4 mienamoo 2012-12-14 07:38:50 UTC
Verified with build 201212140001. Thanks!


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo