Changeset 32380 for gs3-extensions/solr/trunk/src/build.xml
- Timestamp:
- 2018-08-25T00:49:19+12:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/solr/trunk/src/build.xml
r31859 r32380 4 4 <!-- DIRECTORY LOCATIONS --> 5 5 <!-- local ext paths --> 6 <loadproperties prefix="gs3." srcFile="${basedir}/../../build.properties"/> 6 7 <property name="src.home" value="${basedir}/src/java"/> 7 8 <property name="build.home" value="${basedir}/build"/> … … 17 18 <property name="web.extdir" value="${web.home}/ext/solr"/> 18 19 19 <property name="tomcat.dir" location="${basedir}/../../packages/tomcat"/> <!-- location property creates an absolute path --> 20 <condition property="tomcat.dir" value="${gs3.tomcat.installed.path}" else="${basedir}/../../packages/tomcat"> 21 <and> 22 <isset property="gs3.tomcat.installed.path"/> 23 <not> 24 <equals arg1="${gs3.tomcat.installed.path}" arg2=""/> 25 </not> 26 </and> 27 </condition> 28 <condition property="solr.context" value="${gs3.solr.context}" else="solr"> 29 <and> 30 <isset property="gs3.solr.context"/> 31 <not> 32 <equals arg1="${gs3.solr.context}" arg2=""/> 33 </not> 34 </and> 35 </condition> 20 36 <property name="tomcat.lib.dir" value="${tomcat.dir}/lib"/> 21 37 <property name="tomcat.context.dir" value="${tomcat.dir}/conf/Catalina/localhost"/> 22 38 39 23 40 <path id="compile.classpath"> 24 41 <!-- gs3 jar files we need --> … … 112 129 value="GS2SolrSearch.properties"/> --> 113 130 114 131 115 132 <!-- TARGETS --> 116 133 <target name="usage" description="Print a help message"> … … 196 213 <target name="solr-for-tomcat" description="Helper-target: setting up solr to work tomcat"> 197 214 198 <echo>Copying solr jars needed for running solr with tomcat: ${basedir}/lib/ext</echo>199 <copy todir="${tomcat.lib.dir}">200 <fileset dir="lib/ext">201 <include name="*.jar"/>202 </fileset>203 </copy>204 205 215 <!-- slf4j and commons logging bridge needed to avoid exception about incompatibility in tomcat log files--> 206 216 <echo>Copying ${basedir}/lib/ext/jcl-over-slf4j-1.6.6.jar again to ${web.libdir}</echo> … … 208 218 <filelist id="logging-bridge" dir="lib/ext" files="jcl-over-slf4j-1.6.6.jar"/> 209 219 </copy> 220 221 <echo>Upddating xalan related jar files, morphology and gs3-solrserver jars from ${web.libdir} in solr.war</echo> 222 <war destfile="webapps/solr.war" update="true" > 223 <zipfileset dir="lib/russianmorphology" includes="*.jar" prefix="WEB-INF/lib"/> 224 <zipfileset dir="lib/ext" includes="*.jar" prefix="WEB-INF/lib"/> 225 <zipfileset dir="${web.libdir}" includes="${shared-xalan-jars}" prefix="WEB-INF/lib"/> 226 <zipfileset dir="${build.home}" includes="gs3-solrserver.jar" prefix="WEB-INF/lib"/> 227 </war> 210 228 211 <echo>Copying ${basedir}/webapps/solr.war to ${tomcat.dir}/webapps</echo> 212 <copy todir="${tomcat.dir}/webapps" file="webapps/solr.war" /> 213 <unwar src="${tomcat.dir}/webapps/solr.war" dest="${tomcat.dir}/webapps/solr"/> 214 <echo>Copying xalan related jar files, morphology and gs3-solrserver jars from ${web.libdir} into ${tomcat.dir}/webapps/solr.war</echo> 215 <copy todir="${tomcat.dir}/webapps/solr/WEB-INF/lib"> 216 <filelist dir="${web.libdir}" files="${shared-xalan-jars}" /> 217 <filelist dir="${build.home}" files="gs3-solrserver.jar" /> 218 <filelist dir="lib/russianmorphology" files="${russian-morph-jars}" /> 219 </copy> 220 <jar destfile="${tomcat.dir}/webapps/solr.war" basedir="${tomcat.dir}/webapps/solr" /> 221 <!-- delete the webapps\solr temporary dir: tomcat will unpack the modified war file on startup--> 222 <delete failonerror="true" dir="${tomcat.dir}/webapps/solr" /> 229 <echo>Copying ${basedir}/webapps/solr.war to ${tomcat.dir}/webapps/${solr.context}.war</echo> 230 <copy file="webapps/solr.war" tofile="${tomcat.dir}/webapps/${solr.context}.war" /> 223 231 224 232 <echo>Generating solr context file in ${tomcat.context.dir}</echo> … … 233 241 <filter token="gsdl3webhome" value="${gsdl3.web.home}"/> 234 242 <filter token="tomcathome" value="${tomcat.home}"/> 235 <copy file="solr-tomcat-context.xml.in" tofile="${tomcat.context.dir}/solr.xml" filtering="true" overwrite="true"/> 243 <filter token="solr.context" value="${solr.context}"/> 244 <copy file="solr-tomcat-context.xml.in" tofile="${tomcat.context.dir}/${solr.context}.xml" filtering="true" overwrite="true"/> 236 245 237 246 </target> 238 247 239 248 <!-- copy the content of the web folder (avoiding the top-level .svn directory) --> 240 249 <target name="copy-solr-web" if="ext.web.exists"> … … 289 298 But if solr.war is deleted first, it can't be re-deployed when deleting the solr folder subsequently 290 299 --> 291 <delete failonerror="false" file="${tomcat.dir}/webapps/ solr.war"/>292 <delete failonerror="false" includeEmptyDirs="true" dir="${tomcat.dir}/webapps/ solr"/>293 294 <delete failonerror="false" file="${tomcat.context.dir}/ solr.xml"/>300 <delete failonerror="false" file="${tomcat.dir}/webapps/${solr.context}.war"/> 301 <delete failonerror="false" includeEmptyDirs="true" dir="${tomcat.dir}/webapps/${solr.context}"/> 302 303 <delete failonerror="false" file="${tomcat.context.dir}/${solr.context}.xml"/> 295 304 296 305 <!-- delete all the jar files in tomcat/lib that were copied from ext/solr/lib/ext
Note:
See TracChangeset
for help on using the changeset viewer.