Apache Lucene open-source search software
- Let callers get the Lucene version number, as specified in the Manifest
Otis Gospodnetic0d8a41342e1f
diff --git a/CHANGES.txt b/CHANGES.txtindex c07dd548d29..0e2e3d97a68 100644--- a/CHANGES.txt+++ b/CHANGES.txt@@ -81,6 +81,10 @@ New features13. Add IndexWriter.setTermIndexInterval() method. See javadocs.(Doug Cutting)+14. Aded LucenePackage, whose static get() method returns java.util.Package,+ which lets the caller get the Lucene version information specified in+ the Lucene Jar.+ (Doug Cutting via Otis)API Changesdiff --git a/build.xml b/build.xmlindex a37d6b96f8e..d125c6334c0 100644--- a/build.xml+++ b/build.xml@@ -189,7 +189,7 @@excludes="**/*.java"><manifest><attribute name="Created-By" value="Apache Jakarta"/>- <section name="org/apache/lucene">+ <section name="org/apache/lucene/"><attribute name="Specification-Title" value="Lucene Search Engine"/><attribute name="Specification-Version" value="${version}"/><attribute name="Specification-Vendor" value="Lucene"/>diff --git a/src/java/org/apache/lucene/LucenePackage.java b/src/java/org/apache/lucene/LucenePackage.javanew file mode 100644index 00000000000..9d1cfa7ca7e--- /dev/null+++ b/src/java/org/apache/lucene/LucenePackage.java@@ -0,0 +1,28 @@+package org.apache.lucene;++/**+ * Copyright 2005 The Apache Software Foundation+ *+ * 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.+ */++/** Lucene's package information, including version. **/+public final class LucenePackage {++ private LucenePackage() {} // can't construct++ /** Return Lucene's package, including version information. */+ public static Package get() {+ return LucenePackage.class.getPackage();+ }+}diff --git a/src/java/org/apache/lucene/package.html b/src/java/org/apache/lucene/package.htmlnew file mode 100644index 00000000000..6eb7927f48a--- /dev/null+++ b/src/java/org/apache/lucene/package.html@@ -0,0 +1 @@+<html><body>Top-level package.</body></html>