Ignore:
Timestamp:
2015-02-18T19:14:04+13:00 (9 years ago)
Author:
ak19
Message:

On windows, ant is unable to move xercesImppl.jar file from GS3 web lib to tomcat lib, since it is on the classpath while ant is running the add-service target for solr. Similarly, can't make build.xml in toplevel GS3 move the xalan related jar files including xercesImpl.jar into tomcat after unpacking tomcat, because ant is running these commands and xercesImpl.jar is still on the PATH. The current solution is that ext\solr\build.xml repackages solr.war with copies of xalan.jar and related jar files from GS3's web lib. Now both GS3 and solr have their own copies of xalan and the related jar files (instead of the recent change, that a single shared copy of each jar exists in tomcat\lib), but these are both still guaranteed to be identical between GS3 and solr, since the solr ones are copied from GS3. As the solr.war is repackaged to contain the correct jar files, when tomcat is run, hey are unpacked and the /solr servlet can run successfully.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/solr/trunk/src/build.xml

    r29715 r29751  
    180180    <copy todir="${web.libdir}">
    181181      <filelist id="logging-bridge" dir="lib/ext" files="jcl-over-slf4j-1.6.6.jar"/>
    182     </copy>
    183 
    184     <echo>Moving xalan related jar files from  ${web.libdir} to ${tomcat.lib.dir}, to share with solr</echo>
    185     <move todir="${tomcat.lib.dir}">
    186       <filelist dir="${web.libdir}" files="${shared-xalan-jars}" />
    187     </move>
     182    </copy>
    188183   
    189184    <echo>Copying ${basedir}/webapps/solr.war to ${tomcat.dir}/webapps</echo>
    190185    <copy todir="${tomcat.dir}/webapps" file="webapps/solr.war" />
     186    <unwar src="${tomcat.dir}/webapps/solr.war" dest="${tomcat.dir}/webapps/solr"/>
     187    <echo>Copying xalan related jar files from  ${web.libdir} into ${tomcat.dir}/webapps/solr.war</echo>
     188    <copy todir="${tomcat.dir}/webapps/solr/WEB-INF/lib">
     189      <filelist dir="${web.libdir}" files="${shared-xalan-jars}" />
     190    </copy>
     191    <jar destfile="${tomcat.dir}/webapps/solr.war" basedir="${tomcat.dir}/webapps/solr" />
     192    <!-- delete the webapps\solr temporary dir: tomcat will unpack the modified war file on startup-->
     193    <delete failonerror="true" dir="${tomcat.dir}/webapps/solr" />
     194   
    191195    <echo>Generating solr context file in ${tomcat.context.dir}</echo>
    192196   
     
    273277    <delete failonerror="false" file="${web.libdir}/jcl-over-slf4j-1.6.6.jar"/>
    274278
    275     <!-- moving shared xalan related jar files back from tomcat lib to GS3 web lib -->
    276     <move todir="${web.libdir}">
    277       <filelist dir="${tomcat.lib.dir}" files="${shared-xalan-jars}" />
    278     </move>
    279 
    280279    <!--http://stackoverflow.com/questions/2140637/how-do-i-build-a-list-of-file-names-->
    281280  </target>
Note: See TracChangeset for help on using the changeset viewer.