Bug 200074 - Local repo indexing should run offline
Local repo indexing should run offline
Product: projects
Classification: Unclassified
Component: Maven
PC Linux
: P3 (vote)
: 7.0.1
Assigned To: Jesse Glick
Depends on:
Blocks: 199481
  Show dependency treegraph
Reported: 2011-07-12 09:50 UTC by Jesse Glick
Modified: 2011-11-08 18:39 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT

Using EmbedderFactory.getProjectEmbedder() does not work (2.62 KB, patch)
2011-07-12 09:50 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2011-07-12 09:50:34 UTC
Created attachment 109390 [details]
Using EmbedderFactory.getProjectEmbedder() does not work

It seems that NbIndexCreator.load makes network connections to resolve references from local POMs.
Comment 1 Jesse Glick 2011-07-25 19:34:18 UTC
The effect is to make local repo indexing unnecessarily slow, even though the disk and CPU are largely idle. Appears to especially affect things like Stapler and Hudson/Jenkins artifacts, perhaps because they declare remote repositories?
Comment 2 Jesse Glick 2011-08-09 17:22:46 UTC
core-main #f027d5143df6
Comment 3 Quality Engineering 2011-08-10 21:32:22 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/f027d5143df6
User: Jesse Glick <jglick@netbeans.org>
Log: #200074: Local repo indexing should run offline
Comment 4 Tomas Danek 2011-08-24 15:00:27 UTC
i did not observe any significant perf.improvement on indexing my local repo, but indexing works, i did not see any regression. So let me know if this is sufficient as verification, in order to be able to proceed with patch process.
Comment 5 Jesse Glick 2011-08-24 18:59:04 UTC
Ideally verification would include running e.g. Wireshark to check that no attempts are made to contact a remote repository during local repository indexing (whether or not such attempts are "fast enough" is irrelevant). However I am not entirely sure what conditions trigger the bug to begin with; it seemed that only certain artifacts were affected, probably ones with a declared remote repository (other than central).

Anyway it is the changes to NexusRepositoryIndexerImpl and MavenEmbedder which actually fix the bug; the change to EmbedderFactory is an assertion that no remote repository is contacted on behalf of the offline embedder. That assertion is in fact triggered if the other changes are reverted; I would not include the EmbedderFactory change in a backported patch for fear of causing some regression.
Comment 6 Jesse Glick 2011-08-25 16:23:12 UTC
Simplified backport: releases #342d50cdb6ce
Comment 7 Quality Engineering 2011-08-26 04:27:39 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/342d50cdb6ce
User: Jesse Glick <jglick@netbeans.org>
Log: #200074: Local repo indexing should run offline
(Simplified patch adapted from f027d5143df6.)
Comment 8 Quality Engineering 2011-09-26 13:35:58 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/5bbccc2894f7
User: Jesse Glick <jglick@netbeans.org>
Log: #200074: Local repo indexing should run offline
(Simplified patch adapted from f027d5143df6.)

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