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.
Currently all the dependencies are added to the whole maven project so each time that a new dependency is added it is needed to manually modify the pom.xml to move the dependency under the correct profile (otherwise all the dependencies of the project(databases connectors, web servers libraries, etc etc) needed just in the development environment or test environment are also transferred in the distribution package). I think that should be added a method to choose in which maven profile the new dependency has to be added.
if you use the Insert Code... feature in the pom.xml editor, the selected dependency will be placed in the location of the cursor (if it makes sense) so when you are inside a profile, the dependency section is added there, if you are inside <dependencyManagement> it's added there etc.
Sorry I has not been very clear in the bug report. I intended only when the dependency is added without opening the pom.xml file by right clicking on the "dependencies" node of the project tree view or by clicking the hint "search dependency in the maven repository" in the Editor during the coding.
PS: It is not a bug report, it is an enhancement report. It's just a suggestion.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss