diff --git a/csl.api/nbproject/project.xml b/csl.api/nbproject/project.xml
--- a/csl.api/nbproject/project.xml
+++ b/csl.api/nbproject/project.xml
@@ -37,8 +37,8 @@
- 1
- 2.1
+ 3
+ 3.0
diff --git a/java.hints/nbproject/project.xml b/java.hints/nbproject/project.xml
--- a/java.hints/nbproject/project.xml
+++ b/java.hints/nbproject/project.xml
@@ -107,8 +107,8 @@
- 1
- 2.9
+ 3
+ 3.0
diff --git a/java.source/nbproject/project.xml b/java.source/nbproject/project.xml
--- a/java.source/nbproject/project.xml
+++ b/java.source/nbproject/project.xml
@@ -106,8 +106,8 @@
- 1
- 2.12
+ 3
+ 3.0
diff --git a/java.source/src/org/netbeans/modules/java/source/usages/DocumentUtil.java b/java.source/src/org/netbeans/modules/java/source/usages/DocumentUtil.java
--- a/java.source/src/org/netbeans/modules/java/source/usages/DocumentUtil.java
+++ b/java.source/src/org/netbeans/modules/java/source/usages/DocumentUtil.java
@@ -257,30 +257,30 @@
}
caseInsensitiveName = simpleName.toLowerCase(); //XXX: I18N, Locale
Document doc = new Document ();
- Field field = new Field (FIELD_BINARY_NAME,fileName,Field.Store.YES, Field.Index.NO_NORMS);
+ Field field = new Field (FIELD_BINARY_NAME,fileName,Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS);
doc.add (field);
- field = new Field (FIELD_PACKAGE_NAME,pkgName,Field.Store.YES, Field.Index.NO_NORMS);
+ field = new Field (FIELD_PACKAGE_NAME,pkgName,Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS);
doc.add (field);
- field = new Field (FIELD_SIMPLE_NAME,simpleName, Field.Store.YES, Field.Index.NO_NORMS);
+ field = new Field (FIELD_SIMPLE_NAME,simpleName, Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS);
doc.add (field);
- field = new Field (FIELD_CASE_INSENSITIVE_NAME, caseInsensitiveName, Field.Store.YES, Field.Index.NO_NORMS);
+ field = new Field (FIELD_CASE_INSENSITIVE_NAME, caseInsensitiveName, Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS);
doc.add (field);
for (String reference : references) {
- field = new Field (FIELD_REFERENCES,reference,Field.Store.NO,Field.Index.NO_NORMS);
+ field = new Field (FIELD_REFERENCES,reference,Field.Store.NO,Field.Index.NOT_ANALYZED_NO_NORMS);
doc.add(field);
}
if (featureIdents != null) {
- field = new Field(FIELD_FEATURE_IDENTS, featureIdents, Field.Store.NO, Field.Index.TOKENIZED);
+ field = new Field(FIELD_FEATURE_IDENTS, featureIdents, Field.Store.NO, Field.Index.ANALYZED_NO_NORMS);
doc.add(field);
- field = new Field(FIELD_CASE_INSENSITIVE_FEATURE_IDENTS, featureIdents, Field.Store.NO, Field.Index.TOKENIZED);
+ field = new Field(FIELD_CASE_INSENSITIVE_FEATURE_IDENTS, featureIdents, Field.Store.NO, Field.Index.ANALYZED_NO_NORMS);
doc.add(field);
}
if (idents != null) {
- field = new Field(FIELD_IDENTS, idents, Field.Store.NO, Field.Index.TOKENIZED);
+ field = new Field(FIELD_IDENTS, idents, Field.Store.NO, Field.Index.ANALYZED_NO_NORMS);
doc.add(field);
}
if (source != null) {
- field = new Field (FIELD_SOURCE,source,Field.Store.YES,Field.Index.NO_NORMS);
+ field = new Field (FIELD_SOURCE,source,Field.Store.YES,Field.Index.NOT_ANALYZED_NO_NORMS);
doc.add(field);
}
return doc;
diff --git a/java.source/test/unit/src/org/netbeans/api/java/source/SourceUtilsTestUtil2.java b/java.source/test/unit/src/org/netbeans/api/java/source/SourceUtilsTestUtil2.java
--- a/java.source/test/unit/src/org/netbeans/api/java/source/SourceUtilsTestUtil2.java
+++ b/java.source/test/unit/src/org/netbeans/api/java/source/SourceUtilsTestUtil2.java
@@ -46,6 +46,8 @@
import com.sun.source.tree.Tree;
import org.apache.lucene.store.FSDirectory;
import org.netbeans.modules.java.source.transform.Transformer;
+import org.netbeans.modules.parsing.lucene.LuceneIndex;
+import org.netbeans.modules.parsing.lucene.support.IndexManagerTestUtilities;
/**
*
@@ -77,7 +79,7 @@
}
public static void disableLocks() {
- FSDirectory.setDisableLocks(true);
+ LuceneIndex.setDisabledLocks(true);
}
}
diff --git a/java.source/test/unit/src/org/netbeans/modules/java/source/usages/LucenePerformanceTest.java b/java.source/test/unit/src/org/netbeans/modules/java/source/usages/LucenePerformanceTest.java
--- a/java.source/test/unit/src/org/netbeans/modules/java/source/usages/LucenePerformanceTest.java
+++ b/java.source/test/unit/src/org/netbeans/modules/java/source/usages/LucenePerformanceTest.java
@@ -64,11 +64,11 @@
import java.util.TreeSet;
import javax.lang.model.element.TypeElement;
import org.apache.lucene.index.Term;
-import org.apache.lucene.store.FSDirectory;
import org.netbeans.api.java.source.ElementHandle;
import org.netbeans.junit.NbTestCase;
import org.netbeans.modules.parsing.lucene.support.Index;
import org.netbeans.modules.parsing.lucene.support.IndexManager;
+import org.netbeans.modules.parsing.lucene.support.IndexManagerTestUtilities;
import org.netbeans.modules.parsing.lucene.support.Queries;
import org.netbeans.modules.parsing.lucene.support.StoppableConvertor;
@@ -87,8 +87,7 @@
protected @Override void setUp() throws Exception {
super.setUp();
this.clearWorkDir();
- //jlahoda: disabling Lucene locks for tests (hopefully correct):
- FSDirectory.setDisableLocks(true);
+ IndexManagerTestUtilities.setDisabledLocks(true);
//Prepare indeces
File workDir = getWorkDir();
File cacheFolder = new File (workDir, "cache"); //NOI18N
diff --git a/java.sourceui/nbproject/project.xml b/java.sourceui/nbproject/project.xml
--- a/java.sourceui/nbproject/project.xml
+++ b/java.sourceui/nbproject/project.xml
@@ -45,8 +45,8 @@
- 1
- 2.12
+ 3
+ 3.0
diff --git a/libs.lucene/external/binaries-list b/libs.lucene/external/binaries-list
--- a/libs.lucene/external/binaries-list
+++ b/libs.lucene/external/binaries-list
@@ -1,1 +1,1 @@
-284963A064E39FA33ECBA8E57CC5581067CD81D1 lucene-core-2.9.3.jar
+335F7EA0E28A4A1358AA745F4BD2037E8AFE44FC lucene-core-3.0.3.jar
diff --git a/libs.lucene/external/lucene-core-2.9.3-license.txt b/libs.lucene/external/lucene-core-2.9.3-license.txt
deleted file mode 100644
--- a/libs.lucene/external/lucene-core-2.9.3-license.txt
+++ /dev/null
@@ -1,210 +0,0 @@
-Name: Apache Lucene
-Version: 2.4.1
-Description: Java-based indexing and search technology
-License: Apache-2.0
-Origin: http://lucene.apache.org/
-Files: lucene-core-2.9.3.jar
-Source: http://svn.apache.org/repos/asf/lucene/java/trunk
-OSR: 6381
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/libs.lucene/external/lucene-core-3.0.3-license.txt b/libs.lucene/external/lucene-core-3.0.3-license.txt
new file mode 100644
--- /dev/null
+++ b/libs.lucene/external/lucene-core-3.0.3-license.txt
@@ -0,0 +1,210 @@
+Name: Apache Lucene
+Version: 3.0.3
+Description: Java-based indexing and search technology
+License: Apache-2.0
+Origin: http://lucene.apache.org/
+Files: lucene-core-3.0.3.jar
+Source: http://svn.apache.org/repos/asf/lucene/java/trunk
+OSR: 6381
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/libs.lucene/manifest.mf b/libs.lucene/manifest.mf
--- a/libs.lucene/manifest.mf
+++ b/libs.lucene/manifest.mf
@@ -1,4 +1,4 @@
Manifest-Version: 1.0
-OpenIDE-Module: org.netbeans.libs.lucene/1
+OpenIDE-Module: org.netbeans.libs.lucene/3
OpenIDE-Module-Localizing-Bundle: org/netbeans/libs/lucene/Bundle.properties
OpenIDE-Module-Implementation-Version: 232
diff --git a/libs.lucene/nbproject/project.properties b/libs.lucene/nbproject/project.properties
--- a/libs.lucene/nbproject/project.properties
+++ b/libs.lucene/nbproject/project.properties
@@ -41,5 +41,5 @@
# made subject to such option by the copyright holder.
is.autoload=true
-release.external/lucene-core-2.9.3.jar=modules/ext/lucene-core-2.9.3.jar
-spec.version.base=2.13.0
+release.external/lucene-core-3.0.3.jar=modules/ext/lucene-core-3.0.3.jar
+spec.version.base=3.0.0
diff --git a/libs.lucene/nbproject/project.xml b/libs.lucene/nbproject/project.xml
--- a/libs.lucene/nbproject/project.xml
+++ b/libs.lucene/nbproject/project.xml
@@ -53,8 +53,8 @@
org
- ext/lucene-core-2.9.3.jar
- external/lucene-core-2.9.3.jar
+ ext/lucene-core-3.0.3.jar
+ external/lucene-core-3.0.3.jar
diff --git a/maven.hints/nbproject/project.xml b/maven.hints/nbproject/project.xml
--- a/maven.hints/nbproject/project.xml
+++ b/maven.hints/nbproject/project.xml
@@ -62,8 +62,8 @@
- 1
- 2.13
+ 3
+ 3.0
diff --git a/maven.indexer/external/binaries-list b/maven.indexer/external/binaries-list
--- a/maven.indexer/external/binaries-list
+++ b/maven.indexer/external/binaries-list
@@ -1,2 +1,2 @@
-7AB67E6B20E5332A7FB4FDF2F019AEC4275846C2 indexer-core-3.1.0.jar
-30DCFB82558DC5452AC135F267401E214A0E9859 indexer-artifact-3.1.0.jar
+3AF24D401F76D153B77641865737DE53E41E60D6 indexer-artifact-4.0.0.jar
+39E868B62080080DC349253E6050DF4B6ABAAE60 indexer-core-4.0.0.jar
diff --git a/maven.indexer/external/maven-indexer-3.1.0-license.txt b/maven.indexer/external/maven-indexer-3.1.0-license.txt
deleted file mode 100644
--- a/maven.indexer/external/maven-indexer-3.1.0-license.txt
+++ /dev/null
@@ -1,209 +0,0 @@
-Name: Maven Indexer
-Version: 3.1.0
-Description: Maven remote repository indexing engine.
-License: Apache-2.0
-Origin: http://repo1.maven.org/maven2/org/apache/maven/indexer/
-Files: indexer-core-3.1.0.jar indexer-artifact-3.1.0.jar
-OSR: 9451
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/maven.indexer/external/maven-indexer-4.0.0-license.txt b/maven.indexer/external/maven-indexer-4.0.0-license.txt
new file mode 100644
--- /dev/null
+++ b/maven.indexer/external/maven-indexer-4.0.0-license.txt
@@ -0,0 +1,209 @@
+Name: Maven Indexer
+Version: 4.0.0
+Description: Maven remote repository indexing engine.
+License: Apache-2.0
+Origin: https://repository.apache.org/content/repositories/maven-016/
+Files: indexer-core-4.0.0.jar indexer-artifact-4.0.0.jar
+OSR: 9451
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/maven.indexer/nbproject/project.properties b/maven.indexer/nbproject/project.properties
--- a/maven.indexer/nbproject/project.properties
+++ b/maven.indexer/nbproject/project.properties
@@ -41,5 +41,5 @@
is.autoload=true
javac.source=1.6
javac.compilerargs=-Xlint -Xlint:-serial
-release.external/indexer-core-3.1.0.jar=modules/ext/maven/indexer-core-3.1.0.jar
-release.external/indexer-artifact-3.1.0.jar=modules/ext/maven/indexer-artifact-3.1.0.jar
+release.external/indexer-core-4.0.0.jar=modules/ext/maven/indexer-core-4.0.0.jar
+release.external/indexer-artifact-4.0.0.jar=modules/ext/maven/indexer-artifact-4.0.0.jar
diff --git a/maven.indexer/nbproject/project.xml b/maven.indexer/nbproject/project.xml
--- a/maven.indexer/nbproject/project.xml
+++ b/maven.indexer/nbproject/project.xml
@@ -81,8 +81,8 @@
- 1
- 2.4
+ 3
+ 3.0
@@ -181,12 +181,12 @@
org.netbeans.modules.maven.indexer.spi.ui
- ext/maven/indexer-core-3.1.0.jar
- external/indexer-core-3.1.0.jar
+ ext/maven/indexer-core-4.0.0.jar
+ release/modules/ext/indexer-core-4.0.0.jar
- ext/maven/indexer-artifact-3.1.0.jar
- external/indexer-artifact-3.1.0.jar
+ ext/maven/indexer-artifact-4.0.0.jar
+ release/modules/ext/indexer-artifact-4.0.0.jar
diff --git a/maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java b/maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java
--- a/maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java
+++ b/maven.indexer/src/org/netbeans/modules/maven/indexer/NexusRepositoryIndexerImpl.java
@@ -42,6 +42,7 @@
package org.netbeans.modules.maven.indexer;
import java.io.FileNotFoundException;
+import org.apache.maven.index.expr.StringSearchExpression;
import org.codehaus.plexus.util.FileUtils;
import java.util.Map;
import org.apache.lucene.document.Document;
@@ -98,6 +99,7 @@
import org.apache.maven.index.GroupedSearchRequest;
import org.apache.maven.index.GroupedSearchResponse;
import org.apache.maven.index.IndexerFieldVersion;
+import org.apache.maven.index.MAVEN;
import org.apache.maven.index.NexusIndexer;
import org.apache.maven.index.context.IndexingContext;
import org.apache.maven.index.creator.AbstractIndexCreator;
@@ -766,7 +768,10 @@
getRepoMutex(slowrepo).writeAccess(new Mutex.ExceptionAction() {
public @Override Void run() throws Exception {
BooleanQuery bq = new BooleanQuery();
- bq.add(new BooleanClause(new PrefixQuery(new Term(ArtifactInfo.UINFO, prefix)), BooleanClause.Occur.MUST));
+ String uinfo = ArtifactInfo.UINFO;
+ final Term term = new Term(uinfo, prefix);
+ final Query prefQuery = new PrefixQuery(term);
+ bq.add(new BooleanClause(prefQuery, BooleanClause.Occur.MUST));
GroupedSearchRequest gsr = new GroupedSearchRequest(bq, new GGrouping(),
new Comparator() {
@@ -883,7 +888,8 @@
public @Override Void run() throws Exception {
loadIndexingContext(repo);
String clsname = className.replace(".", "/");
- FlatSearchRequest fsr = new FlatSearchRequest(setBooleanRewrite(indexer.constructQuery(ArtifactInfo.NAMES, clsname.toLowerCase())),
+ FlatSearchRequest fsr = new FlatSearchRequest(setBooleanRewrite(
+ indexer.constructQuery(MAVEN.CLASSNAMES, new StringSearchExpression(clsname.toLowerCase()))),
ArtifactInfo.VERSION_COMPARATOR);
fsr.setAiCount(MAX_RESULT_COUNT);
FlatSearchResponse response = repeatedFlatSearch(fsr, getContexts(new RepositoryInfo[]{repo}), false);
@@ -941,7 +947,7 @@
public @Override Void run() throws Exception {
loadIndexingContext(repo);
BooleanQuery bq = new BooleanQuery();
- bq.add(new BooleanClause((setBooleanRewrite(indexer.constructQuery(ArtifactInfo.SHA1, sha1))), BooleanClause.Occur.SHOULD));
+ bq.add(new BooleanClause((setBooleanRewrite(indexer.constructQuery(MAVEN.SHA1, new StringSearchExpression(sha1)))), BooleanClause.Occur.SHOULD));
FlatSearchRequest fsr = new FlatSearchRequest(bq, ArtifactInfo.VERSION_COMPARATOR);
fsr.setAiCount(MAX_RESULT_COUNT);
FlatSearchResponse response = repeatedFlatSearch(fsr, getContexts(new RepositoryInfo[]{repo}), false);
@@ -1101,9 +1107,9 @@
Query q;
if (ArtifactInfo.NAMES.equals(fieldName)) {
String clsname = field.getValue().replace(".", "/"); //NOI18N
- q = indexer.constructQuery(ArtifactInfo.NAMES, clsname.toLowerCase());
+ q = indexer.constructQuery(MAVEN.CLASSNAMES, new StringSearchExpression(clsname.toLowerCase()));
} else if (ArtifactInfo.ARTIFACT_ID.equals(fieldName)) {
- q = indexer.constructQuery(fieldName, field.getValue());
+ q = indexer.constructQuery(MAVEN.ARTIFACT_ID, new StringSearchExpression(field.getValue()));
} else {
if (field.getMatch() == QueryField.MATCH_EXACT) {
q = new TermQuery(new Term(fieldName, field.getValue()));
@@ -1323,5 +1329,5 @@
return false;
}
}
-
+
}
diff --git a/maven.indexer/src/org/netbeans/modules/maven/indexer/api/PluginIndexManager.java b/maven.indexer/src/org/netbeans/modules/maven/indexer/api/PluginIndexManager.java
--- a/maven.indexer/src/org/netbeans/modules/maven/indexer/api/PluginIndexManager.java
+++ b/maven.indexer/src/org/netbeans/modules/maven/indexer/api/PluginIndexManager.java
@@ -52,6 +52,7 @@
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.BitSet;
import java.util.Comparator;
import java.util.Iterator;
import java.util.LinkedHashMap;
@@ -67,11 +68,12 @@
import org.apache.lucene.index.Term;
import org.apache.lucene.search.BooleanClause;
import org.apache.lucene.search.BooleanQuery;
-import org.apache.lucene.search.Hit;
-import org.apache.lucene.search.Hits;
+import org.apache.lucene.search.Collector;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.PrefixQuery;
+import org.apache.lucene.search.Scorer;
import org.apache.lucene.search.TermQuery;
+import org.apache.lucene.search.TopDocs;
import org.apache.lucene.store.FSDirectory;
import org.openide.filesystems.FileUtil;
import org.openide.util.Exceptions;
@@ -125,7 +127,7 @@
private static synchronized IndexSearcher getIndexSearcher() throws Exception {
if (indexReader == null) {
- FSDirectory dir = FSDirectory.getDirectory(getDefaultIndexLocation());
+ FSDirectory dir = FSDirectory.open(getDefaultIndexLocation());
indexReader = IndexReader.open(dir);
}
//TODO shall the searcher be stored as field??
@@ -144,12 +146,12 @@
PrefixQuery pq = new PrefixQuery(new Term(FIELD_ID, grp));
bq.add(new BooleanClause(pq, BooleanClause.Occur.SHOULD));
}
- Hits hits = searcher.search(bq);
- Iterator it = hits.iterator();
+ final BitSetCollector searchRes = new BitSetCollector();
+ searcher.search(bq, searchRes);
+ final BitSet bitSet = searchRes.getMatchedDocs();
TreeSet toRet = new TreeSet();
- while (it.hasNext()) {
- Hit hit = (Hit) it.next();
- Document doc = hit.getDocument();
+ for (int docNum = bitSet.nextSetBit(0); docNum >= 0; docNum = bitSet.nextSetBit(docNum+1)) {
+ Document doc = searcher.getIndexReader().document(docNum);
//TODO shall we somehow pick just one version fom a given plugin here? how?
String prefix = doc.getField(FIELD_PREFIX).stringValue();
String goals = doc.getField(FIELD_GOALS).stringValue();
@@ -173,15 +175,15 @@
IndexSearcher searcher = getIndexSearcher();
String id = groupId + "|" + artifactId + "|" + version; //NOI18N
TermQuery tq = new TermQuery(new Term(FIELD_ID, id));
- Hits hits = searcher.search(tq);
- if (hits.length() == 0) {
+ final BitSetCollector searchRes = new BitSetCollector();
+ searcher.search(tq, searchRes);
+ final BitSet bitSet = searchRes.getMatchedDocs();
+ if (bitSet.isEmpty()) {
return null;
}
- Iterator it = hits.iterator();
TreeSet toRet = new TreeSet();
- while (it.hasNext()) { //well should be just one anyway..
- Hit hit = (Hit) it.next();
- Document doc = hit.getDocument();
+ for (int docNum = bitSet.nextSetBit(0); docNum >= 0; docNum = bitSet.nextSetBit(docNum+1)) {
+ Document doc = searcher.getIndexReader().document(docNum);
String goals = doc.getField(FIELD_GOALS).stringValue();
String[] gls = StringUtils.split(goals, " "); //NOI18N
for (String goal : gls) {
@@ -204,15 +206,15 @@
IndexSearcher searcher = getIndexSearcher();
String id = groupId + "|" + artifactId + "|" + version; //NOI18N
TermQuery tq = new TermQuery(new Term(FIELD_ID, id));
- Hits hits = searcher.search(tq);
- if (hits.length() == 0) {
+ final BitSetCollector searchRes = new BitSetCollector();
+ searcher.search(tq, searchRes);
+ final BitSet bitSet = searchRes.getMatchedDocs();
+ if (bitSet.isEmpty()) {
return null;
- }
- Iterator it = hits.iterator();
+ }
TreeSet toRet = new TreeSet(new PComparator());
- while (it.hasNext()) { //well should be just one anyway..
- Hit hit = (Hit) it.next();
- Document doc = hit.getDocument();
+ for (int docNum = bitSet.nextSetBit(0); docNum >= 0; docNum = bitSet.nextSetBit(docNum+1)) {
+ Document doc = searcher.getIndexReader().document(docNum);
String goals = doc.getField(FIELD_GOALS).stringValue();
String[] gls = StringUtils.split(goals, " "); //NOI18N
for (String goal : gls) {
@@ -263,15 +265,15 @@
assert prefix != null;
IndexSearcher searcher = getIndexSearcher();
TermQuery tq = new TermQuery(new Term(FIELD_PREFIX, prefix));
- Hits hits = searcher.search(tq);
- if (hits.length() == 0) {
+ final BitSetCollector searchRes = new BitSetCollector();
+ searcher.search(tq, searchRes);
+ final BitSet bitSet = searchRes.getMatchedDocs();
+ if (bitSet.isEmpty()) {
return null;
}
- Iterator it = hits.iterator();
TreeSet toRet = new TreeSet();
- while (it.hasNext()) { //well should be just one anyway..
- Hit hit = (Hit) it.next();
- Document doc = hit.getDocument();
+ for (int docNum = bitSet.nextSetBit(0); docNum >= 0; docNum = bitSet.nextSetBit(docNum+1)) {
+ Document doc = searcher.getIndexReader().document(docNum);
String id = doc.getField(FIELD_ID).stringValue();
toRet.add(id);
}
@@ -304,15 +306,15 @@
}
bq.add(bq2, BooleanClause.Occur.SHOULD); //why doesn't MUST work?
- Hits hits = searcher.search(bq);
- if (hits.length() == 0) {
+ final BitSetCollector searchRes = new BitSetCollector();
+ searcher.search(bq, searchRes);
+ final BitSet bitSet = searchRes.getMatchedDocs();
+ if (bitSet.isEmpty()) {
return null;
}
- Iterator it = hits.iterator();
LinkedHashMap> toRet = new LinkedHashMap>();
- while (it.hasNext()) { //well should be just one anyway..
- Hit hit = (Hit) it.next();
- Document doc = hit.getDocument();
+ for (int docNum = bitSet.nextSetBit(0); docNum >= 0; docNum = bitSet.nextSetBit(docNum+1)) {
+ Document doc = searcher.getIndexReader().document(docNum);
Field prefixed = doc.getField(PREFIX_FIELD_CYCLE + packaging);
if (prefixed != null) {
String mapping = prefixed.stringValue();
@@ -505,5 +507,40 @@
}
}
+
+
+ private static final class BitSetCollector extends Collector {
+ private int docBase;
+ private final BitSet bits = new BitSet();
+
+ public BitSet getMatchedDocs() {
+ return this.bits;
+ }
+
+
+ @Override
+ public void setScorer(Scorer scorer) {
+ //Todo: ignoring scorer for now, if ordering accoring to score needed
+ // this will need to be implemented
+ }
+
+ // accept docs out of order (for a BitSet it doesn't matter)
+ @Override
+ public boolean acceptsDocsOutOfOrder() {
+ return true;
+ }
+
+ @Override
+ public void collect(int doc) {
+ bits.set(doc + docBase);
+ }
+
+ @Override
+ public void setNextReader(IndexReader reader, int docBase) {
+ this.docBase = docBase;
+ }
+
+ }
+
}
diff --git a/maven.repository/nbproject/project.xml b/maven.repository/nbproject/project.xml
--- a/maven.repository/nbproject/project.xml
+++ b/maven.repository/nbproject/project.xml
@@ -72,8 +72,8 @@
- 1
- 2.5
+ 3
+ 3.0
diff --git a/maven.search/nbproject/project.xml b/maven.search/nbproject/project.xml
--- a/maven.search/nbproject/project.xml
+++ b/maven.search/nbproject/project.xml
@@ -54,8 +54,8 @@
- 1
- 2.5
+ 3
+ 3.0
diff --git a/maven/nbproject/project.xml b/maven/nbproject/project.xml
--- a/maven/nbproject/project.xml
+++ b/maven/nbproject/project.xml
@@ -116,8 +116,8 @@
- 1
- 2.5
+ 3
+ 3.0
diff --git a/parsing.api/nbproject/project.xml b/parsing.api/nbproject/project.xml
--- a/parsing.api/nbproject/project.xml
+++ b/parsing.api/nbproject/project.xml
@@ -37,8 +37,8 @@
- 1
- 2.6
+ 3
+ 3.0
diff --git a/parsing.lucene/nbproject/project.xml b/parsing.lucene/nbproject/project.xml
--- a/parsing.lucene/nbproject/project.xml
+++ b/parsing.lucene/nbproject/project.xml
@@ -19,8 +19,8 @@
- 1
- 2.13
+ 3
+ 3.0
diff --git a/parsing.lucene/src/org/netbeans/modules/parsing/lucene/DocumentIndexImpl.java b/parsing.lucene/src/org/netbeans/modules/parsing/lucene/DocumentIndexImpl.java
--- a/parsing.lucene/src/org/netbeans/modules/parsing/lucene/DocumentIndexImpl.java
+++ b/parsing.lucene/src/org/netbeans/modules/parsing/lucene/DocumentIndexImpl.java
@@ -256,7 +256,7 @@
}
}
- private Reference getDataRef() {
+ private Reference getDataRef() {
assert Thread.holdsLock(this);
if (toAdd.isEmpty() && toRemove.isEmpty()) {
assert dataRef == null;
diff --git a/parsing.lucene/src/org/netbeans/modules/parsing/lucene/IndexDocumentImpl.java b/parsing.lucene/src/org/netbeans/modules/parsing/lucene/IndexDocumentImpl.java
--- a/parsing.lucene/src/org/netbeans/modules/parsing/lucene/IndexDocumentImpl.java
+++ b/parsing.lucene/src/org/netbeans/modules/parsing/lucene/IndexDocumentImpl.java
@@ -76,7 +76,7 @@
@SuppressWarnings("deprecation") //NOI18N
final Field field = new Field (key, value,
stored ? Field.Store.YES : Field.Store.NO,
- searchable ? Field.Index.NO_NORMS : Field.Index.NO);
+ searchable ? Field.Index.NOT_ANALYZED_NO_NORMS : Field.Index.NO);
doc.add (field);
}
@@ -102,7 +102,7 @@
@SuppressWarnings("deprecation") //NOI18N
private static Fieldable sourceNameField(String relativePath) {
- return new Field(FIELD_PRIMARY_KEY, relativePath, Field.Store.YES, Field.Index.NO_NORMS);
+ return new Field(FIELD_PRIMARY_KEY, relativePath, Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS);
}
static Query sourceNameQuery(String relativePath) {
diff --git a/parsing.lucene/src/org/netbeans/modules/parsing/lucene/LuceneIndex.java b/parsing.lucene/src/org/netbeans/modules/parsing/lucene/LuceneIndex.java
--- a/parsing.lucene/src/org/netbeans/modules/parsing/lucene/LuceneIndex.java
+++ b/parsing.lucene/src/org/netbeans/modules/parsing/lucene/LuceneIndex.java
@@ -42,6 +42,7 @@
package org.netbeans.modules.parsing.lucene;
+import org.apache.lucene.store.NoLockFactory;
import org.netbeans.modules.parsing.lucene.support.LowMemoryWatcher;
import java.io.File;
import java.io.FileNotFoundException;
@@ -81,6 +82,7 @@
import org.apache.lucene.search.Query;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.FSDirectory;
+import org.apache.lucene.store.LockFactory;
import org.apache.lucene.store.RAMDirectory;
import org.netbeans.api.annotations.common.NonNull;
import org.netbeans.api.annotations.common.NullAllowed;
@@ -109,8 +111,14 @@
private static final Logger LOGGER = Logger.getLogger(LuceneIndex.class.getName());
private static final FieldSelector ALL_FIELDS = new AllFieldsSelector();
+ private static LockFactory lockFactory;
private final DirCache dirCache;
+
+ /** unit tests */
+ public static void setDisabledLocks(final boolean disabled) {
+ lockFactory = disabled ? NoLockFactory.getNoLockFactory() : null;
+ }
public static LuceneIndex create (final File cacheRoot, final Analyzer analyzer) throws IOException {
assert cacheRoot != null && cacheRoot.exists() && cacheRoot.canRead() && cacheRoot.canWrite();
@@ -821,7 +829,7 @@
private static FSDirectory createFSDirectory (final File indexFolder) throws IOException {
assert indexFolder != null;
- FSDirectory directory = FSDirectory.open(indexFolder);
+ final FSDirectory directory = FSDirectory.open(indexFolder, lockFactory);
directory.getLockFactory().setLockPrefix(CACHE_LOCK_PREFIX);
return directory;
}
diff --git a/parsing.lucene/src/org/netbeans/modules/parsing/lucene/support/Queries.java b/parsing.lucene/src/org/netbeans/modules/parsing/lucene/support/Queries.java
--- a/parsing.lucene/src/org/netbeans/modules/parsing/lucene/support/Queries.java
+++ b/parsing.lucene/src/org/netbeans/modules/parsing/lucene/support/Queries.java
@@ -293,26 +293,6 @@
private TermCollector termCollector;
@Override
- public final BitSet bits(IndexReader reader) throws IOException {
- final FilteredTermEnum enumerator = getTermEnum(reader);
- try {
- final BitSet bitSet = new BitSet(reader.maxDoc());
- new DocumentVisitor() {
- @Override
- public void visit(Term term, int doc) {
- bitSet.set(doc);
- if (termCollector != null) {
- termCollector.add(doc, term);
- }
- }
- }.generate(reader, enumerator);
- return bitSet;
- } finally {
- enumerator.close();
- }
- }
-
- @Override
public final DocIdSet getDocIdSet(IndexReader reader) throws IOException {
final FilteredTermEnum enumerator = getTermEnum(reader);
try {
diff --git a/parsing.lucene/test/unit/src/org/netbeans/modules/parsing/lucene/support/IndexManagerTestUtilities.java b/parsing.lucene/test/unit/src/org/netbeans/modules/parsing/lucene/support/IndexManagerTestUtilities.java
--- a/parsing.lucene/test/unit/src/org/netbeans/modules/parsing/lucene/support/IndexManagerTestUtilities.java
+++ b/parsing.lucene/test/unit/src/org/netbeans/modules/parsing/lucene/support/IndexManagerTestUtilities.java
@@ -44,6 +44,7 @@
import org.netbeans.api.annotations.common.NonNull;
import org.netbeans.modules.parsing.lucene.IndexFactory;
+import org.netbeans.modules.parsing.lucene.LuceneIndex;
import org.openide.util.Parameters;
/**
@@ -62,4 +63,8 @@
IndexManager.factory = factory;
}
+ public static void setDisabledLocks(final boolean disabled) {
+ LuceneIndex.setDisabledLocks(disabled);
+ }
+
}