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 231315 - Dependencies deletion issue for o.a.c:commons-io:1.3.2
Summary: Dependencies deletion issue for o.a.c:commons-io:1.3.2
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.4
Hardware: Other Other
: P4 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-16 12:17 UTC by skygo
Modified: 2016-07-07 08:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Add some infos in tooltip and html of dependencynode in case of relocation (4.51 KB, patch)
2013-08-02 17:03 UTC, skygo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description skygo 2013-06-16 12:17:03 UTC
[ BUILD # : 201306132201 ]
[ JDK VERSION : 1.7.0_21 ]

[win8x64]

P4 because it's only for a specific dependencie.

Create a maven java application from new project.
edit pom => add
<dependency>
	    <groupId>org.apache.commons</groupId>
	    <artifactId>commons-io</artifactId>
	    <version>1.3.2</version> 
	</dependency>

go to the node matching the dependencies try remove:
 1 dependencnies declared in parent project(s) were not removed.
Comment 1 skygo 2013-07-09 23:14:13 UTC
I add a comment because this is not limited to the cited artifact.

It's generalized to any artifact with relocation information

Example for o.a.c:commons-io:1.3.2
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.apache.commons</groupId>
  <artifactId>commons-io</artifactId>
  <version>1.3.2</version>
  <distributionManagement>
    <relocation>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <message>https://issues.sonatype.org/browse/MVNCENTRAL-244</message>
    </relocation>
  </distributionManagement>
</project>
Comment 2 Milos Kleint 2013-07-10 05:42:39 UTC
the problem i likely caused by the fact that the effective, resolved model we have when constructing the dependency node only  contains the relocated coordinates, not the original ones declared in the pom.
Comment 3 skygo 2013-07-10 10:04:26 UTC
It may be interresting to have a flag on a dependency to show the relocated dependencies

  may be shown at node level
  may help user navigating upgrading artifact.


May try to code that (if ok to have that in maven, and if no time rush)

Regards

Eric
Comment 4 Milos Kleint 2013-07-10 10:17:24 UTC
any patches welcome, however AFAIK there's no way getting the relocation information from the Artifact or Dependency objects.
Comment 5 skygo 2013-08-02 17:03:41 UTC
Created attachment 138207 [details]
Add some infos in tooltip and html of dependencynode in case of relocation

This is a little patch to show if an artifact is potentialy relocated.

Basic idea is to compare coordinate of artifact and coordinate of dependency (after applying properties). 
This only for direct dependency.

I try to make it simple for my point of view but I'm not sure of the performance, placement.
Comment 6 Martin Balin 2016-07-07 08:39:24 UTC
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