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 202785 - MavenSourceJavadocAttacher should punt if index claims there is no source/Javadoc
Summary: MavenSourceJavadocAttacher should punt if index claims there is no source/Jav...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks: 200698
  Show dependency tree
 
Reported: 2011-09-28 15:57 UTC by Jesse Glick
Modified: 2011-12-01 12:07 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2011-09-28 15:57:59 UTC
For artifacts listed in a loaded index, MSJA ought to immediately return false if it knows that no source/Javadoc is going to be available. This would permit the fallback impl to be run instead.
Comment 1 Jesse Glick 2011-10-11 19:52:52 UTC
Ought to also look for matching artifacts by SHA-1 hash. This would permit automatic attachment to well-known binary releases even if they do not happen to be in the local Maven repo. (Would be potentially too slow to do in the general Source/JavadocForBinaryQueryImplementation, but speed is not a significant concern here.)
Comment 2 Jesse Glick 2011-11-19 17:51:24 UTC
(In reply to comment #1)
> Ought to also look for matching artifacts by SHA-1 hash.

Probably want to introduce an internal API for identifying a JAR (e.g. File -> Artifact) according to various levels of accuracy vs. performance. Bug #204816 comment #14 suggests a way to identify Maven-built JARs in arbitrary locations without using the index. Consider CPExtender.addRemoveJAR, EndorsedClassPathImpl, MavenFileOwnerQueryImpl.findCoordinates.
Comment 3 Jesse Glick 2011-11-29 12:27:38 UTC
(In reply to comment #1)
> Ought to also look for matching artifacts by SHA-1 hash.

Filed separately for clarity: bug #205649.
Comment 4 Jesse Glick 2011-11-29 13:28:05 UTC
core-main #c9a7c161f99d
Comment 5 Quality Engineering 2011-12-01 12:07:41 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/c9a7c161f99d
User: Jesse Glick <jglick@netbeans.org>
Log: #202785: MavenSourceJavadocAttacher should punt if index claims there is no source/Javadoc