Attachment 'solr.xml'

Download

   1 <?xml version="1.0"?>
   2 <!--
   3  Licensed to the Apache Software Foundation (ASF) under one or more
   4  contributor license agreements.  See the NOTICE file distributed with
   5  this work for additional information regarding copyright ownership.
   6  The ASF licenses this file to You under the Apache License, Version 2.0
   7  (the "License"); you may not use this file except in compliance with
   8  the License.  You may obtain a copy of the License at
   9 
  10      http://www.apache.org/licenses/LICENSE-2.0
  11 
  12  Unless required by applicable law or agreed to in writing, software
  13  distributed under the License is distributed on an "AS IS" BASIS,
  14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15  See the License for the specific language governing permissions and
  16  limitations under the License.
  17 -->
  18 <!--
  19   Original author: Thorsten Scherler (thorsten.at.apache.org) 
  20   -->
  21 <project>
  22   <!-- SOLR_HOME must be set as an environment variable -->
  23   <property name="solr.home" value="${env.SOLR_HOME}"/>
  24   <condition property="solr.set">
  25     <isset property="solr.home"/>
  26   </condition>
  27   <fail unless="solr.set">Please set SOLR_HOME in your environment. export
  28     SOLR_HOME=~/src/apache/solr/ </fail>
  29   <import file="${solr.home}/build.xml"/>
  30   <property name="solr.build" value="${build}/solr"/>
  31   <property name="solr.src" value="${solr.home}/src"/>
  32   <target name="mysolr.compile">
  33     <!-- The runtime classpath -->
  34     <path id="compile.classpath.solr">
  35       <path refid="ant.classpath"/>
  36       <fileset dir="${lib}">
  37         <include name="*.jar"/>
  38       </fileset>
  39       <fileset dir="${solr.home}/lib">
  40         <include name="*.jar"/>
  41       </fileset>
  42       <pathelement location="${solr.build}/common"/>
  43     </path>
  44     <echo>dest: ${solr.build}/common</echo>
  45     <echo>src: ${solr.src}/java</echo>
  46     <solr-javac destdir="${solr.build}/common"
  47       classpathref="compile.classpath.solr">
  48       <src path="${solr.src}/java"/>
  49       <include name="org/apache/solr/common/**"/>
  50     </solr-javac>
  51     <solr-javac destdir="${solr.build}/core"
  52       classpathref="compile.classpath.solr">
  53       <src path="${solr.src}/java"/>
  54       <src path="${solr.src}/webapp/src"/>
  55       <exclude name="org/apache/solr/common/**"/>
  56     </solr-javac>
  57   </target>
  58   <target name="mysolr.dist-jar" depends="mysolr.compile, solr.make-manifest">
  59     <mkdir dir="${dist}" />
  60     <solr-jar
  61          destfile="${dist}/${fullnamever}-solr.jar"
  62          basedir="${solr.build}/core" />
  63     <!-- package the common classes together -->
  64     <solr-jar
  65          destfile="${dist}/${fullnamever}-solr-common.jar"
  66          basedir="${solr.build}/common" />
  67   </target>
  68   <target name="mysolr.dist-war" depends="mysolr.dist-jar">
  69     <war destfile="${dist}/solr.war"
  70          webxml="${solr.src}/webapp/WEB-INF/web.xml"
  71          filesetmanifest="skip"
  72          manifest="${build}/META-INF/MANIFEST.MF">
  73        <lib dir="${solr.home}/lib">
  74          <exclude name="servlet-api*.jar" />
  75          <exclude name="easymock.jar" />
  76        </lib>
  77        <lib dir="${dist}">
  78          <include name="${fullnamever}-solr.jar" />
  79          <include name="${fullnamever}-solr-common.jar" />
  80        </lib>
  81        <fileset dir="${solr.src}/webapp/resources" />
  82     </war>
  83   </target>
  84   <target name="mysolr.dist" depends="mysolr.dist-war">
  85     <property name="solr.app" value="${dist}/solrappp"/>
  86     <property name="sorl.example" value="${solr.home}/example"/>
  87     <mkdir dir="${solr.app}"/>
  88     <mkdir dir="${solr.app}/logs"/>
  89     <copy todir="${solr.app}">
  90       <fileset dir="${boja.solr}" includes="**,*"/>
  91     </copy>
  92     <copy todir="${solr.app}/etc">
  93       <fileset dir="${sorl.example}/etc" includes="**,*"/>
  94     </copy>
  95     <copy todir="${solr.app}/lib">
  96       <fileset dir="${sorl.example}/lib" includes="**,*"/>
  97     </copy>
  98     <copy todir="${solr.app}/solr/bin">
  99       <fileset dir="${solr.src}/scripts">
 100         <exclude name="scripts.conf"/>
 101       </fileset>
 102     </copy>
 103     <chmod dir="${solr.app}/solr/bin" perm="755" includes="**"/>
 104     <copy file="${dist}/solr.war" tofile="${solr.app}/webapps/solr.war"/>
 105     <copy todir="${solr.app}/solr/conf" overwrite="false">
 106       <fileset dir="${sorl.example}/solr/conf" includes="**,*"/>
 107     </copy>
 108     <chmod dir="${solr.app}/solr/conf" perm="755" includes="schema.xml,solrconfig.xml"/>
 109     <copy file="${sorl.example}/start.jar" tofile="${solr.app}/start.jar"/>
 110     <echo>Solr successfully builded.</echo>
 111     <echo>You can excute the following command to start the server:Solr successfully builded.</echo>
 112     <echo>cd ${solr.app};java -jar start.jar</echo>
 113   </target>
 114 </project>

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2007-09-07 11:57:42, 0.3 KB) [[attachment:build.xml]]
  • [get | view] (2007-09-07 11:54:00, 4.5 KB) [[attachment:solr.xml]]
 All files | Selected Files: delete move to page

You are not allowed to attach a file to this page.