Skip to content

Commit 32cf451

Browse files
committed
Depend on Lucene using the Import-Package header
Using the Import-Header entries allows consumers to contribute their own Lucene bundles, without having to match the symbolic name defined by Orbit.
1 parent cba5e6c commit 32cf451

File tree

3 files changed

+38
-10
lines changed

3 files changed

+38
-10
lines changed

ua/org.eclipse.help.base/META-INF/MANIFEST.MF

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,29 @@ Export-Package: org.apache.lucene.demo.html;x-internal:=true,
4242
Require-Bundle: org.eclipse.ant.core;bundle-version="[3.2.200,4.0.0)";resolution:=optional,
4343
org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)",
4444
org.eclipse.help;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
45-
org.eclipse.core.net;bundle-version="[1.2.200,2.0.0)",
46-
org.apache.lucene.analysis-common;bundle-version="[10.0.0,11.0.0)",
47-
org.apache.lucene.core;bundle-version="[10.0.0,11.0.0)",
48-
org.apache.lucene.analysis-smartcn;bundle-version="[10.0.0,11.0.0)"
49-
Import-Package: org.eclipse.equinox.http.jetty;resolution:=optional
45+
org.eclipse.core.net;bundle-version="[1.2.200,2.0.0)"
46+
Import-Package: org.apache.lucene.analysis;version="[10.0.0,11.0.0)",
47+
org.apache.lucene.analysis.br;version="[10.0.0,11.0.0)",
48+
org.apache.lucene.analysis.cjk;version="[10.0.0,11.0.0)",
49+
org.apache.lucene.analysis.cn.smart;version="[10.0.0,11.0.0)",
50+
org.apache.lucene.analysis.core;version="[10.0.0,11.0.0)",
51+
org.apache.lucene.analysis.cz;version="[10.0.0,11.0.0)",
52+
org.apache.lucene.analysis.de;version="[10.0.0,11.0.0)",
53+
org.apache.lucene.analysis.el;version="[10.0.0,11.0.0)",
54+
org.apache.lucene.analysis.en;version="[10.0.0,11.0.0)",
55+
org.apache.lucene.analysis.fr;version="[10.0.0,11.0.0)",
56+
org.apache.lucene.analysis.miscellaneous;version="[10.0.0,11.0.0)",
57+
org.apache.lucene.analysis.nl;version="[10.0.0,11.0.0)",
58+
org.apache.lucene.analysis.ru;version="[10.0.0,11.0.0)",
59+
org.apache.lucene.analysis.standard;version="[10.0.0,11.0.0)",
60+
org.apache.lucene.analysis.tokenattributes;version="[10.0.0,11.0.0)",
61+
org.apache.lucene.analysis.util;version="[10.0.0,11.0.0)",
62+
org.apache.lucene.document;version="[10.0.0,11.0.0)",
63+
org.apache.lucene.index;version="[10.0.0,11.0.0)",
64+
org.apache.lucene.search;version="[10.0.0,11.0.0)",
65+
org.apache.lucene.store;version="[10.0.0,11.0.0)",
66+
org.apache.lucene.util;version="[10.0.0,11.0.0)",
67+
org.eclipse.equinox.http.jetty;resolution:=optional
5068
Bundle-RequiredExecutionEnvironment: JavaSE-21
5169
Bundle-ActivationPolicy: lazy
5270
Automatic-Module-Name: org.eclipse.help.base

ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/AnalyzerDescriptor.java

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,21 @@
1414
*******************************************************************************/
1515
package org.eclipse.help.internal.search;
1616

17-
import org.apache.lucene.analysis.*;
18-
import org.eclipse.core.runtime.*;
19-
import org.eclipse.help.internal.base.*;
20-
import org.osgi.framework.*;
17+
import org.apache.lucene.analysis.Analyzer;
18+
import org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer;
19+
import org.eclipse.core.runtime.CoreException;
20+
import org.eclipse.core.runtime.IConfigurationElement;
21+
import org.eclipse.core.runtime.ILog;
22+
import org.eclipse.core.runtime.Platform;
23+
import org.eclipse.help.internal.base.HelpBasePlugin;
24+
import org.osgi.annotation.bundle.Referenced;
25+
import org.osgi.framework.Constants;
26+
import org.osgi.framework.Version;
2127

2228
/**
2329
* Text Analyzer Descriptor. Encapsulates Lucene Analyzer
2430
*/
31+
@Referenced(SmartChineseAnalyzer.class)
2532
public class AnalyzerDescriptor {
2633

2734
private Analyzer luceneAnalyzer;

ua/org.eclipse.ua.tests/META-INF/MANIFEST.MF

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@ Require-Bundle: org.eclipse.help.ui,
1111
org.eclipse.ui.intro.universal,
1212
org.eclipse.ui.forms,
1313
org.eclipse.equinox.jsp.jasper.registry;bundle-version="1.0.100",
14-
org.apache.lucene.core;bundle-version="9.4.2",
1514
org.eclipse.equinox.http.registry;bundle-version="1.3.100"
1615
Bundle-ActivationPolicy: lazy
1716
Bundle-Vendor: Eclipse.org
1817
Import-Package: javax.servlet;version="3.1.0",
1918
javax.servlet.http;version="3.1.0",
19+
org.apache.lucene.index;version="[10.0.0,11.0.0)",
20+
org.apache.lucene.search;version="[10.0.0,11.0.0)",
21+
org.apache.lucene.store;version="[10.0.0,11.0.0)",
22+
org.apache.lucene.util;version="[10.0.0,11.0.0)",
2023
org.assertj.core.api,
2124
org.junit.jupiter.api,
2225
org.junit.jupiter.api.function,

0 commit comments

Comments
 (0)