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.

View | Details | Raw Unified | Return to bug 194351
Collapse All | Expand All

(-)a/csl.api/nbproject/project.xml (-2 / +2 lines)
Lines 37-44 Link Here
37
                    <build-prerequisite/>
37
                    <build-prerequisite/>
38
                    <compile-dependency/>
38
                    <compile-dependency/>
39
                    <run-dependency>
39
                    <run-dependency>
40
                        <release-version>1</release-version>
40
                        <release-version>3</release-version>
41
                        <specification-version>2.1</specification-version>
41
                        <specification-version>3.0</specification-version>
42
                    </run-dependency>
42
                    </run-dependency>
43
                </dependency>
43
                </dependency>
44
                <dependency>
44
                <dependency>
(-)a/java.hints/nbproject/project.xml (-2 / +2 lines)
Lines 107-114 Link Here
107
                    <build-prerequisite/>
107
                    <build-prerequisite/>
108
                    <compile-dependency/>
108
                    <compile-dependency/>
109
                    <run-dependency>
109
                    <run-dependency>
110
                        <release-version>1</release-version>
110
                        <release-version>3</release-version>
111
                        <specification-version>2.9</specification-version>
111
                        <specification-version>3.0</specification-version>
112
                    </run-dependency>
112
                    </run-dependency>
113
                </dependency>
113
                </dependency>
114
                <dependency>
114
                <dependency>
(-)a/java.source/nbproject/project.xml (-2 / +2 lines)
Lines 106-113 Link Here
106
                    <build-prerequisite/>
106
                    <build-prerequisite/>
107
                    <compile-dependency/>
107
                    <compile-dependency/>
108
                    <run-dependency>
108
                    <run-dependency>
109
                        <release-version>1</release-version>
109
                        <release-version>3</release-version>
110
                        <specification-version>2.12</specification-version>
110
                        <specification-version>3.0</specification-version>
111
                    </run-dependency>
111
                    </run-dependency>
112
                </dependency>
112
                </dependency>
113
                <dependency>
113
                <dependency>
(-)a/java.source/src/org/netbeans/modules/java/source/usages/DocumentUtil.java (-9 / +9 lines)
Lines 257-286 Link Here
257
        }
257
        }
258
        caseInsensitiveName = simpleName.toLowerCase();         //XXX: I18N, Locale
258
        caseInsensitiveName = simpleName.toLowerCase();         //XXX: I18N, Locale
259
        Document doc = new Document ();        
259
        Document doc = new Document ();        
260
        Field field = new Field (FIELD_BINARY_NAME,fileName,Field.Store.YES, Field.Index.NO_NORMS);
260
        Field field = new Field (FIELD_BINARY_NAME,fileName,Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS);
261
        doc.add (field);
261
        doc.add (field);
262
        field = new Field (FIELD_PACKAGE_NAME,pkgName,Field.Store.YES, Field.Index.NO_NORMS);
262
        field = new Field (FIELD_PACKAGE_NAME,pkgName,Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS);
263
        doc.add (field);
263
        doc.add (field);
264
        field = new Field (FIELD_SIMPLE_NAME,simpleName, Field.Store.YES, Field.Index.NO_NORMS);
264
        field = new Field (FIELD_SIMPLE_NAME,simpleName, Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS);
265
        doc.add (field);
265
        doc.add (field);
266
        field = new Field (FIELD_CASE_INSENSITIVE_NAME, caseInsensitiveName, Field.Store.YES, Field.Index.NO_NORMS);
266
        field = new Field (FIELD_CASE_INSENSITIVE_NAME, caseInsensitiveName, Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS);
267
        doc.add (field);
267
        doc.add (field);
268
        for (String reference : references) {
268
        for (String reference : references) {
269
            field = new Field (FIELD_REFERENCES,reference,Field.Store.NO,Field.Index.NO_NORMS);
269
            field = new Field (FIELD_REFERENCES,reference,Field.Store.NO,Field.Index.NOT_ANALYZED_NO_NORMS);
270
            doc.add(field);
270
            doc.add(field);
271
        }
271
        }
272
        if (featureIdents != null) {
272
        if (featureIdents != null) {
273
            field = new Field(FIELD_FEATURE_IDENTS, featureIdents, Field.Store.NO, Field.Index.TOKENIZED);
273
            field = new Field(FIELD_FEATURE_IDENTS, featureIdents, Field.Store.NO, Field.Index.ANALYZED_NO_NORMS);
274
            doc.add(field);
274
            doc.add(field);
275
            field = new Field(FIELD_CASE_INSENSITIVE_FEATURE_IDENTS, featureIdents, Field.Store.NO, Field.Index.TOKENIZED);
275
            field = new Field(FIELD_CASE_INSENSITIVE_FEATURE_IDENTS, featureIdents, Field.Store.NO, Field.Index.ANALYZED_NO_NORMS);
276
            doc.add(field);
276
            doc.add(field);
277
        }
277
        }
278
        if (idents != null) {
278
        if (idents != null) {
279
            field = new Field(FIELD_IDENTS, idents, Field.Store.NO, Field.Index.TOKENIZED);
279
            field = new Field(FIELD_IDENTS, idents, Field.Store.NO, Field.Index.ANALYZED_NO_NORMS);
280
            doc.add(field);
280
            doc.add(field);
281
        }
281
        }
282
        if (source != null) {
282
        if (source != null) {
283
            field = new Field (FIELD_SOURCE,source,Field.Store.YES,Field.Index.NO_NORMS);
283
            field = new Field (FIELD_SOURCE,source,Field.Store.YES,Field.Index.NOT_ANALYZED_NO_NORMS);
284
            doc.add(field);
284
            doc.add(field);
285
        }
285
        }
286
        return doc;
286
        return doc;
