Author: otis
Date: Fri Mar 11 19:23:13 2005
New Revision: 157223
URL: http://svn.apache.org/viewcvs?view=rev&rev=157223
Log:
- Let callers get the Lucene version number, as specified in the Manifest
Added:
lucene/java/trunk/src/java/org/apache/lucene/LucenePackage.java
lucene/java/trunk/src/java/org/apache/lucene/package.html
Modified:
lucene/java/trunk/CHANGES.txt
lucene/java/trunk/build.xml
Modified: lucene/java/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewcvs/lucene/java/trunk/CHANGES.txt?view=diff&r1=157222&r2=157223
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Fri Mar 11 19:23:13 2005
@@ -81,6 +81,10 @@
13. 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 Changes
Modified: lucene/java/trunk/build.xml
URL:
http://svn.apache.org/viewcvs/lucene/java/trunk/build.xml?view=diff&r1=157222&r2=157223
==============================================================================
--- lucene/java/trunk/build.xml (original)
+++ lucene/java/trunk/build.xml Fri Mar 11 19:23:13 2005
@@ -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"/>
Added: lucene/java/trunk/src/java/org/apache/lucene/LucenePackage.java
URL:
http://svn.apache.org/viewcvs/lucene/java/trunk/src/java/org/apache/lucene/LucenePackage.java?view=auto&rev=157223
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/LucenePackage.java (added)
+++ lucene/java/trunk/src/java/org/apache/lucene/LucenePackage.java Fri Mar 11
19:23:13 2005
@@ -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();
+ }
+}
Added: lucene/java/trunk/src/java/org/apache/lucene/package.html
URL:
http://svn.apache.org/viewcvs/lucene/java/trunk/src/java/org/apache/lucene/package.html?view=auto&rev=157223
==============================================================================
--- lucene/java/trunk/src/java/org/apache/lucene/package.html (added)
+++ lucene/java/trunk/src/java/org/apache/lucene/package.html Fri Mar 11
19:23:13 2005
@@ -0,0 +1 @@
+<html><body>Top-level package.</body></html>