Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
- clean up and get DRAT ready for prime time
- auto build Solr webapp and Solr home
- clean up docs and README
  • Loading branch information
chrismattmann committed Jun 10, 2014
1 parent 49e8b83 commit eeee6494b9aacec2179e744d95be5ff4294dfae1
Showing 51 changed files with 326 additions and 1 deletion.
@@ -24,7 +24,6 @@ You can build DRAT in a few steps:
8. `cd deploy`
9. `tar xvzf dms-distribution-0.1-bin.tar.gz`
10. `rm -rf *.tar.gz`
11. `cp -R ../src/pge ./pge && cp -R ../src/solr/ ./solr && cp -R ../src/extractors/ ./extractors`

How to Run
===
@@ -47,6 +47,13 @@
<type>tar.gz</type>
<classifier>bin</classifier>
</dependency>
<dependency>
<groupId>org.apache.drat</groupId>
<artifactId>dms-solr</artifactId>
<version>${project.parent.version}</version>
<type>tar.gz</type>
<classifier>bin</classifier>
</dependency>
<dependency>
<groupId>org.apache.drat</groupId>
<artifactId>dms-pcs</artifactId>
@@ -86,6 +93,12 @@
<version>${project.parent.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.apache.drat</groupId>
<artifactId>dms-solr-webapp</artifactId>
<version>${project.parent.version}</version>
<type>war</type>
</dependency>
</dependencies>

<build>
@@ -132,6 +145,13 @@
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/apache-tomcat-${tomcat.version}/webapps/fmprod</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.apache.drat</groupId>
<artifactId>${parent.artifactId}-solr-webapp</artifactId>
<type>war</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/apache-tomcat-${tomcat.version}/webapps/solr</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
@@ -86,6 +86,7 @@
<exclude>${groupId}:${parent.artifactId}-opsui</exclude>
<exclude>${groupId}:${parent.artifactId}-pcs-services</exclude>
<exclude>${groupId}:${parent.artifactId}-fmprod</exclude>
<exclude>${groupId}:${parent.artifactId}-solr-webapp</exclude>
</excludes>
</dependencySet>
</dependencySets>
@@ -176,6 +176,10 @@ if [ -z "$CRAWLER_URL" ]; then
export CRAWLER_URL
fi

if [ -z "$SOLR_HOME" ]; then
SOLR_HOME="$OODT_HOME"/solr
export SOLR_HOME
fi

# When no TTY is available, don't output to console
have_tty=0
@@ -108,6 +108,7 @@
<module>workflow</module>
<module>crawler</module>
<module>pge</module>
<module>solr</module>
<module>distribution</module>
<module>webapps</module>
</modules>
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.drat</groupId>
<artifactId>dms</artifactId>
<version>0.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<name>DRAT Solr Home (Apache Solr)</name>
<artifactId>dms-solr</artifactId>
<packaging>jar</packaging>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-2</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>dist-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
@@ -0,0 +1,18 @@
<assembly>
<id>bin</id>
<formats>
<format>tar.gz</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<baseDirectory>solr</baseDirectory>
<includeSiteDirectory>false</includeSiteDirectory>
<fileSets>
<fileSet>
<directory>${basedir}/src/main/resources</directory>
<outputDirectory>solr</outputDirectory>
<includes/>
<fileMode>664</fileMode>
<directoryMode>775</directoryMode>
</fileSet>
</fileSets>
</assembly>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -15,5 +15,6 @@
<module>opsui</module>
<module>pcs-services</module>
<module>fmprod</module>
<module>solr-webapp</module>
</modules>
</project>
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.drat</groupId>
<artifactId>dms</artifactId>
<version>0.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<name>DRAT Webapp (Apache Solr)</name>
<artifactId>dms-solr-webapp</artifactId>
<packaging>war</packaging>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<overlays>
<overlay>
<groupId>org.apache.solr</groupId>
<artifactId>solr</artifactId>
<excludes>
<exclude>WEB-INF/web.xml</exclude>
</excludes>
</overlay>
</overlays>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr</artifactId>
<version>4.2.1</version>
<type>war</type>
</dependency>

</dependencies>
</project>
@@ -0,0 +1,21 @@
<assembly>
<id>bin</id>
<formats>
<format>tar.gz</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<baseDirectory>solr</baseDirectory>
<includeSiteDirectory>false</includeSiteDirectory>
<fileSets>
<fileSet>
<directory>${basedir}</directory>
<outputDirectory>.</outputDirectory>
<includes>
<include>README.txt</include>
<include>solr.xml</include>
<include>zoo.cfg</include>
</includes>
<fileMode>775</fileMode>
</fileSet>
</fileSets>
</assembly>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Context path="/solr">
<Parameter name="solr/home" value="../../solr"/>
</Context>
@@ -0,0 +1,168 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5"
metadata-complete="true"
>

<!-- Uncomment if you are trying to use a Resin version before 3.0.19.
Their XML implementation isn't entirely compatible with Xerces.
Below are the implementations to use with Sun's JVM.
<system-property javax.xml.xpath.XPathFactory=
"com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl"/>
<system-property javax.xml.parsers.DocumentBuilderFactory=
"com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"/>
<system-property javax.xml.parsers.SAXParserFactory=
"com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"/>
-->
<!-- People who want to hardcode their "Solr Home" directly into the
WAR File can set the JNDI property here...
-->

<env-entry>
<env-entry-name>solr/home</env-entry-name>
<env-entry-value>../../solr</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>


<!-- Any path (name) registered in solrconfig.xml will be sent to that filter -->
<filter>
<filter-name>SolrRequestFilter</filter-name>
<filter-class>org.apache.solr.servlet.SolrDispatchFilter</filter-class>
<!-- If you are wiring Solr into a larger web application which controls
the web context root, you will probably want to mount Solr under
a path prefix (app.war with /app/solr mounted into it, for example).
You will need to put this prefix in front of the SolrDispatchFilter
url-pattern mapping too (/solr/*), and also on any paths for
legacy Solr servlet mappings you may be using.
For the Admin UI to work properly in a path-prefixed configuration,
the admin folder containing the resources needs to be under the app context root
named to match the path-prefix. For example:
.war
xxx
js
main.js
-->
<!--
<init-param>
<param-name>path-prefix</param-name>
<param-value>/xxx</param-value>
</init-param>
-->
</filter>
<filter-mapping>
<!--
NOTE: When using multicore, /admin JSP URLs with a core specified
such as /solr/coreName/admin/stats.jsp get forwarded by a
RequestDispatcher to /solr/admin/stats.jsp with the specified core
put into request scope keyed as "org.apache.solr.SolrCore".
It is unnecessary, and potentially problematic, to have the SolrDispatchFilter
configured to also filter on forwards. Do not configure
this dispatcher as <dispatcher>FORWARD</dispatcher>.
-->
<filter-name>SolrRequestFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>Zookeeper</servlet-name>
<servlet-class>org.apache.solr.servlet.ZookeeperInfoServlet</servlet-class>
</servlet>

<servlet>
<servlet-name>LoadAdminUI</servlet-name>
<servlet-class>org.apache.solr.servlet.LoadAdminUiServlet</servlet-class>
</servlet>

<!-- Remove in Solr 5.0 -->
<!-- This sends SC_MOVED_PERMANENTLY (301) for resources that changed in 4.0 -->
<servlet>
<servlet-name>RedirectOldAdminUI</servlet-name>
<servlet-class>org.apache.solr.servlet.RedirectServlet</servlet-class>
<init-param>
<param-name>destination</param-name>
<param-value>${context}/#/</param-value>
</init-param>
</servlet>

<servlet>
<servlet-name>RedirectOldZookeeper</servlet-name>
<servlet-class>org.apache.solr.servlet.RedirectServlet</servlet-class>
<init-param>
<param-name>destination</param-name>
<param-value>${context}/zookeeper</param-value>
</init-param>
</servlet>

<servlet>
<servlet-name>RedirectLogging</servlet-name>
<servlet-class>org.apache.solr.servlet.RedirectServlet</servlet-class>
<init-param>
<param-name>destination</param-name>
<param-value>${context}/#/~logging</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>SolrRestApi</servlet-name>
<servlet-class>org.restlet.ext.servlet.ServerServlet</servlet-class>
<init-param>
<param-name>org.restlet.application</param-name>
<param-value>org.apache.solr.rest.SolrRestApi</param-value>
</init-param>
</servlet>

<servlet-mapping>
<servlet-name>RedirectOldAdminUI</servlet-name>
<url-pattern>/admin/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>RedirectOldAdminUI</servlet-name>
<url-pattern>/admin</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>RedirectOldZookeeper</servlet-name>
<url-pattern>/zookeeper.jsp</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>RedirectLogging</servlet-name>
<url-pattern>/logging</url-pattern>
</servlet-mapping>
<!-- Servlet Mapping -->
<servlet-mapping>
<servlet-name>Zookeeper</servlet-name>
<url-pattern>/zookeeper</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>LoadAdminUI</servlet-name>
<url-pattern>/admin.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SolrRestApi</servlet-name>
<url-pattern>/schema/*</url-pattern>
</servlet-mapping>

<mime-mapping>
<extension>.xsl</extension>
<!-- per http://www.w3.org/TR/2006/PR-xslt20-20061121/ -->
<mime-type>application/xslt+xml</mime-type>
</mime-mapping>
<welcome-file-list>
<welcome-file>admin.html</welcome-file>
</welcome-file-list>
</web-app>

0 comments on commit eeee649

Please sign in to comment.