(-)a/java.source/test/unit/src/org/netbeans/api/java/source/SourceUtilsTestUtil2.java (-1 / +3 lines)
Lines 46-51 Link Here
46
import com.sun.source.tree.Tree;
46
import com.sun.source.tree.Tree;
47
import org.apache.lucene.store.FSDirectory;
47
import org.apache.lucene.store.FSDirectory;
48
import org.netbeans.modules.java.source.transform.Transformer;
48
import org.netbeans.modules.java.source.transform.Transformer;
49
import org.netbeans.modules.parsing.lucene.LuceneIndex;
50
import org.netbeans.modules.parsing.lucene.support.IndexManagerTestUtilities;
49
51
50
/**
52
/**
51
 *
53
 *
Lines 77-83 Link Here
77
    }
79
    }
78
    
80
    
79
    public static void disableLocks() {
81
    public static void disableLocks() {
80
        FSDirectory.setDisableLocks(true);
82
        LuceneIndex.setDisabledLocks(true);
81
    }
83
    }
82
    
84
    
83
}
85
}
(-)a/java.source/test/unit/src/org/netbeans/modules/java/source/usages/LucenePerformanceTest.java (-3 / +2 lines)
Lines 64-74 Link Here
64
import java.util.TreeSet;
64
import java.util.TreeSet;
65
import javax.lang.model.element.TypeElement;
65
import javax.lang.model.element.TypeElement;
66
import org.apache.lucene.index.Term;
66
import org.apache.lucene.index.Term;
67
import org.apache.lucene.store.FSDirectory;
68
import org.netbeans.api.java.source.ElementHandle;
67
import org.netbeans.api.java.source.ElementHandle;
69
import org.netbeans.junit.NbTestCase;
68
import org.netbeans.junit.NbTestCase;
70
import org.netbeans.modules.parsing.lucene.support.Index;
69
import org.netbeans.modules.parsing.lucene.support.Index;
71
import org.netbeans.modules.parsing.lucene.support.IndexManager;
70
import org.netbeans.modules.parsing.lucene.support.IndexManager;
71
import org.netbeans.modules.parsing.lucene.support.IndexManagerTestUtilities;
72
import org.netbeans.modules.parsing.lucene.support.Queries;
72
import org.netbeans.modules.parsing.lucene.support.Queries;
73
import org.netbeans.modules.parsing.lucene.support.StoppableConvertor;
73
import org.netbeans.modules.parsing.lucene.support.StoppableConvertor;
74
74
Lines 87-94 Link Here
87
    protected @Override void setUp() throws Exception {
87
    protected @Override void setUp() throws Exception {
88
        super.setUp();
88
        super.setUp();
89
	this.clearWorkDir();
89
	this.clearWorkDir();
90
        //jlahoda: disabling Lucene locks for tests (hopefully correct):
90
        IndexManagerTestUtilities.setDisabledLocks(true);
91
        FSDirectory.setDisableLocks(true);
92
        //Prepare indeces        
91
        //Prepare indeces        
93
        File workDir = getWorkDir();
92
        File workDir = getWorkDir();
94
        File cacheFolder = new File (workDir, "cache"); //NOI18N
93
        File cacheFolder = new File (workDir, "cache"); //NOI18N
(-)a/java.sourceui/nbproject/project.xml (-2 / +2 lines)
Lines 45-52 Link Here
45
                    <build-prerequisite/>
45
                    <build-prerequisite/>
46
                    <compile-dependency/>
46
                    <compile-dependency/>
47
                    <run-dependency>
47
                    <run-dependency>
48
                        <release-version>1</release-version>
48
                        <release-version>3</release-version>
49
                        <specification-version>2.12</specification-version>
49
                        <specification-version>3.0</specification-version>
50
                    </run-dependency>
50
                    </run-dependency>
51
                </dependency>
51
                </dependency>
52
                <dependency>
52
                <dependency>
(-)a/libs.lucene/apichanges.xml (+170 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
3
   - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
4
   -
5
   - Copyright 1997-2011 Oracle and/or its affiliates. All rights reserved.
6
   -
7
   - Oracle and Java are registered trademarks of Oracle and/or its affiliates.
8
   - Other names may be trademarks of their respective owners.
9
   -
10
   - The contents of this file are subject to the terms of either the GNU
11
   - General Public License Version 2 only ("GPL") or the Common
12
   - Development and Distribution License("CDDL") (collectively, the
13
   - "License"). You may not use this file except in compliance with the
14
   - License. You can obtain a copy of the License at
15
   - http://www.netbeans.org/cddl-gplv2.html
16
   - or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
17
   - specific language governing permissions and limitations under the
18
   - License.  When distributing the software, include this License Header
19
   - Notice in each file and include the License file at
20
   - nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
21
   - particular file as subject to the "Classpath" exception as provided
22
   - by Sun in the GPL Version 2 section of the License file that
23
   - accompanied this code. If applicable, add the following below the
24
   - License Header, with the fields enclosed by brackets [] replaced by
25
   - your own identifying information:
26
   - "Portions Copyrighted [year] [name of copyright owner]"
27
   -
28
   - Contributor(s):
29
   -
30
   - The Original Software is NetBeans. The Initial Developer of the Original
31
   - Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
32
   - Microsystems, Inc. All Rights Reserved.
33
   -
34
   - If you wish your version of this file to be governed by only the CDDL
35
   - or only the GPL Version 2, indicate your decision by adding
36
   - "[Contributor] elects to include this software in this distribution
37
   - under the [CDDL or GPL Version 2] license." If you do not indicate a
38
   - single choice of license, a recipient has the option to distribute
39
   - your version of this file under either the CDDL, the GPL Version 2 or
40
   - to extend the choice of license to its licensees as provided above.
41
   - However, if you add GPL Version 2 code and therefore, elected the GPL
42
   - Version 2 license, then the option applies only if the new code is
43
   - made subject to such option by the copyright holder.
44
  -->
45
<?xml-stylesheet type="text/xml" href="../nbbuild/javadoctools/apichanges.xsl"?>
46
<!DOCTYPE apichanges PUBLIC
47
	"-//NetBeans//DTD API changes list 1.0//EN"
48
        "../nbbuild/javadoctools/apichanges.dtd"
49
>
50
51
<!--
52
53
INFO FOR PEOPLE ADDING CHANGES:
54
55
Check the DTD (apichanges.dtd) for details on the syntax. You do not
56
need to regenerate the HTML, this will be done periodically; just
57
change the XML. If you can, validate the XML against the DTD, if not
58
do not worry about it. Rough syntax of a change (several parts optional):
59
60
<change>
61
    <api name="compiler"/>
62
    <summary>Some brief description here, can use <b>XHTML</b></summary>
63
    <version major="1" minor="99"/>
64
    <date day="13" month="6" year="2001"/>
65
    <author login="jrhacker"/>
66
    <compatibility addition="yes"/>
67
    <description>
68
        The main description of the change here.
69
        Again can use full <b>XHTML</b> as needed.
70
    </description>
71
    <class package="org.openide.compiler" name="DoWhatIWantCompiler"/>
72
    <issue number="14309"/>
73
</change>
74
75
Also permitted elements: <package>, <branch>. <version> is API spec
76
version, recommended for all new changes. <compatibility> should say
77
if things were added/modified/deprecated/etc. and give all information
78
related to upgrading old code. List affected top-level classes and
79
link to issue numbers if applicable. See the DTD for more details.
80
81
Changes need not be in any particular order, they are sorted in various
82
ways by the stylesheet anyway.
83
84
Dates are assumed to mean "on the trunk". If you *also* make the same
85
change on a stabilization branch, use the <branch> tag to indicate this
86
and explain why the change was made on a branch in the <description>.
87
88
Please only change this file on the trunk! Rather: you can change it
89
on branches if you want, but these changes will be ignored; only the
90
trunk version of this file is important.
91
92
Deprecations do not count as incompatible, assuming that code using the
93
deprecated calls continues to see their documented behavior. But do
94
specify deprecation="yes" in <compatibility>.
95
96
This file is not a replacement for Javadoc: it is intended to list changes,
97
not describe the complete current behavior, for which ordinary documentation
98
is the proper place.
99
100
-->
101
102
<apichanges>
103
104
  <!-- First, a list of API names you may use: -->
105
  <apidefs>
106
    <apidef name="Lucene">Apache Lucene Library</apidef>
107
  </apidefs>
108
109
<!-- ACTUAL CHANGES BEGIN HERE: -->
110
111
  <changes>
112
  <change id="Lucene-3.0.3">
113
      <api name="Lucene"/>
114
      <summary>Updating Lucene library to Lucene 3.0.3</summary>
115
      <version major="3" minor="0"/>
116
      <date day="25" month="1" year="2011"/>
117
      <author login="tzezula"/>
118
      <compatibility source="incompatible" binary="incompatible" semantic="incompatible" deletion="yes" addition="yes" modification="yes"/>
119
      <description>
120
          <p>
121
          Updating Lucene library to 3.0.3. See apichanges for Lucene 3.0.3 and 3.0.0 at http://lucene.apache.org/java/3_0_3/changes/Changes.html 
122
          </p>
123
      </description>
124
      <issue number="194351"/>
125
  </change>
126
127
  </changes>
128
129
  <htmlcontents>
130
<!--
131
132
                            NO NO NO NO NO!
133
134
         ==============>    DO NOT EDIT ME!  <======================
135
136
          AUTOMATICALLY GENERATED FROM APICHANGES.XML, DO NOT EDIT
137
138
                SEE libs.lucene/apichanges.xml
139
140
-->
141
    <head>
142
        <title>Change History for the Parsing Lucene Support Friend API</title>
143
        <link rel="stylesheet" href="prose.css" type="text/css"/>
144
        <meta name="CATEGORY" content="OtherDevelopmentDoc"/>
145
        <meta name="DESCRIPTION" content="A cross-indexed list of all changes made to the Lucene."/>
146
    </head>
147
    <body>
148
        <p class="overviewlink">
149
            <a href="overview-summary.html">Overview</a>
150
        </p>
151
        <h1>Introduction</h1>
152
        <h2>What do the Dates Mean?</h2>
153
        <p>
154
            The supplied dates indicate when the API change was made, on the CVS
155
            trunk. From this you can generally tell whether the change should be
156
            present in a given build or not; for trunk builds, simply whether it
157
            was made before or after the change; for builds on a stabilization
158
            branch, whether the branch was made before or after the given date. In
159
            some cases corresponding API changes have been made both in the trunk
160
            and in an in-progress stabilization branch, if they were needed for a
161
            bug fix; this ought to be marked in this list.
162
        </p>
163
        <hr/>
164
        <standard-changelists module-code-name="$codebase"/>
165
        <hr/>
166
        <p>@FOOTER@</p>
167
    </body>
168
  </htmlcontents>
169
170
</apichanges>
(-)a/libs.lucene/external/binaries-list (-1 / +1 lines)
Line 1 Link Here
1
284963A064E39FA33ECBA8E57CC5581067CD81D1 lucene-core-2.9.3.jar
1
335F7EA0E28A4A1358AA745F4BD2037E8AFE44FC lucene-core-3.0.3.jar
(-)a/libs.lucene/external/lucene-core-2.9.3-license.txt (-210 lines)
Lines 1-210 Link Here
1
Name: Apache Lucene
2
Version: 2.4.1
3
Description: Java-based indexing and search technology
4
License: Apache-2.0
5
Origin: http://lucene.apache.org/
6
Files: lucene-core-2.9.3.jar
7
Source: http://svn.apache.org/repos/asf/lucene/java/trunk
8
OSR: 6381
9
10
                                 Apache License
11
                           Version 2.0, January 2004
12
                        http://www.apache.org/licenses/
13
14
   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
15
16
   1. Definitions.
17
18
      "License" shall mean the terms and conditions for use, reproduction,
19
      and distribution as defined by Sections 1 through 9 of this document.
20
21
      "Licensor" shall mean the copyright owner or entity authorized by
22
      the copyright owner that is granting the License.
23
24
      "Legal Entity" shall mean the union of the acting entity and all
25
      other entities that control, are controlled by, or are under common
26
      control with that entity. For the purposes of this definition,
27
      "control" means (i) the power, direct or indirect, to cause the
28
      direction or management of such entity, whether by contract or
29
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
30
      outstanding shares, or (iii) beneficial ownership of such entity.
31
32
      "You" (or "Your") shall mean an individual or Legal Entity
33
      exercising permissions granted by this License.
34
35
      "Source" form shall mean the preferred form for making modifications,
36
      including but not limited to software source code, documentation
37
      source, and configuration files.
38
39
      "Object" form shall mean any form resulting from mechanical
40
      transformation or translation of a Source form, including but
41
      not limited to compiled object code, generated documentation,
42
      and conversions to other media types.
43
44
      "Work" shall mean the work of authorship, whether in Source or
45
      Object form, made available under the License, as indicated by a
46
      copyright notice that is included in or attached to the work
47
      (an example is provided in the Appendix below).
48
49
      "Derivative Works" shall mean any work, whether in Source or Object
50
      form, that is based on (or derived from) the Work and for which the
51
      editorial revisions, annotations, elaborations, or other modifications
52
      represent, as a whole, an original work of authorship. For the purposes
53
      of this License, Derivative Works shall not include works that remain
54
      separable from, or merely link (or bind by name) to the interfaces of,
55
      the Work and Derivative Works thereof.
56
57
      "Contribution" shall mean any work of authorship, including
58
      the original version of the Work and any modifications or additions
59
      to that Work or Derivative Works thereof, that is intentionally
60
      submitted to Licensor for inclusion in the Work by the copyright owner
61
      or by an individual or Legal Entity authorized to submit on behalf of
62
      the copyright owner. For the purposes of this definition, "submitted"
63
      means any form of electronic, verbal, or written communication sent
64
      to the Licensor or its representatives, including but not limited to
65
      communication on electronic mailing lists, source code control systems,
66
      and issue tracking systems that are managed by, or on behalf of, the
67
      Licensor for the purpose of discussing and improving the Work, but
68
      excluding communication that is conspicuously marked or otherwise
69
      designated in writing by the copyright owner as "Not a Contribution."
70
71
      "Contributor" shall mean Licensor and any individual or Legal Entity
72
      on behalf of whom a Contribution has been received by Licensor and
73
      subsequently incorporated within the Work.
74
75
   2. Grant of Copyright License. Subject to the terms and conditions of
76
      this License, each Contributor hereby grants to You a perpetual,
77
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
      copyright license to reproduce, prepare Derivative Works of,
79
      publicly display, publicly perform, sublicense, and distribute the
80
      Work and such Derivative Works in Source or Object form.
81
82
   3. Grant of Patent License. Subject to the terms and conditions of
83
      this License, each Contributor hereby grants to You a perpetual,
84
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
85
      (except as stated in this section) patent license to make, have made,
86
      use, offer to sell, sell, import, and otherwise transfer the Work,
87
      where such license applies only to those patent claims licensable
88
      by such Contributor that are necessarily infringed by their
89
      Contribution(s) alone or by combination of their Contribution(s)
90
      with the Work to which such Contribution(s) was submitted. If You
91
      institute patent litigation against any entity (including a
92
      cross-claim or counterclaim in a lawsuit) alleging that the Work
93
      or a Contribution incorporated within the Work constitutes direct
94
      or contributory patent infringement, then any patent licenses
95
      granted to You under this License for that Work shall terminate
96
      as of the date such litigation is filed.
97
98
   4. Redistribution. You may reproduce and distribute copies of the
99
      Work or Derivative Works thereof in any medium, with or without
100
      modifications, and in Source or Object form, provided that You
101
      meet the following conditions:
102
103
      (a) You must give any other recipients of the Work or
104
          Derivative Works a copy of this License; and
105
106
      (b) You must cause any modified files to carry prominent notices
107
          stating that You changed the files; and
108
109
      (c) You must retain, in the Source form of any Derivative Works
110
          that You distribute, all copyright, patent, trademark, and
111
          attribution notices from the Source form of the Work,
112
          excluding those notices that do not pertain to any part of
113
          the Derivative Works; and
114
115
      (d) If the Work includes a "NOTICE" text file as part of its
116
          distribution, then any Derivative Works that You distribute must
117
          include a readable copy of the attribution notices contained
118
          within such NOTICE file, excluding those notices that do not
119
          pertain to any part of the Derivative Works, in at least one
120
          of the following places: within a NOTICE text file distributed
121
          as part of the Derivative Works; within the Source form or
122
          documentation, if provided along with the Derivative Works; or,
123
          within a display generated by the Derivative Works, if and
124
          wherever such third-party notices normally appear. The contents
125
          of the NOTICE file are for informational purposes only and
126
          do not modify the License. You may add Your own attribution
127
          notices within Derivative Works that You distribute, alongside
128
          or as an addendum to the NOTICE text from the Work, provided
129
          that such additional attribution notices cannot be construed
130
          as modifying the License.
131
132
      You may add Your own copyright statement to Your modifications and
133
      may provide additional or different license terms and conditions
134
      for use, reproduction, or distribution of Your modifications, or
135
      for any such Derivative Works as a whole, provided Your use,
136
      reproduction, and distribution of the Work otherwise complies with
137
      the conditions stated in this License.
138
139
   5. Submission of Contributions. Unless You explicitly state otherwise,
140
      any Contribution intentionally submitted for inclusion in the Work
141
      by You to the Licensor shall be under the terms and conditions of
142
      this License, without any additional terms or conditions.
143
      Notwithstanding the above, nothing herein shall supersede or modify
144
      the terms of any separate license agreement you may have executed
145
      with Licensor regarding such Contributions.
146
147
   6. Trademarks. This License does not grant permission to use the trade
148
      names, trademarks, service marks, or product names of the Licensor,
149
      except as required for reasonable and customary use in describing the
150
      origin of the Work and reproducing the content of the NOTICE file.
151
152
   7. Disclaimer of Warranty. Unless required by applicable law or
153
      agreed to in writing, Licensor provides the Work (and each
154
      Contributor provides its Contributions) on an "AS IS" BASIS,
155
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
156
      implied, including, without limitation, any warranties or conditions
157
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
158
      PARTICULAR PURPOSE. You are solely responsible for determining the
159
      appropriateness of using or redistributing the Work and assume any
160
      risks associated with Your exercise of permissions under this License.
161
162
   8. Limitation of Liability. In no event and under no legal theory,
163
      whether in tort (including negligence), contract, or otherwise,
164
      unless required by applicable law (such as deliberate and grossly
165
      negligent acts) or agreed to in writing, shall any Contributor be
166
      liable to You for damages, including any direct, indirect, special,
167
      incidental, or consequential damages of any character arising as a
168
      result of this License or out of the use or inability to use the
169
      Work (including but not limited to damages for loss of goodwill,
170
      work stoppage, computer failure or malfunction, or any and all
171
      other commercial damages or losses), even if such Contributor
172
      has been advised of the possibility of such damages.
173
174
   9. Accepting Warranty or Additional Liability. While redistributing
175
      the Work or Derivative Works thereof, You may choose to offer,
176
      and charge a fee for, acceptance of support, warranty, indemnity,
177
      or other liability obligations and/or rights consistent with this
178
      License. However, in accepting such obligations, You may act only
179
      on Your own behalf and on Your sole responsibility, not on behalf
180
      of any other Contributor, and only if You agree to indemnify,
181
      defend, and hold each Contributor harmless for any liability
182
      incurred by, or claims asserted against, such Contributor by reason
183
      of your accepting any such warranty or additional liability.
184
185
   END OF TERMS AND CONDITIONS
186
187
   APPENDIX: How to apply the Apache License to your work.
188
189
      To apply the Apache License to your work, attach the following
190
      boilerplate notice, with the fields enclosed by brackets "[]"
191
      replaced with your own identifying information. (Don't include
192
      the brackets!)  The text should be enclosed in the appropriate
193
      comment syntax for the file format. We also recommend that a
194
      file or class name and description of purpose be included on the
195
      same "printed page" as the copyright notice for easier
196
      identification within third-party archives.
197
198
   Copyright [yyyy] [name of copyright owner]
199
200
   Licensed under the Apache License, Version 2.0 (the "License");
201
   you may not use this file except in compliance with the License.
202
   You may obtain a copy of the License at
203
204
       http://www.apache.org/licenses/LICENSE-2.0
205
206
   Unless required by applicable law or agreed to in writing, software
207
   distributed under the License is distributed on an "AS IS" BASIS,
208
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
209
   See the License for the specific language governing permissions and
210
   limitations under the License.
(-)a/libs.lucene/external/lucene-core-3.0.3-license.txt (+210 lines)
Line 0 Link Here
1
Name: Apache Lucene
2
Version: 3.0.3
3
Description: Java-based indexing and search technology
4
License: Apache-2.0
5
Origin: http://lucene.apache.org/
6
Files: lucene-core-3.0.3.jar
7
Source: http://svn.apache.org/repos/asf/lucene/java/trunk
8
OSR: 6381
9
10
                                 Apache License
11
                           Version 2.0, January 2004
12
                        http://www.apache.org/licenses/
13
14
   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
15
16
   1. Definitions.
17
18
      "License" shall mean the terms and conditions for use, reproduction,
19
      and distribution as defined by Sections 1 through 9 of this document.
20
21
      "Licensor" shall mean the copyright owner or entity authorized by
22
      the copyright owner that is granting the License.
23
24
      "Legal Entity" shall mean the union of the acting entity and all
25
      other entities that control, are controlled by, or are under common
26
      control with that entity. For the purposes of this definition,
27
      "control" means (i) the power, direct or indirect, to cause the
28
      direction or management of such entity, whether by contract or
29
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
30
      outstanding shares, or (iii) beneficial ownership of such entity.
31
32
      "You" (or "Your") shall mean an individual or Legal Entity
33
      exercising permissions granted by this License.
34
35
      "Source" form shall mean the preferred form for making modifications,
36
      including but not limited to software source code, documentation
37
      source, and configuration files.
38
39
      "Object" form shall mean any form resulting from mechanical
40
      transformation or translation of a Source form, including but
41
      not limited to compiled object code, generated documentation,
42
      and conversions to other media types.
43
44
      "Work" shall mean the work of authorship, whether in Source or
45
      Object form, made available under the License, as indicated by a
46
      copyright notice that is included in or attached to the work
47
      (an example is provided in the Appendix below).
48
49
      "Derivative Works" shall mean any work, whether in Source or Object
50
      form, that is based on (or derived from) the Work and for which the
51
      editorial revisions, annotations, elaborations, or other modifications
52
      represent, as a whole, an original work of authorship. For the purposes
53
      of this License, Derivative Works shall not include works that remain
54
      separable from, or merely link (or bind by name) to the interfaces of,
55
      the Work and Derivative Works thereof.
56
57
      "Contribution" shall mean any work of authorship, including
58
      the original version of the Work and any modifications or additions
59
      to that Work or Derivative Works thereof, that is intentionally
60
      submitted to Licensor for inclusion in the Work by the copyright owner
61
      or by an individual or Legal Entity authorized to submit on behalf of
62
      the copyright owner. For the purposes of this definition, "submitted"
63
      means any form of electronic, verbal, or written communication sent
64
      to the Licensor or its representatives, including but not limited to
65
      communication on electronic mailing lists, source code control systems,
66
      and issue tracking systems that are managed by, or on behalf of, the
67
      Licensor for the purpose of discussing and improving the Work, but
68
      excluding communication that is conspicuously marked or otherwise
69
      designated in writing by the copyright owner as "Not a Contribution."
70
71
      "Contributor" shall mean Licensor and any individual or Legal Entity
72
      on behalf of whom a Contribution has been received by Licensor and
73
      subsequently incorporated within the Work.
74
75
   2. Grant of Copyright License. Subject to the terms and conditions of
76
      this License, each Contributor hereby grants to You a perpetual,
77
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
      copyright license to reproduce, prepare Derivative Works of,
79
      publicly display, publicly perform, sublicense, and distribute the
80
      Work and such Derivative Works in Source or Object form.
81
82
   3. Grant of Patent License. Subject to the terms and conditions of
83
      this License, each Contributor hereby grants to You a perpetual,
84
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
85
      (except as stated in this section) patent license to make, have made,
86
      use, offer to sell, sell, import, and otherwise transfer the Work,
87
      where such license applies only to those patent claims licensable
88
      by such Contributor that are necessarily infringed by their
89
      Contribution(s) alone or by combination of their Contribution(s)
90
      with the Work to which such Contribution(s) was submitted. If You
91
      institute patent litigation against any entity (including a
92
      cross-claim or counterclaim in a lawsuit) alleging that the Work
93
      or a Contribution incorporated within the Work constitutes direct
94
      or contributory patent infringement, then any patent licenses
95
      granted to You under this License for that Work shall terminate
96
      as of the date such litigation is filed.
97
98
   4. Redistribution. You may reproduce and distribute copies of the
99
      Work or Derivative Works thereof in any medium, with or without
100
      modifications, and in Source or Object form, provided that You
101
      meet the following conditions:
102
103
      (a) You must give any other recipients of the Work or
104
          Derivative Works a copy of this License; and
105
106
      (b) You must cause any modified files to carry prominent notices
107
          stating that You changed the files; and
108
109
      (c) You must retain, in the Source form of any Derivative Works
110
          that You distribute, all copyright, patent, trademark, and
111
          attribution notices from the Source form of the Work,
112
          excluding those notices that do not pertain to any part of
113
          the Derivative Works; and
114
115
      (d) If the Work includes a "NOTICE" text file as part of its
116
          distribution, then any Derivative Works that You distribute must
117
          include a readable copy of the attribution notices contained
118
          within such NOTICE file, excluding those notices that do not
119
          pertain to any part of the Derivative Works, in at least one
120
          of the following places: within a NOTICE text file distributed
121
          as part of the Derivative Works; within the Source form or
122
          documentation, if provided along with the Derivative Works; or,
123
          within a display generated by the Derivative Works, if and
124
          wherever such third-party notices normally appear. The contents
125
          of the NOTICE file are for informational purposes only and
126
          do not modify the License. You may add Your own attribution
127
          notices within Derivative Works that You distribute, alongside
128
          or as an addendum to the NOTICE text from the Work, provided
129
          that such additional attribution notices cannot be construed
130
          as modifying the License.
131
132
      You may add Your own copyright statement to Your modifications and
133
      may provide additional or different license terms and conditions
134
      for use, reproduction, or distribution of Your modifications, or
135
      for any such Derivative Works as a whole, provided Your use,
136
      reproduction, and distribution of the Work otherwise complies with
137
      the conditions stated in this License.
138
139
   5. Submission of Contributions. Unless You explicitly state otherwise,
140
      any Contribution intentionally submitted for inclusion in the Work
141
      by You to the Licensor shall be under the terms and conditions of
142
      this License, without any additional terms or conditions.
143
      Notwithstanding the above, nothing herein shall supersede or modify
144
      the terms of any separate license agreement you may have executed
145
      with Licensor regarding such Contributions.
146
147
   6. Trademarks. This License does not grant permission to use the trade
148
      names, trademarks, service marks, or product names of the Licensor,
149
      except as required for reasonable and customary use in describing the
150
      origin of the Work and reproducing the content of the NOTICE file.
151
152
   7. Disclaimer of Warranty. Unless required by applicable law or
153
      agreed to in writing, Licensor provides the Work (and each
154
      Contributor provides its Contributions) on an "AS IS" BASIS,
155
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
156
      implied, including, without limitation, any warranties or conditions
157
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
158
      PARTICULAR PURPOSE. You are solely responsible for determining the
159
      appropriateness of using or redistributing the Work and assume any
160
      risks associated with Your exercise of permissions under this License.
161
162
   8. Limitation of Liability. In no event and under no legal theory,
163
      whether in tort (including negligence), contract, or otherwise,
164
      unless required by applicable law (such as deliberate and grossly
165
      negligent acts) or agreed to in writing, shall any Contributor be
166
      liable to You for damages, including any direct, indirect, special,
167
      incidental, or consequential damages of any character arising as a
168
      result of this License or out of the use or inability to use the
169
      Work (including but not limited to damages for loss of goodwill,
170
      work stoppage, computer failure or malfunction, or any and all
171
      other commercial damages or losses), even if such Contributor
172
      has been advised of the possibility of such damages.
173
174
   9. Accepting Warranty or Additional Liability. While redistributing
175
      the Work or Derivative Works thereof, You may choose to offer,
176
      and charge a fee for, acceptance of support, warranty, indemnity,
177
      or other liability obligations and/or rights consistent with this
178
      License. However, in accepting such obligations, You may act only
179
      on Your own behalf and on Your sole responsibility, not on behalf
180
      of any other Contributor, and only if You agree to indemnify,
181
      defend, and hold each Contributor harmless for any liability
182
      incurred by, or claims asserted against, such Contributor by reason
183
      of your accepting any such warranty or additional liability.
184
185
   END OF TERMS AND CONDITIONS
186
187
   APPENDIX: How to apply the Apache License to your work.
188
189
      To apply the Apache License to your work, attach the following
190
      boilerplate notice, with the fields enclosed by brackets "[]"
191
      replaced with your own identifying information. (Don't include
192
      the brackets!)  The text should be enclosed in the appropriate
193
      comment syntax for the file format. We also recommend that a
194
      file or class name and description of purpose be included on the
195
      same "printed page" as the copyright notice for easier
196
      identification within third-party archives.
197
198
   Copyright [yyyy] [name of copyright owner]
199
200
   Licensed under the Apache License, Version 2.0 (the "License");
201
   you may not use this file except in compliance with the License.
202
   You may obtain a copy of the License at
203
204
       http://www.apache.org/licenses/LICENSE-2.0
205
206
   Unless required by applicable law or agreed to in writing, software
207
   distributed under the License is distributed on an "AS IS" BASIS,
208
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
209
   See the License for the specific language governing permissions and
210
   limitations under the License.
(-)a/libs.lucene/manifest.mf (-1 / +1 lines)
Lines 1-4 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.libs.lucene/1
2
OpenIDE-Module: org.netbeans.libs.lucene/3
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/libs/lucene/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/libs/lucene/Bundle.properties
4
OpenIDE-Module-Implementation-Version: 232
4
OpenIDE-Module-Implementation-Version: 232
(-)a/libs.lucene/nbproject/project.properties (-2 / +3 lines)
Lines 41-45 Link Here
41
# made subject to such option by the copyright holder.
41
# made subject to such option by the copyright holder.
42
42
43
is.autoload=true
43
is.autoload=true
44
release.external/lucene-core-2.9.3.jar=modules/ext/lucene-core-2.9.3.jar
44
javadoc.apichanges=${basedir}/apichanges.xml
45
spec.version.base=2.13.0
45
release.external/lucene-core-3.0.3.jar=modules/ext/lucene-core-3.0.3.jar
46
spec.version.base=3.0.0
(-)a/libs.lucene/nbproject/project.xml (-2 / +2 lines)
Lines 53-60 Link Here
53
                <subpackages>org</subpackages>
53
                <subpackages>org</subpackages>
54
            </public-packages>
54
            </public-packages>
55
            <class-path-extension>
55
            <class-path-extension>
56
                <runtime-relative-path>ext/lucene-core-2.9.3.jar</runtime-relative-path>
56
                <runtime-relative-path>ext/lucene-core-3.0.3.jar</runtime-relative-path>
57
                <binary-origin>external/lucene-core-2.9.3.jar</binary-origin>
57
                <binary-origin>external/lucene-core-3.0.3.jar</binary-origin>
58
            </class-path-extension>
58
            </class-path-extension>
59
        </data>
59
        </data>
60
    </configuration>
60
    </configuration>
(-)a/maven.embedder/nbproject/project.xml (+2 lines)
Lines 217-222 Link Here
217
                <package>org.sonatype.aether.transfer</package>
217
                <package>org.sonatype.aether.transfer</package>
218
                <package>org.sonatype.aether.util</package>
218
                <package>org.sonatype.aether.util</package>
219
                <package>org.sonatype.aether.util.repository</package>
219
                <package>org.sonatype.aether.util.repository</package>
220
                <package>org.sonatype.aether.util.version</package>
221
                <package>org.sonatype.aether.version</package>
220
            </friend-packages>
222
            </friend-packages>
221
            <class-path-extension>
223
            <class-path-extension>
222
                <runtime-relative-path>ext/maven/maven-dependency-tree-1.2.jar</runtime-relative-path>
224
                <runtime-relative-path>ext/maven/maven-dependency-tree-1.2.jar</runtime-relative-path>
(-)a/maven.hints/nbproject/project.xml (-2 / +2 lines)
Lines 62-69 Link Here
62
                    <build-prerequisite/>
62
                    <build-prerequisite/>
63
                    <compile-dependency/>
63
                    <compile-dependency/>
64
                    <run-dependency>
64
                    <run-dependency>
65
                        <release-version>1</release-version>
65
                        <release-version>3</release-version>
66
                        <specification-version>2.13</specification-version>
66
                        <specification-version>3.0</specification-version>
67
                    </run-dependency>
67
                    </run-dependency>
68
                </dependency>
68
                </dependency>
69
                <dependency>
69
                <dependency>
(-)a/maven.indexer/external/binaries-list (-2 / +2 lines)
Lines 1-2 Link Here
1
7AB67E6B20E5332A7FB4FDF2F019AEC4275846C2 indexer-core-3.1.0.jar
1
3AF24D401F76D153B77641865737DE53E41E60D6 indexer-artifact-4.0.0.jar
2
30DCFB82558DC5452AC135F267401E214A0E9859 indexer-artifact-3.1.0.jar
2
39E868B62080080DC349253E6050DF4B6ABAAE60 indexer-core-4.0.0.jar
(-)a/maven.indexer/external/maven-indexer-3.1.0-license.txt (-209 lines)
Lines 1-209 Link Here
1
Name: Maven Indexer
2
Version: 3.1.0
3
Description: Maven remote repository indexing engine.
4
License: Apache-2.0
5
Origin: http://repo1.maven.org/maven2/org/apache/maven/indexer/
6
Files: indexer-core-3.1.0.jar indexer-artifact-3.1.0.jar
7
OSR: 9451
8
9
                                 Apache License
10
                           Version 2.0, January 2004
11
                        http://www.apache.org/licenses/
12
13
   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
14
15
   1. Definitions.
16
17
      "License" shall mean the terms and conditions for use, reproduction,
18
      and distribution as defined by Sections 1 through 9 of this document.
19
20
      "Licensor" shall mean the copyright owner or entity authorized by
21
      the copyright owner that is granting the License.
22
23
      "Legal Entity" shall mean the union of the acting entity and all
24
      other entities that control, are controlled by, or are under common
25
      control with that entity. For the purposes of this definition,
26
      "control" means (i) the power, direct or indirect, to cause the
27
      direction or management of such entity, whether by contract or
28
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
29
      outstanding shares, or (iii) beneficial ownership of such entity.
30
31
      "You" (or "Your") shall mean an individual or Legal Entity
32
      exercising permissions granted by this License.
33
34
      "Source" form shall mean the preferred form for making modifications,
35
      including but not limited to software source code, documentation
36
      source, and configuration files.
37
38
      "Object" form shall mean any form resulting from mechanical
39
      transformation or translation of a Source form, including but
40
      not limited to compiled object code, generated documentation,
41
      and conversions to other media types.
42
43
      "Work" shall mean the work of authorship, whether in Source or
44
      Object form, made available under the License, as indicated by a
45
      copyright notice that is included in or attached to the work
46
      (an example is provided in the Appendix below).
47
48
      "Derivative Works" shall mean any work, whether in Source or Object
49
      form, that is based on (or derived from) the Work and for which the
50
      editorial revisions, annotations, elaborations, or other modifications
51
      represent, as a whole, an original work of authorship. For the purposes
52
      of this License, Derivative Works shall not include works that remain
53
      separable from, or merely link (or bind by name) to the interfaces of,
54
      the Work and Derivative Works thereof.
55
56
      "Contribution" shall mean any work of authorship, including
57
      the original version of the Work and any modifications or additions
58
      to that Work or Derivative Works thereof, that is intentionally
59
      submitted to Licensor for inclusion in the Work by the copyright owner
60
      or by an individual or Legal Entity authorized to submit on behalf of
61
      the copyright owner. For the purposes of this definition, "submitted"
62
      means any form of electronic, verbal, or written communication sent
63
      to the Licensor or its representatives, including but not limited to
64
      communication on electronic mailing lists, source code control systems,
65
      and issue tracking systems that are managed by, or on behalf of, the
66
      Licensor for the purpose of discussing and improving the Work, but
67
      excluding communication that is conspicuously marked or otherwise
68
      designated in writing by the copyright owner as "Not a Contribution."
69
70
      "Contributor" shall mean Licensor and any individual or Legal Entity
71
      on behalf of whom a Contribution has been received by Licensor and
72
      subsequently incorporated within the Work.
73
74
   2. Grant of Copyright License. Subject to the terms and conditions of
75
      this License, each Contributor hereby grants to You a perpetual,
76
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
      copyright license to reproduce, prepare Derivative Works of,
78
      publicly display, publicly perform, sublicense, and distribute the
79
      Work and such Derivative Works in Source or Object form.
80
81
   3. Grant of Patent License. Subject to the terms and conditions of
82
      this License, each Contributor hereby grants to You a perpetual,
83
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
84
      (except as stated in this section) patent license to make, have made,
85
      use, offer to sell, sell, import, and otherwise transfer the Work,
86
      where such license applies only to those patent claims licensable
87
      by such Contributor that are necessarily infringed by their
88
      Contribution(s) alone or by combination of their Contribution(s)
89
      with the Work to which such Contribution(s) was submitted. If You
90
      institute patent litigation against any entity (including a
91
      cross-claim or counterclaim in a lawsuit) alleging that the Work
92
      or a Contribution incorporated within the Work constitutes direct
93
      or contributory patent infringement, then any patent licenses
94
      granted to You under this License for that Work shall terminate
95
      as of the date such litigation is filed.
96
97
   4. Redistribution. You may reproduce and distribute copies of the
98
      Work or Derivative Works thereof in any medium, with or without
99
      modifications, and in Source or Object form, provided that You
100
      meet the following conditions:
101
102
      (a) You must give any other recipients of the Work or
103
          Derivative Works a copy of this License; and
104
105
      (b) You must cause any modified files to carry prominent notices
106
          stating that You changed the files; and
107
108
      (c) You must retain, in the Source form of any Derivative Works
109
          that You distribute, all copyright, patent, trademark, and
110
          attribution notices from the Source form of the Work,
111
          excluding those notices that do not pertain to any part of
112
          the Derivative Works; and
113
114
      (d) If the Work includes a "NOTICE" text file as part of its
115
          distribution, then any Derivative Works that You distribute must
116
          include a readable copy of the attribution notices contained
117
          within such NOTICE file, excluding those notices that do not
118
          pertain to any part of the Derivative Works, in at least one
119
          of the following places: within a NOTICE text file distributed
120
          as part of the Derivative Works; within the Source form or
121
          documentation, if provided along with the Derivative Works; or,
122
          within a display generated by the Derivative Works, if and
123
          wherever such third-party notices normally appear. The contents
124
          of the NOTICE file are for informational purposes only and
125
          do not modify the License. You may add Your own attribution
126
          notices within Derivative Works that You distribute, alongside
127
          or as an addendum to the NOTICE text from the Work, provided
128
          that such additional attribution notices cannot be construed
129
          as modifying the License.
130
131
      You may add Your own copyright statement to Your modifications and
132
      may provide additional or different license terms and conditions
133
      for use, reproduction, or distribution of Your modifications, or
134
      for any such Derivative Works as a whole, provided Your use,
135
      reproduction, and distribution of the Work otherwise complies with
136
      the conditions stated in this License.
137
138
   5. Submission of Contributions. Unless You explicitly state otherwise,
139
      any Contribution intentionally submitted for inclusion in the Work
140
      by You to the Licensor shall be under the terms and conditions of
141
      this License, without any additional terms or conditions.
142
      Notwithstanding the above, nothing herein shall supersede or modify
143
      the terms of any separate license agreement you may have executed
144
      with Licensor regarding such Contributions.
145
146
   6. Trademarks. This License does not grant permission to use the trade
147
      names, trademarks, service marks, or product names of the Licensor,
148
      except as required for reasonable and customary use in describing the
149
      origin of the Work and reproducing the content of the NOTICE file.
150
151
   7. Disclaimer of Warranty. Unless required by applicable law or
152
      agreed to in writing, Licensor provides the Work (and each
153
      Contributor provides its Contributions) on an "AS IS" BASIS,
154
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
155
      implied, including, without limitation, any warranties or conditions
156
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
157
      PARTICULAR PURPOSE. You are solely responsible for determining the
158
      appropriateness of using or redistributing the Work and assume any
159
      risks associated with Your exercise of permissions under this License.
160
161
   8. Limitation of Liability. In no event and under no legal theory,
162
      whether in tort (including negligence), contract, or otherwise,
163
      unless required by applicable law (such as deliberate and grossly
164
      negligent acts) or agreed to in writing, shall any Contributor be
165
      liable to You for damages, including any direct, indirect, special,
166
      incidental, or consequential damages of any character arising as a
167
      result of this License or out of the use or inability to use the
168
      Work (including but not limited to damages for loss of goodwill,
169
      work stoppage, computer failure or malfunction, or any and all
170
      other commercial damages or losses), even if such Contributor
171
      has been advised of the possibility of such damages.
172
173
   9. Accepting Warranty or Additional Liability. While redistributing
174
      the Work or Derivative Works thereof, You may choose to offer,
175
      and charge a fee for, acceptance of support, warranty, indemnity,
176
      or other liability obligations and/or rights consistent with this
177
      License. However, in accepting such obligations, You may act only
178
      on Your own behalf and on Your sole responsibility, not on behalf
179
      of any other Contributor, and only if You agree to indemnify,
180
      defend, and hold each Contributor harmless for any liability
181
      incurred by, or claims asserted against, such Contributor by reason
182
      of your accepting any such warranty or additional liability.
183
184
   END OF TERMS AND CONDITIONS
185
186
   APPENDIX: How to apply the Apache License to your work.
187
188
      To apply the Apache License to your work, attach the following
189
      boilerplate notice, with the fields enclosed by brackets "[]"
190
      replaced with your own identifying information. (Don't include
191
      the brackets!)  The text should be enclosed in the appropriate
192
      comment syntax for the file format. We also recommend that a
193
      file or class name and description of purpose be included on the
194
      same "printed page" as the copyright notice for easier
195
      identification within third-party archives.
196
197
   Copyright [yyyy] [name of copyright owner]
198
199
   Licensed under the Apache License, Version 2.0 (the "License");
200
   you may not use this file except in compliance with the License.
201
   You may obtain a copy of the License at
202
203
       http://www.apache.org/licenses/LICENSE-2.0
204
205
   Unless required by applicable law or agreed to in writing, software
206
   distributed under the License is distributed on an "AS IS" BASIS,
207
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
208
   See the License for the specific language governing permissions and
209
   limitations under the License.
(-)a/maven.indexer/external/maven-indexer-4.0.0-license.txt (+209 lines)
Line 0 Link Here
1
Name: Maven Indexer
2
Version: 4.0.0
3
Description: Maven remote repository indexing engine.
4
License: Apache-2.0
5
Origin: https://repository.apache.org/content/repositories/maven-016/
6
Files: indexer-core-4.0.0.jar indexer-artifact-4.0.0.jar
7
OSR: 9451
8
9
                                 Apache License
10
                           Version 2.0, January 2004
11
                        http://www.apache.org/licenses/
12
13
   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
14
15
   1. Definitions.
16
17
      "License" shall mean the terms and conditions for use, reproduction,
18
      and distribution as defined by Sections 1 through 9 of this document.
19
20
      "Licensor" shall mean the copyright owner or entity authorized by
21
      the copyright owner that is granting the License.
22
23
      "Legal Entity" shall mean the union of the acting entity and all
24
      other entities that control, are controlled by, or are under common
25
      control with that entity. For the purposes of this definition,
26
      "control" means (i) the power, direct or indirect, to cause the
27
      direction or management of such entity, whether by contract or
28
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
29
      outstanding shares, or (iii) beneficial ownership of such entity.
30
31
      "You" (or "Your") shall mean an individual or Legal Entity
32
      exercising permissions granted by this License.
33
34
      "Source" form shall mean the preferred form for making modifications,
35
      including but not limited to software source code, documentation
36
      source, and configuration files.
37
38
      "Object" form shall mean any form resulting from mechanical
39
      transformation or translation of a Source form, including but
40
      not limited to compiled object code, generated documentation,
41
      and conversions to other media types.
42
43
      "Work" shall mean the work of authorship, whether in Source or
44
      Object form, made available under the License, as indicated by a
45
      copyright notice that is included in or attached to the work
46
      (an example is provided in the Appendix below).
47
48
      "Derivative Works" shall mean any work, whether in Source or Object
49
      form, that is based on (or derived from) the Work and for which the
50
      editorial revisions, annotations, elaborations, or other modifications
51
      represent, as a whole, an original work of authorship. For the purposes
52
      of this License, Derivative Works shall not include works that remain
53
      separable from, or merely link (or bind by name) to the interfaces of,
54
      the Work and Derivative Works thereof.
55
56
      "Contribution" shall mean any work of authorship, including
57
      the original version of the Work and any modifications or additions
58
      to that Work or Derivative Works thereof, that is intentionally
59
      submitted to Licensor for inclusion in the Work by the copyright owner
60
      or by an individual or Legal Entity authorized to submit on behalf of
61
      the copyright owner. For the purposes of this definition, "submitted"
62
      means any form of electronic, verbal, or written communication sent
63
      to the Licensor or its representatives, including but not limited to
64
      communication on electronic mailing lists, source code control systems,
65
      and issue tracking systems that are managed by, or on behalf of, the
66
      Licensor for the purpose of discussing and improving the Work, but
67
      excluding communication that is conspicuously marked or otherwise
68
      designated in writing by the copyright owner as "Not a Contribution."
69
70
      "Contributor" shall mean Licensor and any individual or Legal Entity
71
      on behalf of whom a Contribution has been received by Licensor and
72
      subsequently incorporated within the Work.
73
74
   2. Grant of Copyright License. Subject to the terms and conditions of
75
      this License, each Contributor hereby grants to You a perpetual,
76
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
      copyright license to reproduce, prepare Derivative Works of,
78
      publicly display, publicly perform, sublicense, and distribute the
79
      Work and such Derivative Works in Source or Object form.
80
81
   3. Grant of Patent License. Subject to the terms and conditions of
82
      this License, each Contributor hereby grants to You a perpetual,
83
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
84
      (except as stated in this section) patent license to make, have made,
85
      use, offer to sell, sell, import, and otherwise transfer the Work,
86
      where such license applies only to those patent claims licensable
87
      by such Contributor that are necessarily infringed by their
88
      Contribution(s) alone or by combination of their Contribution(s)
89
      with the Work to which such Contribution(s) was submitted. If You
90
      institute patent litigation against any entity (including a
91
      cross-claim or counterclaim in a lawsuit) alleging that the Work
92
      or a Contribution incorporated within the Work constitutes direct
93
      or contributory patent infringement, then any patent licenses
94
      granted to You under this License for that Work shall terminate
95
      as of the date such litigation is filed.
96
97
   4. Redistribution. You may reproduce and distribute copies of the
98
      Work or Derivative Works thereof in any medium, with or without
99
      modifications, and in Source or Object form, provided that You
100
      meet the following conditions:
101
102
      (a) You must give any other recipients of the Work or
103
          Derivative Works a copy of this License; and
104
105
      (b) You must cause any modified files to carry prominent notices
106
          stating that You changed the files; and
107
108
      (c) You must retain, in the Source form of any Derivative Works
109
          that You distribute, all copyright, patent, trademark, and
110
          attribution notices from the Source form of the Work,
111
          excluding those notices that do not pertain to any part of
112
          the Derivative Works; and
113
114
      (d) If the Work includes a "NOTICE" text file as part of its
115
          distribution, then any Derivative Works that You distribute must
116
          include a readable copy of the attribution notices contained
117
          within such NOTICE file, excluding those notices that do not
118
          pertain to any part of the Derivative Works, in at least one
119
          of the following places: within a NOTICE text file distributed
120
          as part of the Derivative Works; within the Source form or
121
          documentation, if provided along with the Derivative Works; or,
122
          within a display generated by the Derivative Works, if and
123
          wherever such third-party notices normally appear. The contents
124
          of the NOTICE file are for informational purposes only and
125
          do not modify the License. You may add Your own attribution
126
          notices within Derivative Works that You distribute, alongside
127
          or as an addendum to the NOTICE text from the Work, provided
128
          that such additional attribution notices cannot be construed
129
          as modifying the License.
130
131
      You may add Your own copyright statement to Your modifications and
132
      may provide additional or different license terms and conditions
133
      for use, reproduction, or distribution of Your modifications, or
134
      for any such Derivative Works as a whole, provided Your use,
135
      reproduction, and distribution of the Work otherwise complies with
136
      the conditions stated in this License.
137
138
   5. Submission of Contributions. Unless You explicitly state otherwise,
139
      any Contribution intentionally submitted for inclusion in the Work
140
      by You to the Licensor shall be under the terms and conditions of
141
      this License, without any additional terms or conditions.
142
      Notwithstanding the above, nothing herein shall supersede or modify
143
      the terms of any separate license agreement you may have executed
144
      with Licensor regarding such Contributions.
145
146
   6. Trademarks. This License does not grant permission to use the trade
147
      names, trademarks, service marks, or product names of the Licensor,
148
      except as required for reasonable and customary use in describing the
149
      origin of the Work and reproducing the content of the NOTICE file.
150
151
   7. Disclaimer of Warranty. Unless required by applicable law or
152
      agreed to in writing, Licensor provides the Work (and each
153
      Contributor provides its Contributions) on an "AS IS" BASIS,
154
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
155
      implied, including, without limitation, any warranties or conditions
156
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
157
      PARTICULAR PURPOSE. You are solely responsible for determining the
158
      appropriateness of using or redistributing the Work and assume any
159
      risks associated with Your exercise of permissions under this License.
160
161
   8. Limitation of Liability. In no event and under no legal theory,
162
      whether in tort (including negligence), contract, or otherwise,
163
      unless required by applicable law (such as deliberate and grossly
164
      negligent acts) or agreed to in writing, shall any Contributor be
165
      liable to You for damages, including any direct, indirect, special,
166
      incidental, or consequential damages of any character arising as a
167
      result of this License or out of the use or inability to use the
168
      Work (including but not limited to damages for loss of goodwill,
169
      work stoppage, computer failure or malfunction, or any and all
170
      other commercial damages or losses), even if such Contributor
171
      has been advised of the possibility of such damages.
172
173
   9. Accepting Warranty or Additional Liability. While redistributing
174
      the Work or Derivative Works thereof, You may choose to offer,
175
      and charge a fee for, acceptance of support, warranty, indemnity,
176
      or other liability obligations and/or rights consistent with this
177
      License. However, in accepting such obligations, You may act only
178
      on Your own behalf and on Your sole responsibility, not on behalf
179
      of any other Contributor, and only if You agree to indemnify,
180
      defend, and hold each Contributor harmless for any liability
181
      incurred by, or claims asserted against, such Contributor by reason
182
      of your accepting any such warranty or additional liability.
183
184
   END OF TERMS AND CONDITIONS
185
186
   APPENDIX: How to apply the Apache License to your work.
187
188
      To apply the Apache License to your work, attach the following
189
      boilerplate notice, with the fields enclosed by brackets "[]"
190
      replaced with your own identifying information. (Don't include
191
      the brackets!)  The text should be enclosed in the appropriate
192
      comment syntax for the file format. We also recommend that a
193
      file or class name and description of purpose be included on the
194
      same "printed page" as the copyright notice for easier
195
      identification within third-party archives.
196
197
   Copyright [yyyy] [name of copyright owner]
198
199
   Licensed under the Apache License, Version 2.0 (the "License");
200
   you may not use this file except in compliance with the License.
201
   You may obtain a copy of the License at
202
203
       http://www.apache.org/licenses/LICENSE-2.0
204
205
   Unless required by applicable law or agreed to in writing, software
206
   distributed under the License is distributed on an "AS IS" BASIS,
207
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
208
   See the License for the specific language governing permissions and
209
   limitations under the License.
(-)a/maven.indexer/nbproject/project.properties (-2 / +3 lines)
Lines 41-45 Link Here
41
is.autoload=true
41
is.autoload=true
42
javac.source=1.6
42
javac.source=1.6
43
javac.compilerargs=-Xlint -Xlint:-serial
43
javac.compilerargs=-Xlint -Xlint:-serial
44
release.external/indexer-core-3.1.0.jar=modules/ext/maven/indexer-core-3.1.0.jar
44
release.external/indexer-core-4.0.0.jar=modules/ext/maven/indexer-core-4.0.0.jar
45
release.external/indexer-artifact-3.1.0.jar=modules/ext/maven/indexer-artifact-3.1.0.jar
45
release.external/indexer-artifact-4.0.0.jar=modules/ext/maven/indexer-artifact-4.0.0.jar
46
(-)a/maven.indexer/nbproject/project.xml (-6 / +6 lines)
Lines 81-88 Link Here
81
                    <build-prerequisite/>
81
                    <build-prerequisite/>
82
                    <compile-dependency/>
82
                    <compile-dependency/>
83
                    <run-dependency>
83
                    <run-dependency>
84
                        <release-version>1</release-version>
84
                        <release-version>3</release-version>
85
                        <specification-version>2.4</specification-version>
85
                        <specification-version>3.0</specification-version>
86
                    </run-dependency>
86
                    </run-dependency>
87
                </dependency>
87
                </dependency>
88
                <dependency>
88
                <dependency>
Lines 181-192 Link Here
181
                <package>org.netbeans.modules.maven.indexer.spi.ui</package>
181
                <package>org.netbeans.modules.maven.indexer.spi.ui</package>
182
            </friend-packages>
182
            </friend-packages>
183
            <class-path-extension>
183
            <class-path-extension>
184
                <runtime-relative-path>ext/maven/indexer-core-3.1.0.jar</runtime-relative-path>
184
                <runtime-relative-path>ext/maven/indexer-core-4.0.0.jar</runtime-relative-path>
185
                <binary-origin>external/indexer-core-3.1.0.jar</binary-origin>
185
                <binary-origin>release/modules/ext/indexer-core-4.0.0.jar</binary-origin>
186
            </class-path-extension>
186
            </class-path-extension>
187
            <class-path-extension>
187
            <class-path-extension>
188
                <runtime-relative-path>ext/maven/indexer-artifact-3.1.0.jar</runtime-relative-path>
188
                <runtime-relative-path>ext/maven/indexer-artifact-4.0.0.jar</runtime-relative-path>
189
                <binary-origin>external/indexer-artifact-3.1.0.jar</binary-origin>
189
                <binary-origin>release/modules/ext/indexer-artifact-4.0.0.jar</binary-origin>
190
            </class-path-extension>
190
            </class-path-extension>
191
        </data>
191
        </data>
192
    </configuration>
192
    </configuration>
(-)a/maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java (-6 / +12 lines)
Lines 42-47 Link Here
42
package org.netbeans.modules.maven.indexer;
42
package org.netbeans.modules.maven.indexer;
43
43
44
import java.io.FileNotFoundException;
44
import java.io.FileNotFoundException;
45
import org.apache.maven.index.expr.StringSearchExpression;
45
import org.codehaus.plexus.util.FileUtils;
46
import org.codehaus.plexus.util.FileUtils;
46
import java.util.Map;
47
import java.util.Map;
47
import org.apache.lucene.document.Document;
48
import org.apache.lucene.document.Document;
Lines 98-103 Link Here
98
import org.apache.maven.index.GroupedSearchRequest;
99
import org.apache.maven.index.GroupedSearchRequest;
99
import org.apache.maven.index.GroupedSearchResponse;
100
import org.apache.maven.index.GroupedSearchResponse;
100
import org.apache.maven.index.IndexerFieldVersion;
101
import org.apache.maven.index.IndexerFieldVersion;
102
import org.apache.maven.index.MAVEN;
101
import org.apache.maven.index.NexusIndexer;
103
import org.apache.maven.index.NexusIndexer;
102
import org.apache.maven.index.context.IndexingContext;
104
import org.apache.maven.index.context.IndexingContext;
103
import org.apache.maven.index.creator.AbstractIndexCreator;
105
import org.apache.maven.index.creator.AbstractIndexCreator;
Lines 766-772 Link Here
766
                getRepoMutex(slowrepo).writeAccess(new Mutex.ExceptionAction<Void>() {
768
                getRepoMutex(slowrepo).writeAccess(new Mutex.ExceptionAction<Void>() {
767
                    public @Override Void run() throws Exception {
769
                    public @Override Void run() throws Exception {
768
                        BooleanQuery bq = new BooleanQuery();
770
                        BooleanQuery bq = new BooleanQuery();
769
                        bq.add(new BooleanClause(new PrefixQuery(new Term(ArtifactInfo.UINFO, prefix)), BooleanClause.Occur.MUST));
771
                        String uinfo = ArtifactInfo.UINFO;
772
                        final Term term = new Term(uinfo, prefix);
773
                        final Query prefQuery = new PrefixQuery(term);
774
                        bq.add(new BooleanClause(prefQuery, BooleanClause.Occur.MUST));
770
                        GroupedSearchRequest gsr = new GroupedSearchRequest(bq, new GGrouping(),
775
                        GroupedSearchRequest gsr = new GroupedSearchRequest(bq, new GGrouping(),
771
                                new Comparator<String>() {
776
                                new Comparator<String>() {
772
777
Lines 883-889 Link Here
883
                    public @Override Void run() throws Exception {
888
                    public @Override Void run() throws Exception {
884
                        loadIndexingContext(repo);
889
                        loadIndexingContext(repo);
885
                        String clsname = className.replace(".", "/");
890
                        String clsname = className.replace(".", "/");
886
                        FlatSearchRequest fsr = new FlatSearchRequest(setBooleanRewrite(indexer.constructQuery(ArtifactInfo.NAMES, clsname.toLowerCase())),
891
                        FlatSearchRequest fsr = new FlatSearchRequest(setBooleanRewrite(
892
                                indexer.constructQuery(MAVEN.CLASSNAMES, new StringSearchExpression(clsname.toLowerCase()))),
887
                                ArtifactInfo.VERSION_COMPARATOR);
893
                                ArtifactInfo.VERSION_COMPARATOR);
888
                        fsr.setAiCount(MAX_RESULT_COUNT);
894
                        fsr.setAiCount(MAX_RESULT_COUNT);
889
                        FlatSearchResponse response = repeatedFlatSearch(fsr, getContexts(new RepositoryInfo[]{repo}), false);
895
                        FlatSearchResponse response = repeatedFlatSearch(fsr, getContexts(new RepositoryInfo[]{repo}), false);
Lines 941-947 Link Here
941
                    public @Override Void run() throws Exception {
947
                    public @Override Void run() throws Exception {
942
                        loadIndexingContext(repo);
948
                        loadIndexingContext(repo);
943
                        BooleanQuery bq = new BooleanQuery();
949
                        BooleanQuery bq = new BooleanQuery();
944
                        bq.add(new BooleanClause((setBooleanRewrite(indexer.constructQuery(ArtifactInfo.SHA1, sha1))), BooleanClause.Occur.SHOULD));
950
                        bq.add(new BooleanClause((setBooleanRewrite(indexer.constructQuery(MAVEN.SHA1, new StringSearchExpression(sha1)))), BooleanClause.Occur.SHOULD));
945
                        FlatSearchRequest fsr = new FlatSearchRequest(bq, ArtifactInfo.VERSION_COMPARATOR);
951
                        FlatSearchRequest fsr = new FlatSearchRequest(bq, ArtifactInfo.VERSION_COMPARATOR);
946
                        fsr.setAiCount(MAX_RESULT_COUNT);
952
                        fsr.setAiCount(MAX_RESULT_COUNT);
947
                        FlatSearchResponse response = repeatedFlatSearch(fsr, getContexts(new RepositoryInfo[]{repo}), false);
953
                        FlatSearchResponse response = repeatedFlatSearch(fsr, getContexts(new RepositoryInfo[]{repo}), false);
Lines 1101-1109 Link Here
1101
                                Query q;
1107
                                Query q;
1102
                                if (ArtifactInfo.NAMES.equals(fieldName)) {
1108
                                if (ArtifactInfo.NAMES.equals(fieldName)) {
1103
                                    String clsname = field.getValue().replace(".", "/"); //NOI18N
1109
                                    String clsname = field.getValue().replace(".", "/"); //NOI18N
1104
                                    q = indexer.constructQuery(ArtifactInfo.NAMES, clsname.toLowerCase());
1110
                                    q = indexer.constructQuery(MAVEN.CLASSNAMES, new StringSearchExpression(clsname.toLowerCase()));
1105
                                } else if (ArtifactInfo.ARTIFACT_ID.equals(fieldName)) {
1111
                                } else if (ArtifactInfo.ARTIFACT_ID.equals(fieldName)) {
1106
                                    q = indexer.constructQuery(fieldName, field.getValue());
1112
                                    q = indexer.constructQuery(MAVEN.ARTIFACT_ID, new StringSearchExpression(field.getValue()));
1107
                                } else {
1113
                                } else {
1108
                                    if (field.getMatch() == QueryField.MATCH_EXACT) {
1114
                                    if (field.getMatch() == QueryField.MATCH_EXACT) {
1109
                                        q = new TermQuery(new Term(fieldName, field.getValue()));
1115
                                        q = new TermQuery(new Term(fieldName, field.getValue()));
Lines 1323-1327 Link Here
1323
            return false;
1329
            return false;
1324
        }
1330
        }
1325
    }
1331
    }
1326
1332
            
1327
}
1333
}
(-)a/maven.indexer/src/org/netbeans/modules/maven/indexer/api/PluginIndexManager.java (-33 / +70 lines)
Lines 52-57 Link Here
52
import java.io.InputStream;
52
import java.io.InputStream;
53
import java.util.ArrayList;
53
import java.util.ArrayList;
54
import java.util.Arrays;
54
import java.util.Arrays;
55
import java.util.BitSet;
55
import java.util.Comparator;
56
import java.util.Comparator;
56
import java.util.Iterator;
57
import java.util.Iterator;
57
import java.util.LinkedHashMap;
58
import java.util.LinkedHashMap;
Lines 67-77 Link Here
67
import org.apache.lucene.index.Term;
68
import org.apache.lucene.index.Term;
68
import org.apache.lucene.search.BooleanClause;
69
import org.apache.lucene.search.BooleanClause;
69
import org.apache.lucene.search.BooleanQuery;
70
import org.apache.lucene.search.BooleanQuery;
70
import org.apache.lucene.search.Hit;
71
import org.apache.lucene.search.Collector;
71
import org.apache.lucene.search.Hits;
72
import org.apache.lucene.search.IndexSearcher;
72
import org.apache.lucene.search.IndexSearcher;
73
import org.apache.lucene.search.PrefixQuery;
73
import org.apache.lucene.search.PrefixQuery;
74
import org.apache.lucene.search.Scorer;
74
import org.apache.lucene.search.TermQuery;
75
import org.apache.lucene.search.TermQuery;
76
import org.apache.lucene.search.TopDocs;
75
import org.apache.lucene.store.FSDirectory;
77
import org.apache.lucene.store.FSDirectory;
76
import org.openide.filesystems.FileUtil;
78
import org.openide.filesystems.FileUtil;
77
import org.openide.util.Exceptions;
79
import org.openide.util.Exceptions;
Lines 125-131 Link Here
125
127
126
    private static synchronized IndexSearcher getIndexSearcher() throws Exception {
128
    private static synchronized IndexSearcher getIndexSearcher() throws Exception {
127
        if (indexReader == null) {
129
        if (indexReader == null) {
128
            FSDirectory dir = FSDirectory.getDirectory(getDefaultIndexLocation());
130
            FSDirectory dir = FSDirectory.open(getDefaultIndexLocation());
129
            indexReader = IndexReader.open(dir);
131
            indexReader = IndexReader.open(dir);
130
        }
132
        }
131
        //TODO shall the searcher be stored as field??
133
        //TODO shall the searcher be stored as field??
Lines 144-155 Link Here
144
            PrefixQuery pq = new PrefixQuery(new Term(FIELD_ID, grp));
146
            PrefixQuery pq = new PrefixQuery(new Term(FIELD_ID, grp));
145
            bq.add(new BooleanClause(pq, BooleanClause.Occur.SHOULD));
147
            bq.add(new BooleanClause(pq, BooleanClause.Occur.SHOULD));
146
        }
148
        }
147
        Hits hits = searcher.search(bq);
149
        final BitSetCollector searchRes = new BitSetCollector();
148
        Iterator it = hits.iterator();
150
        searcher.search(bq, searchRes);
151
        final BitSet bitSet = searchRes.getMatchedDocs();
149
        TreeSet<String> toRet = new TreeSet<String>();
152
        TreeSet<String> toRet = new TreeSet<String>();
150
        while (it.hasNext()) {
153
        for (int docNum = bitSet.nextSetBit(0); docNum >= 0; docNum = bitSet.nextSetBit(docNum+1)) {
151
            Hit hit = (Hit) it.next();
154
            Document doc = searcher.getIndexReader().document(docNum);
152
            Document doc = hit.getDocument();
153
            //TODO shall we somehow pick just one version fom a given plugin here? how?
155
            //TODO shall we somehow pick just one version fom a given plugin here? how?
154
            String prefix = doc.getField(FIELD_PREFIX).stringValue();
156
            String prefix = doc.getField(FIELD_PREFIX).stringValue();
155
            String goals = doc.getField(FIELD_GOALS).stringValue();
157
            String goals = doc.getField(FIELD_GOALS).stringValue();
Lines 173-187 Link Here
173
        IndexSearcher searcher = getIndexSearcher();
175
        IndexSearcher searcher = getIndexSearcher();
174
        String id = groupId + "|" + artifactId + "|" + version; //NOI18N
176
        String id = groupId + "|" + artifactId + "|" + version; //NOI18N
175
        TermQuery tq = new TermQuery(new Term(FIELD_ID, id));
177
        TermQuery tq = new TermQuery(new Term(FIELD_ID, id));
176
        Hits hits = searcher.search(tq);
178
        final BitSetCollector searchRes = new BitSetCollector();
177
        if (hits.length() == 0) {
179
        searcher.search(tq, searchRes);
180
        final BitSet bitSet = searchRes.getMatchedDocs();
181
        if (bitSet.isEmpty()) {
178
            return null;
182
            return null;
179
        }
183
        }
180
        Iterator it = hits.iterator();
181
        TreeSet<String> toRet = new TreeSet<String>();
184
        TreeSet<String> toRet = new TreeSet<String>();
182
        while (it.hasNext()) { //well should be just one anyway..
185
        for (int docNum = bitSet.nextSetBit(0); docNum >= 0; docNum = bitSet.nextSetBit(docNum+1)) {
183
            Hit hit = (Hit) it.next();
186
            Document doc = searcher.getIndexReader().document(docNum);
184
            Document doc = hit.getDocument();
185
            String goals = doc.getField(FIELD_GOALS).stringValue();
187
            String goals = doc.getField(FIELD_GOALS).stringValue();
186
            String[] gls = StringUtils.split(goals, " "); //NOI18N
188
            String[] gls = StringUtils.split(goals, " "); //NOI18N
187
            for (String goal : gls) {
189
            for (String goal : gls) {
Lines 204-218 Link Here
204
        IndexSearcher searcher = getIndexSearcher();
206
        IndexSearcher searcher = getIndexSearcher();
205
        String id = groupId + "|" + artifactId + "|" + version; //NOI18N
207
        String id = groupId + "|" + artifactId + "|" + version; //NOI18N
206
        TermQuery tq = new TermQuery(new Term(FIELD_ID, id));
208
        TermQuery tq = new TermQuery(new Term(FIELD_ID, id));
207
        Hits hits = searcher.search(tq);
209
        final BitSetCollector searchRes = new BitSetCollector();
208
        if (hits.length() == 0) {
210
        searcher.search(tq, searchRes);
211
        final BitSet bitSet = searchRes.getMatchedDocs();
212
        if (bitSet.isEmpty()) {
209
            return null;
213
            return null;
210
        }
214
        }        
211
        Iterator it = hits.iterator();
212
        TreeSet<ParameterDetail> toRet = new TreeSet<ParameterDetail>(new PComparator());
215
        TreeSet<ParameterDetail> toRet = new TreeSet<ParameterDetail>(new PComparator());
213
        while (it.hasNext()) { //well should be just one anyway..
216
        for (int docNum = bitSet.nextSetBit(0); docNum >= 0; docNum = bitSet.nextSetBit(docNum+1)) {
214
            Hit hit = (Hit) it.next();
217
            Document doc = searcher.getIndexReader().document(docNum);
215
            Document doc = hit.getDocument();
216
            String goals = doc.getField(FIELD_GOALS).stringValue();
218
            String goals = doc.getField(FIELD_GOALS).stringValue();
217
            String[] gls = StringUtils.split(goals, " "); //NOI18N
219
            String[] gls = StringUtils.split(goals, " "); //NOI18N
218
            for (String goal : gls) {
220
            for (String goal : gls) {
Lines 263-277 Link Here
263
        assert prefix != null;
265
        assert prefix != null;
264
        IndexSearcher searcher = getIndexSearcher();
266
        IndexSearcher searcher = getIndexSearcher();
265
        TermQuery tq = new TermQuery(new Term(FIELD_PREFIX, prefix));
267
        TermQuery tq = new TermQuery(new Term(FIELD_PREFIX, prefix));
266
        Hits hits = searcher.search(tq);
268
        final BitSetCollector searchRes = new BitSetCollector();
267
        if (hits.length() == 0) {
269
        searcher.search(tq, searchRes);
270
        final BitSet bitSet = searchRes.getMatchedDocs();
271
        if (bitSet.isEmpty()) {
268
            return null;
272
            return null;
269
        }
273
        }
270
        Iterator it = hits.iterator();
271
        TreeSet<String> toRet = new TreeSet<String>();
274
        TreeSet<String> toRet = new TreeSet<String>();
272
        while (it.hasNext()) { //well should be just one anyway..
275
        for (int docNum = bitSet.nextSetBit(0); docNum >= 0; docNum = bitSet.nextSetBit(docNum+1)) {
273
            Hit hit = (Hit) it.next();
276
            Document doc = searcher.getIndexReader().document(docNum);
274
            Document doc = hit.getDocument();
275
            String id = doc.getField(FIELD_ID).stringValue();
277
            String id = doc.getField(FIELD_ID).stringValue();
276
            toRet.add(id);
278
            toRet.add(id);
277
        }
279
        }
Lines 304-318 Link Here
304
        }
306
        }
305
        bq.add(bq2, BooleanClause.Occur.SHOULD); //why doesn't MUST work?
307
        bq.add(bq2, BooleanClause.Occur.SHOULD); //why doesn't MUST work?
306
308
307
        Hits hits = searcher.search(bq);
309
        final BitSetCollector searchRes = new BitSetCollector();
308
        if (hits.length() == 0) {
310
        searcher.search(bq, searchRes);
311
        final BitSet bitSet = searchRes.getMatchedDocs();
312
        if (bitSet.isEmpty()) {
309
            return null;
313
            return null;
310
        }
314
        }
311
        Iterator it = hits.iterator();
312
        LinkedHashMap<String, List<String>> toRet = new LinkedHashMap<String, List<String>>();
315
        LinkedHashMap<String, List<String>> toRet = new LinkedHashMap<String, List<String>>();
313
        while (it.hasNext()) { //well should be just one anyway..
316
        for (int docNum = bitSet.nextSetBit(0); docNum >= 0; docNum = bitSet.nextSetBit(docNum+1)) {
314
            Hit hit = (Hit) it.next();
317
            Document doc = searcher.getIndexReader().document(docNum);
315
            Document doc = hit.getDocument();
316
            Field prefixed = doc.getField(PREFIX_FIELD_CYCLE + packaging);
318
            Field prefixed = doc.getField(PREFIX_FIELD_CYCLE + packaging);
317
            if (prefixed != null) {
319
            if (prefixed != null) {
318
                String mapping = prefixed.stringValue();
320
                String mapping = prefixed.stringValue();
Lines 505-509 Link Here
505
        }
507
        }
506
508
507
    }
509
    }
510
    
511
    
512
    private static final class BitSetCollector extends Collector {
508
513
514
        private int docBase;
515
        private final BitSet bits = new BitSet();
516
517
        public BitSet getMatchedDocs() {
518
            return this.bits;
519
        }
520
521
        
522
        @Override
523
        public void setScorer(Scorer scorer) {
524
            //Todo: ignoring scorer for now, if ordering accoring to score needed
525
            // this will need to be implemented
526
        }
527
528
        // accept docs out of order (for a BitSet it doesn't matter)
529
        @Override
530
        public boolean acceptsDocsOutOfOrder() {
531
          return true;
532
        }
533
534
        @Override
535
        public void collect(int doc) {
536
          bits.set(doc + docBase);
537
        }
538
539
        @Override
540
        public void setNextReader(IndexReader reader, int docBase) {
541
          this.docBase = docBase;
542
        }
543
544
    }
545
    
509
}
546
}
(-)a/maven.repository/nbproject/project.xml (-2 / +2 lines)
Lines 72-79 Link Here
72
                    <build-prerequisite/>
72
                    <build-prerequisite/>
73
                    <compile-dependency/>
73
                    <compile-dependency/>
74
                    <run-dependency>
74
                    <run-dependency>
75
                        <release-version>1</release-version>
75
                        <release-version>3</release-version>
76
                        <specification-version>2.5</specification-version>
76
                        <specification-version>3.0</specification-version>
77
                    </run-dependency>
77
                    </run-dependency>
78
                </dependency>
78
                </dependency>
79
                <dependency>
79
                <dependency>
(-)a/maven.search/nbproject/project.xml (-2 / +2 lines)
Lines 54-61 Link Here
54
                    <build-prerequisite/>
54
                    <build-prerequisite/>
55
                    <compile-dependency/>
55
                    <compile-dependency/>
56
                    <run-dependency>
56
                    <run-dependency>
57
                        <release-version>1</release-version>
57
                        <release-version>3</release-version>
58
                        <specification-version>2.5</specification-version>
58
                        <specification-version>3.0</specification-version>
59
                    </run-dependency>
59
                    </run-dependency>
60
                </dependency>
60
                </dependency>
61
                <dependency>
61
                <dependency>
(-)a/maven/nbproject/project.xml (-2 / +2 lines)
Lines 116-123 Link Here
116
                    <build-prerequisite/>
116
                    <build-prerequisite/>
117
                    <compile-dependency/>
117
                    <compile-dependency/>
118
                    <run-dependency>
118
                    <run-dependency>
119
                        <release-version>1</release-version>
119
                        <release-version>3</release-version>
120
                        <specification-version>2.5</specification-version>
120
                        <specification-version>3.0</specification-version>
121
                    </run-dependency>
121
                    </run-dependency>
122
                </dependency>
122
                </dependency>
123
                <dependency>
123
                <dependency>
(-)a/parsing.api/nbproject/project.xml (-2 / +2 lines)
Lines 37-44 Link Here
37
                    <build-prerequisite/>
37
                    <build-prerequisite/>
38
                    <compile-dependency/>
38
                    <compile-dependency/>
39
                    <run-dependency>
39
                    <run-dependency>
40
                        <release-version>1</release-version>
40
                        <release-version>3</release-version>
41
                        <specification-version>2.6</specification-version>
41
                        <specification-version>3.0</specification-version>
42
                    </run-dependency>
42
                    </run-dependency>
43
                </dependency>
43
                </dependency>
44
                <dependency>
44
                <dependency>
(-)a/parsing.lucene/nbproject/project.xml (-2 / +2 lines)
Lines 19-26 Link Here
19
                    <build-prerequisite/>
19
                    <build-prerequisite/>
20
                    <compile-dependency/>
20
                    <compile-dependency/>
21
                    <run-dependency>
21
                    <run-dependency>
22
                        <release-version>1</release-version>
22
                        <release-version>3</release-version>
23
                        <specification-version>2.13</specification-version>
23
                        <specification-version>3.0</specification-version>
24
                    </run-dependency>
24
                    </run-dependency>
25
                </dependency>
25
                </dependency>
26
                <dependency>
26
                <dependency>
(-)a/parsing.lucene/src/org/netbeans/modules/parsing/lucene/DocumentIndexImpl.java (-1 / +1 lines)
Lines 256-262 Link Here
256
        }
256
        }
257
    }
257
    }
258
    
258
    
259
    private Reference getDataRef() {
259
    private Reference<List[]> getDataRef() {
260
        assert Thread.holdsLock(this);
260
        assert Thread.holdsLock(this);
261
        if (toAdd.isEmpty() && toRemove.isEmpty()) {
261
        if (toAdd.isEmpty() && toRemove.isEmpty()) {
262
            assert dataRef == null;
262
            assert dataRef == null;
(-)a/parsing.lucene/src/org/netbeans/modules/parsing/lucene/IndexDocumentImpl.java (-2 / +2 lines)
Lines 76-82 Link Here
76
        @SuppressWarnings("deprecation") //NOI18N
76
        @SuppressWarnings("deprecation") //NOI18N
77
        final Field field = new Field (key, value,
77
        final Field field = new Field (key, value,
78
                stored ? Field.Store.YES : Field.Store.NO,
78
                stored ? Field.Store.YES : Field.Store.NO,
79
                searchable ? Field.Index.NO_NORMS : Field.Index.NO);
79
                searchable ? Field.Index.NOT_ANALYZED_NO_NORMS : Field.Index.NO);
80
        doc.add (field);
80
        doc.add (field);
81
    }
81
    }
82
    
82
    
Lines 102-108 Link Here
102
102
103
    @SuppressWarnings("deprecation") //NOI18N
103
    @SuppressWarnings("deprecation") //NOI18N
104
    private static Fieldable sourceNameField(String relativePath) {
104
    private static Fieldable sourceNameField(String relativePath) {
105
        return new Field(FIELD_PRIMARY_KEY, relativePath, Field.Store.YES, Field.Index.NO_NORMS);
105
        return new Field(FIELD_PRIMARY_KEY, relativePath, Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS);
106
    }
106
    }
107
    
107
    
108
    static Query sourceNameQuery(String relativePath) {
108
    static Query sourceNameQuery(String relativePath) {
(-)a/parsing.lucene/src/org/netbeans/modules/parsing/lucene/LuceneIndex.java (-1 / +9 lines)
Lines 42-47 Link Here
42
42
43
package org.netbeans.modules.parsing.lucene;
43
package org.netbeans.modules.parsing.lucene;
44
44
45
import org.apache.lucene.store.NoLockFactory;
45
import org.netbeans.modules.parsing.lucene.support.LowMemoryWatcher;
46
import org.netbeans.modules.parsing.lucene.support.LowMemoryWatcher;
46
import java.io.File;
47
import java.io.File;
47
import java.io.FileNotFoundException;
48
import java.io.FileNotFoundException;
Lines 81-86 Link Here
81
import org.apache.lucene.search.Query;
82
import org.apache.lucene.search.Query;
82
import org.apache.lucene.store.Directory;
83
import org.apache.lucene.store.Directory;
83
import org.apache.lucene.store.FSDirectory;
84
import org.apache.lucene.store.FSDirectory;
85
import org.apache.lucene.store.LockFactory;
84
import org.apache.lucene.store.RAMDirectory;
86
import org.apache.lucene.store.RAMDirectory;
85
import org.netbeans.api.annotations.common.NonNull;
87
import org.netbeans.api.annotations.common.NonNull;
86
import org.netbeans.api.annotations.common.NullAllowed;
88
import org.netbeans.api.annotations.common.NullAllowed;
Lines 109-116 Link Here
109
    private static final Logger LOGGER = Logger.getLogger(LuceneIndex.class.getName());
111
    private static final Logger LOGGER = Logger.getLogger(LuceneIndex.class.getName());
110
    private static final FieldSelector ALL_FIELDS = new AllFieldsSelector();
112
    private static final FieldSelector ALL_FIELDS = new AllFieldsSelector();
111
    
113
    
114
    private static LockFactory lockFactory;
112
    
115
    
113
    private final DirCache dirCache;       
116
    private final DirCache dirCache;       
117
    
118
    /** unit tests */
