You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by ho...@apache.org on 2006/12/08 09:01:53 UTC
svn commit: r483872 - in /incubator/solr/trunk: CHANGES.txt build.xml
src/webapp/resources/admin/_info.jsp src/webapp/resources/admin/registry.jsp
src/webapp/resources/admin/registry.xsl
Author: hossman
Date: Fri Dec 8 00:01:51 2006
New Revision: 483872
URL: http://svn.apache.org/viewvc?view=rev&rev=483872
Log:
war now contains the solr jar, instead of the direct class files ... this also allows us to display the MANIFEST.MF version info on registry.jsp (it can't read from the WAR's manifest for some reason)
Modified:
incubator/solr/trunk/CHANGES.txt
incubator/solr/trunk/build.xml
incubator/solr/trunk/src/webapp/resources/admin/_info.jsp
incubator/solr/trunk/src/webapp/resources/admin/registry.jsp
incubator/solr/trunk/src/webapp/resources/admin/registry.xsl
Modified: incubator/solr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/CHANGES.txt?view=diff&rev=483872&r1=483871&r2=483872
==============================================================================
--- incubator/solr/trunk/CHANGES.txt (original)
+++ incubator/solr/trunk/CHANGES.txt Fri Dec 8 00:01:51 2006
@@ -169,5 +169,6 @@
specific params, and adding an option to pick the output type. (hossman)
12. Added new numeric build property "specversion" to allow clean
MANIFEST.MF files (hossman)
+13. Added Solr/Lucene versions to "Info" page (hossman)
2006/01/17 Solr open sourced, moves to Apache Incubator
Modified: incubator/solr/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/build.xml?view=diff&rev=483872&r1=483871&r2=483872
==============================================================================
--- incubator/solr/trunk/build.xml (original)
+++ incubator/solr/trunk/build.xml Fri Dec 8 00:01:51 2006
@@ -323,15 +323,17 @@
<!-- Creates the Solr WAR file. -->
<target name="dist-war"
description="Creates the demo WAR file."
- depends="compile, make-manifest">
+ depends="compile, make-manifest, dist-jar">
<mkdir dir="${dist}" />
<war destfile="${dist}/${fullnamever}.war"
webxml="${src}/webapp/WEB-INF/web.xml"
filesetmanifest="skip"
manifest="${dest}/META-INF/MANIFEST.MF">
- <classes dir="${dest}" includes="org/apache/**" />
<lib dir="${lib}">
<exclude name="servlet-api*.jar" />
+ </lib>
+ <lib dir="${dist}">
+ <include name="${fullnamever}.jar" />
</lib>
<fileset dir="${src}/webapp/resources" />
<metainf dir="${basedir}" includes="LICENSE.txt,NOTICE.txt"/>
Modified: incubator/solr/trunk/src/webapp/resources/admin/_info.jsp
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/src/webapp/resources/admin/_info.jsp?view=diff&rev=483872&r1=483871&r2=483872
==============================================================================
--- incubator/solr/trunk/src/webapp/resources/admin/_info.jsp (original)
+++ incubator/solr/trunk/src/webapp/resources/admin/_info.jsp Fri Dec 8 00:01:51 2006
@@ -22,6 +22,7 @@
<%@ page import="java.io.StringWriter"%>
<%@ page import="org.apache.solr.core.Config"%>
<%@ page import="org.apache.solr.util.XML"%>
+<%@ page import="org.apache.lucene.LucenePackage"%>
<%
SolrCore core = SolrCore.getSolrCore();
@@ -42,10 +43,45 @@
InetAddress addr = InetAddress.getLocalHost();
String hostname = addr.getCanonicalHostName();
- StringWriter tmp = new StringWriter();
+ StringWriter tmp;
+
+ tmp = new StringWriter();
XML.escapeCharData(SolrConfig.config.get("admin/defaultQuery/text()", null),
tmp);
String defaultSearch = tmp.toString();
+
+ Package p;
+
+ p = SolrCore.class.getPackage();
+
+ tmp = new StringWriter();
+ String solrImplVersion = p.getImplementationVersion();
+ if (null != solrImplVersion) {
+ XML.escapeCharData(solrImplVersion, tmp);
+ solrImplVersion = tmp.toString();
+ }
+ tmp = new StringWriter();
+ String solrSpecVersion = p.getSpecificationVersion() ;
+ if (null != solrSpecVersion) {
+ XML.escapeCharData(solrSpecVersion, tmp);
+ solrSpecVersion = tmp.toString();
+ }
+
+ p = LucenePackage.class.getPackage();
+
+ tmp = new StringWriter();
+ String luceneImplVersion = p.getImplementationVersion();
+ if (null != luceneImplVersion) {
+ XML.escapeCharData(luceneImplVersion, tmp);
+ luceneImplVersion = tmp.toString();
+ }
+ tmp = new StringWriter();
+ String luceneSpecVersion = p.getSpecificationVersion() ;
+ if (null != luceneSpecVersion) {
+ XML.escapeCharData(luceneSpecVersion, tmp);
+ luceneSpecVersion = tmp.toString();
+ }
+
String cwd=System.getProperty("user.dir");
String solrHome= Config.getInstanceDir();
%>
Modified: incubator/solr/trunk/src/webapp/resources/admin/registry.jsp
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/src/webapp/resources/admin/registry.jsp?view=diff&rev=483872&r1=483871&r2=483872
==============================================================================
--- incubator/solr/trunk/src/webapp/resources/admin/registry.jsp (original)
+++ incubator/solr/trunk/src/webapp/resources/admin/registry.jsp Fri Dec 8 00:01:51 2006
@@ -29,6 +29,10 @@
<host><%= hostname %></host>
<now><%= new Date().toString() %></now>
<start><%= new Date(core.getStartTime()) %></start>
+ <solr-spec-version><%= solrSpecVersion %></solr-spec-version>
+ <solr-impl-version><%= solrImplVersion %></solr-impl-version>
+ <lucene-spec-version><%= luceneSpecVersion %></lucene-spec-version>
+ <lucene-impl-version><%= luceneImplVersion %></lucene-impl-version>
<solr-info>
<%
for (SolrInfoMBean.Category cat : SolrInfoMBean.Category.values()) {
Modified: incubator/solr/trunk/src/webapp/resources/admin/registry.xsl
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/src/webapp/resources/admin/registry.xsl?view=diff&rev=483872&r1=483871&r2=483872
==============================================================================
--- incubator/solr/trunk/src/webapp/resources/admin/registry.xsl (original)
+++ incubator/solr/trunk/src/webapp/resources/admin/registry.xsl Fri Dec 8 00:01:51 2006
@@ -67,6 +67,26 @@
[<a href="#other">Other</a>]
</td>
</tr>
+ <tr><td></td>
+ <td>Solr Specification Version:
+ <xsl:value-of select="solr-spec-version" />
+ </td>
+ </tr>
+ <tr><td></td>
+ <td>Solr Implementation Version:
+ <xsl:value-of select="solr-impl-version" />
+ </td>
+ </tr>
+ <tr><td></td>
+ <td>Lucene Specification Version:
+ <xsl:value-of select="lucene-spec-version" />
+ </td>
+ </tr>
+ <tr><td></td>
+ <td>Lucene Implementation Version:
+ <xsl:value-of select="lucene-impl-version" />
+ </td>
+ </tr>
<tr>
<td>
</td>
@@ -85,13 +105,7 @@
<xsl:apply-templates/>
</xsl:template>
- <xsl:template match="solr/schema" />
-
- <xsl:template match="solr/host" />
-
- <xsl:template match="solr/now" />
-
- <xsl:template match="solr/start" />
+ <xsl:template match="solr/*" priority="-1" />
<xsl:template match="solr/solr-info">
<xsl:apply-templates/>