119
    public static void setDisabledLocks(final boolean disabled) {
120
        lockFactory = disabled ? NoLockFactory.getNoLockFactory() : null;
121
    }
114
122
115
    public static LuceneIndex create (final File cacheRoot, final Analyzer analyzer) throws IOException {
123
    public static LuceneIndex create (final File cacheRoot, final Analyzer analyzer) throws IOException {
116
        assert cacheRoot != null && cacheRoot.exists() && cacheRoot.canRead() && cacheRoot.canWrite();
124
        assert cacheRoot != null && cacheRoot.exists() && cacheRoot.canRead() && cacheRoot.canWrite();
Lines 821-827 Link Here
821
        
829
        
822
        private static FSDirectory createFSDirectory (final File indexFolder) throws IOException {
830
        private static FSDirectory createFSDirectory (final File indexFolder) throws IOException {
823
            assert indexFolder != null;
831
            assert indexFolder != null;
824
            FSDirectory directory  = FSDirectory.open(indexFolder);
832
            final FSDirectory directory  = FSDirectory.open(indexFolder, lockFactory);
825
            directory.getLockFactory().setLockPrefix(CACHE_LOCK_PREFIX);
833
            directory.getLockFactory().setLockPrefix(CACHE_LOCK_PREFIX);
826
            return directory;
834
            return directory;
827
        } 
835
        } 
(-)a/parsing.lucene/src/org/netbeans/modules/parsing/lucene/support/Queries.java (-20 lines)
Lines 293-318 Link Here
293
        private  TermCollector termCollector;
293
        private  TermCollector termCollector;
294
                
294
                
295
        @Override
295
        @Override
296
        public final BitSet bits(IndexReader reader) throws IOException {
297
            final FilteredTermEnum enumerator = getTermEnum(reader);
298
            try {
299
                final BitSet bitSet = new BitSet(reader.maxDoc());
300
                new DocumentVisitor() {
301
                    @Override
302
                    public void visit(Term term, int doc) {
303
                        bitSet.set(doc);
304
                        if (termCollector != null) {
305
                            termCollector.add(doc, term);
306
                        }
307
                    }
308
                }.generate(reader, enumerator);
309
                return bitSet;
310
            } finally {
311
                enumerator.close();
312
            }
313
        }
314
315
        @Override
316
        public final DocIdSet getDocIdSet(IndexReader reader) throws IOException {
296
        public final DocIdSet getDocIdSet(IndexReader reader) throws IOException {
317
            final FilteredTermEnum enumerator = getTermEnum(reader);
297
            final FilteredTermEnum enumerator = getTermEnum(reader);
318
            try {
298
            try {
(-)a/parsing.lucene/test/unit/src/org/netbeans/modules/parsing/lucene/support/IndexManagerTestUtilities.java (+5 lines)
Lines 44-49 Link Here
44
44
45
import org.netbeans.api.annotations.common.NonNull;
45
import org.netbeans.api.annotations.common.NonNull;
46
import org.netbeans.modules.parsing.lucene.IndexFactory;
46
import org.netbeans.modules.parsing.lucene.IndexFactory;
47
import org.netbeans.modules.parsing.lucene.LuceneIndex;
47
import org.openide.util.Parameters;
48
import org.openide.util.Parameters;
48
49
49
/**
50
/**
Lines 62-65 Link Here
62
        IndexManager.factory = factory;
63
        IndexManager.factory = factory;
63
    }
64
    }
64
    
65
    
66
    public static void setDisabledLocks(final boolean disabled) {
67
        LuceneIndex.setDisabledLocks(disabled);
68
    }
69
    
65
}
70
}

Return to bug 194351