You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by th...@apache.org on 2015/07/27 22:51:38 UTC

svn commit: r1692947 - in /lucene/dev/branches/branch_5x: ./ dev-tools/ dev-tools/scripts/ solr/ solr/bin/ solr/cloud-dev/ solr/server/ solr/server/contexts/ solr/server/scripts/cloud-scripts/ solr/server/scripts/map-reduce/ solr/server/webapps/ solr/w...

Author: thelabdude
Date: Mon Jul 27 20:51:38 2015
New Revision: 1692947

URL: http://svn.apache.org/r1692947
Log:
SOLR-7227: Solr distribution archive should have the WAR file extracted already

Removed:
    lucene/dev/branches/branch_5x/solr/server/webapps/
Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/build.xml
    lucene/dev/branches/branch_5x/dev-tools/   (props changed)
    lucene/dev/branches/branch_5x/dev-tools/scripts/smokeTestRelease.py
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_5x/solr/README.txt   (contents, props changed)
    lucene/dev/branches/branch_5x/solr/bin/   (props changed)
    lucene/dev/branches/branch_5x/solr/bin/solr
    lucene/dev/branches/branch_5x/solr/build.xml   (contents, props changed)
    lucene/dev/branches/branch_5x/solr/cloud-dev/   (props changed)
    lucene/dev/branches/branch_5x/solr/cloud-dev/solrcloud-start.sh
    lucene/dev/branches/branch_5x/solr/server/   (props changed)
    lucene/dev/branches/branch_5x/solr/server/README.txt
    lucene/dev/branches/branch_5x/solr/server/contexts/solr-jetty-context.xml
    lucene/dev/branches/branch_5x/solr/server/scripts/cloud-scripts/zkcli.bat
    lucene/dev/branches/branch_5x/solr/server/scripts/cloud-scripts/zkcli.sh
    lucene/dev/branches/branch_5x/solr/server/scripts/map-reduce/set-map-reduce-classpath.sh
    lucene/dev/branches/branch_5x/solr/webapp/   (props changed)
    lucene/dev/branches/branch_5x/solr/webapp/build.xml

Modified: lucene/dev/branches/branch_5x/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/build.xml?rev=1692947&r1=1692946&r2=1692947&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/build.xml (original)
+++ lucene/dev/branches/branch_5x/build.xml Mon Jul 27 20:51:38 2015
@@ -296,7 +296,7 @@
       <fileset dir="${basedir}/lucene" includes="**/lib/*.jar" 
                excludes="**/*servlet-api*.jar, analysis/uima/**, tools/**, build/**"/>
       <fileset dir="${basedir}/solr" includes="**/test-lib/*.jar,**/lib/*.jar" 
-               excludes="core/test-lib/*servlet-api*.jar, contrib/analysis-extras/**, test-framework/lib/junit*, test-framework/lib/ant*, test-framework/lib/randomizedtesting*, build/**, dist/**, package/**, example/solr-webapp/**" />
+               excludes="core/test-lib/*servlet-api*.jar, contrib/analysis-extras/**, test-framework/lib/junit*, test-framework/lib/ant*, test-framework/lib/randomizedtesting*, build/**, dist/**, package/**, server/solr-webapp/**" />
       <map from="${basedir}/" to=""/>
     </pathconvert>
     <mkdir dir="nbproject"/>

Modified: lucene/dev/branches/branch_5x/dev-tools/scripts/smokeTestRelease.py
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/dev-tools/scripts/smokeTestRelease.py?rev=1692947&r1=1692946&r2=1692947&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/dev-tools/scripts/smokeTestRelease.py (original)
+++ lucene/dev/branches/branch_5x/dev-tools/scripts/smokeTestRelease.py Mon Jul 27 20:51:38 2015
@@ -168,74 +168,88 @@ LICENSE_FILE_NAME = 'META-INF/LICENSE.tx
 
 def checkJARMetaData(desc, jarFile, svnRevision, version):
 
-  with zipfile.ZipFile(jarFile, 'r') as z:
+  s = None
+  notice = None
+  license = None
+
+  # support expanded WAR directory or JAR file
+  if isinstance(jarFile, str) and os.path.isdir(jarFile):
     for name in (MANIFEST_FILE_NAME, NOTICE_FILE_NAME, LICENSE_FILE_NAME):
-      try:
-        # The Python docs state a KeyError is raised ... so this None
-        # check is just defensive:
-        if z.getinfo(name) is None:
-          raise RuntimeError('%s is missing %s' % (desc, name))
-      except KeyError:
+      if not os.path.isfile(jarFile + '/' + name):
         raise RuntimeError('%s is missing %s' % (desc, name))
 
-    s = decodeUTF8(z.read(MANIFEST_FILE_NAME))
-
-    for verify in (
-            'Specification-Vendor: The Apache Software Foundation',
-            'Implementation-Vendor: The Apache Software Foundation',
-            # Make sure 1.7 compiler was used to build release bits:
-            'X-Compile-Source-JDK: 1.7',
-            # Make sure 1.8 ant was used to build release bits: (this will match 1.8+)
-            'Ant-Version: Apache Ant 1.8',
-            # Make sure .class files are 1.7 format:
-            'X-Compile-Target-JDK: 1.7',
-            'Specification-Version: %s' % version,
-            # Make sure the release was compiled with 1.7:
-            'Created-By: 1.7'):
-      if s.find(verify) == -1:
-        raise RuntimeError('%s is missing "%s" inside its META-INF/MANIFEST.MF' % \
-                           (desc, verify))
-
-    if svnRevision != 'skip':
-      # Make sure this matches the version and svn revision we think we are releasing:
-      verifyRevision = 'Implementation-Version: %s %s ' % (version, svnRevision)
-      if s.find(verifyRevision) == -1:
-        raise RuntimeError('%s is missing "%s" inside its META-INF/MANIFEST.MF (wrong svn revision?)' % \
-                           (desc, verifyRevision))
+    s = open(jarFile + '/' + MANIFEST_FILE_NAME,encoding='UTF-8').read()
+    notice = open(jarFile + '/' + NOTICE_FILE_NAME,encoding='UTF-8').read()
+    license = open(jarFile + '/' + LICENSE_FILE_NAME,encoding='UTF-8').read()
 
-    notice = decodeUTF8(z.read(NOTICE_FILE_NAME))
-    license = decodeUTF8(z.read(LICENSE_FILE_NAME))
+  else:
+    with zipfile.ZipFile(jarFile, 'r') as z:
+      for name in (MANIFEST_FILE_NAME, NOTICE_FILE_NAME, LICENSE_FILE_NAME):
+        try:
+          # The Python docs state a KeyError is raised ... so this None
+          # check is just defensive:
+          if z.getinfo(name) is None:
+            raise RuntimeError('%s is missing %s' % (desc, name))
+        except KeyError:
+          raise RuntimeError('%s is missing %s' % (desc, name))
 
-    idx = desc.find('inside WAR file')
-    if idx != -1:
-      desc2 = desc[:idx]
-    else:
-      desc2 = desc
+      s = decodeUTF8(z.read(MANIFEST_FILE_NAME))
+      notice = decodeUTF8(z.read(NOTICE_FILE_NAME))
+      license = decodeUTF8(z.read(LICENSE_FILE_NAME))
+
+
+  for verify in (
+    'Specification-Vendor: The Apache Software Foundation',
+    'Implementation-Vendor: The Apache Software Foundation',
+    # Make sure 1.7 compiler was used to build release bits:
+    'X-Compile-Source-JDK: 1.7',
+    # Make sure 1.8 ant was used to build release bits: (this will match 1.8+)
+    'Ant-Version: Apache Ant 1.8',
+    # Make sure .class files are 1.7 format:
+    'X-Compile-Target-JDK: 1.7',
+    'Specification-Version: %s' % version,
+    # Make sure the release was compiled with 1.7:
+    'Created-By: 1.7'):
+    if s.find(verify) == -1:
+      raise RuntimeError('%s is missing "%s" inside its META-INF/MANIFEST.MF' % \
+                         (desc, verify))
+
+  if svnRevision != 'skip':
+    # Make sure this matches the version and svn revision we think we are releasing:
+    verifyRevision = 'Implementation-Version: %s %s ' % (version, svnRevision)
+    if s.find(verifyRevision) == -1:
+      raise RuntimeError('%s is missing "%s" inside its META-INF/MANIFEST.MF (wrong svn revision?)' % \
+                           (desc, verifyRevision))
 
-    justFileName = os.path.split(desc2)[1]
+  idx = desc.find('inside WAR file')
+  if idx != -1:
+    desc2 = desc[:idx]
+  else:
+    desc2 = desc
 
-    if justFileName.lower().find('solr') != -1:
-      if SOLR_LICENSE is None:
-        raise RuntimeError('BUG in smokeTestRelease!')
-      if SOLR_NOTICE is None:
-        raise RuntimeError('BUG in smokeTestRelease!')
-      if notice != SOLR_NOTICE:
-        raise RuntimeError('%s: %s contents doesn\'t match main NOTICE.txt' % \
-                           (desc, NOTICE_FILE_NAME))
-      if license != SOLR_LICENSE:
-        raise RuntimeError('%s: %s contents doesn\'t match main LICENSE.txt' % \
-                           (desc, LICENSE_FILE_NAME))
-    else:
-      if LUCENE_LICENSE is None:
-        raise RuntimeError('BUG in smokeTestRelease!')
-      if LUCENE_NOTICE is None:
-        raise RuntimeError('BUG in smokeTestRelease!')
-      if notice != LUCENE_NOTICE:
-        raise RuntimeError('%s: %s contents doesn\'t match main NOTICE.txt' % \
-                           (desc, NOTICE_FILE_NAME))
-      if license != LUCENE_LICENSE:
-        raise RuntimeError('%s: %s contents doesn\'t match main LICENSE.txt' % \
-                           (desc, LICENSE_FILE_NAME))
+  justFileName = os.path.split(desc2)[1]
+  if justFileName.lower().find('solr') != -1 or justFileName.lower().find('webapp') != -1:
+    if SOLR_LICENSE is None:
+      raise RuntimeError('BUG in smokeTestRelease!')
+    if SOLR_NOTICE is None:
+      raise RuntimeError('BUG in smokeTestRelease!')
+    if notice != SOLR_NOTICE:
+      raise RuntimeError('%s: %s contents doesn\'t match main NOTICE.txt' % \
+                         (desc, NOTICE_FILE_NAME))
+    if license != SOLR_LICENSE:
+      raise RuntimeError('%s: %s contents doesn\'t match main LICENSE.txt' % \
+                         (desc, LICENSE_FILE_NAME))
+  else:
+    if LUCENE_LICENSE is None:
+      raise RuntimeError('BUG in smokeTestRelease!')
+    if LUCENE_NOTICE is None:
+      raise RuntimeError('BUG in smokeTestRelease!')
+    if notice != LUCENE_NOTICE:
+      raise RuntimeError('%s: %s contents doesn\'t match main NOTICE.txt' % \
+                         (desc, NOTICE_FILE_NAME))
+    if license != LUCENE_LICENSE:
+      raise RuntimeError('%s: %s contents doesn\'t match main LICENSE.txt' % \
+                         (desc, LICENSE_FILE_NAME))
 
 def normSlashes(path):
   return path.replace(os.sep, '/')
@@ -292,10 +306,11 @@ def checkSolrWAR(warFileName, svnRevisio
   for file in getBinaryDistFiles('lucene', tmpDir, version, baseURL):
     distFilenames[os.path.basename(file)] = file
 
-  with zipfile.ZipFile(warFileName, 'r') as z:
-    for name in z.namelist():
+  for (dirpath, subdirs, files) in os.walk(warFileName):
+    for name in files:
       if name.endswith('.jar'):
-        jarInsideWarContents = z.read(name)
+        path = os.path.join(dirpath, name)
+        jarInsideWarContents = open(path, 'rb').read()
         noJavaPackageClasses('JAR file %s inside WAR file %s' % (name, warFileName),
                              io.BytesIO(jarInsideWarContents))
         if name.lower().find('lucene') != -1 or name.lower().find('solr') != -1:
@@ -779,7 +794,7 @@ def verifyUnpacked(java, project, artifa
       checkJavadocpath('%s/docs' % unpackPath)
 
     else:
-      checkSolrWAR('%s/server/webapps/solr.war' % unpackPath, svnRevision, version, tmpDir, baseURL)
+      checkSolrWAR('%s/server/solr-webapp/webapp' % unpackPath, svnRevision, version, tmpDir, baseURL)
 
       print('    copying unpacked distribution for Java 7 ...')
       java7UnpackPath = '%s-java7' % unpackPath

Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1692947&r1=1692946&r2=1692947&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Mon Jul 27 20:51:38 2015
@@ -297,6 +297,9 @@ Other Changes
   ERROR to WARN for zkcli.{sh,cmd} only.
   (Oliver Schrenk, Tim Potter, Uwe Schindler, shalin)
 
+* SOLR-7227: Ship Solr with the Web application directory exploded into server/solr-webapp,
+  solr.war is no longer included in the distribution bundles. (Timothy Potter)
+
 ==================  5.2.1 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release

Modified: lucene/dev/branches/branch_5x/solr/README.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/README.txt?rev=1692947&r1=1692946&r2=1692947&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/README.txt (original)
+++ lucene/dev/branches/branch_5x/solr/README.txt Mon Jul 27 20:51:38 2015
@@ -150,7 +150,7 @@ Instructions for Building Apache Solr fr
   
    NOTE: 
    To see Solr in action, you may want to use the "ant server" command to build
-   and package Solr into the server/webapps directory. See also server/README.txt.
+   and package Solr into the server directory. See also server/README.txt.
 
 
 Export control

Modified: lucene/dev/branches/branch_5x/solr/bin/solr
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/bin/solr?rev=1692947&r1=1692946&r2=1692947&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/bin/solr (original)
+++ lucene/dev/branches/branch_5x/solr/bin/solr Mon Jul 27 20:51:38 2015
@@ -412,13 +412,6 @@ function jetty_port() {
 # run a Solr command-line tool using the SolrCLI class; 
 # useful for doing cross-platform work from the command-line using Java
 function run_tool() {
-  
-  # Extract the solr.war if it hasn't been done already (so we can access the SolrCLI class)
-  if [[ -e "$DEFAULT_SERVER_DIR/webapps/solr.war" && ! -d "$DEFAULT_SERVER_DIR/solr-webapp/webapp" ]]; then
-    (mkdir -p "$DEFAULT_SERVER_DIR/solr-webapp/webapp" && \
-      cd "$DEFAULT_SERVER_DIR/solr-webapp/webapp" && \
-      "${UNPACK_WAR_CMD[@]}" "$DEFAULT_SERVER_DIR/webapps/solr.war")
-  fi
 
   "$JAVA" $SOLR_SSL_OPTS $AUTHC_OPTS -Dsolr.install.dir="$SOLR_TIP" \
     -Dlog4j.configuration="file:$DEFAULT_SERVER_DIR/scripts/cloud-scripts/log4j.properties" \

Modified: lucene/dev/branches/branch_5x/solr/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/build.xml?rev=1692947&r1=1692946&r2=1692947&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/build.xml (original)
+++ lucene/dev/branches/branch_5x/solr/build.xml Mon Jul 27 20:51:38 2015
@@ -51,9 +51,6 @@
         <attribute name="Main-Class" value="org.apache.solr.util.SimplePostTool"/>
       </manifest>
     </jar>
-    <delete includeemptydirs="true">
-      <fileset dir="${server.dir}/solr-webapp" includes="**/*"/>
-    </delete>
     <echo>See ${common-solr.dir}/README.txt for how to run the Solr server.</echo>
   </target>
 
@@ -372,7 +369,7 @@
         <include name="solr/zoo_data/" />
         <include name="start.jar" />
         <include name="logs/*" />
-        <include name="webapps/**/*" />
+        <include name="webapps" />
         <include name="solr-webapp/**/*" />
         <exclude name="**/.gitignore" />
       </fileset>    	
@@ -517,7 +514,6 @@
     </antcall>
     <mkdir dir="${dest}/${fullnamever}"/>
     <delete includeemptydirs="true">
-      <fileset dir="${server.dir}/solr-webapp" includes="**/*"/>
       <fileset dir="${dest}/${fullnamever}" includes="**/*"/>
     </delete>
  

Modified: lucene/dev/branches/branch_5x/solr/cloud-dev/solrcloud-start.sh
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/cloud-dev/solrcloud-start.sh?rev=1692947&r1=1692946&r2=1692947&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/cloud-dev/solrcloud-start.sh (original)
+++ lucene/dev/branches/branch_5x/solr/cloud-dev/solrcloud-start.sh Mon Jul 27 20:51:38 2015
@@ -43,9 +43,6 @@ rm -f server/server.log
 ant -f ../build.xml clean
 ant server dist
 
-rm -r server/solr-webapp/*
-unzip server/webapps/solr.war -d server/solr-webapp/webapp
-
 for (( i=1; i <= $numServers; i++ ))
 do
  echo "create server$i"

Modified: lucene/dev/branches/branch_5x/solr/server/README.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/server/README.txt?rev=1692947&r1=1692946&r2=1692947&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/server/README.txt (original)
+++ lucene/dev/branches/branch_5x/solr/server/README.txt Mon Jul 27 20:51:38 2015
@@ -75,11 +75,7 @@ server/solr/configsets
 
 server/solr-webapp
 
-  Jetty will extract the solr.war into this directory at runtime.
-
-server/webapps
-
-  Contains the solr.war file.
+  Contains files used by the Solr server; do not edit files in this directory (Solr is not a Java Web application).
 
 
 Notes About Solr Examples

Modified: lucene/dev/branches/branch_5x/solr/server/contexts/solr-jetty-context.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/server/contexts/solr-jetty-context.xml?rev=1692947&r1=1692946&r2=1692947&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/server/contexts/solr-jetty-context.xml (original)
+++ lucene/dev/branches/branch_5x/solr/server/contexts/solr-jetty-context.xml Mon Jul 27 20:51:38 2015
@@ -2,8 +2,6 @@
 <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
 <Configure class="org.eclipse.jetty.webapp.WebAppContext">
   <Set name="contextPath"><Property name="hostContext" default="/solr"/></Set>
-  <Set name="war"><Property name="jetty.base"/>/webapps/solr.war</Set>
+  <Set name="war"><Property name="jetty.base"/>/solr-webapp/webapp</Set>
   <Set name="defaultsDescriptor"><Property name="jetty.base"/>/etc/webdefault.xml</Set>
-  <Set name="tempDirectory"><Property name="jetty.base" default="."/>/solr-webapp</Set>
-  <Set name="persistTempDirectory">true</Set>
 </Configure>

Modified: lucene/dev/branches/branch_5x/solr/server/scripts/cloud-scripts/zkcli.bat
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/server/scripts/cloud-scripts/zkcli.bat?rev=1692947&r1=1692946&r2=1692947&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/server/scripts/cloud-scripts/zkcli.bat (original)
+++ lucene/dev/branches/branch_5x/solr/server/scripts/cloud-scripts/zkcli.bat Mon Jul 27 20:51:38 2015
@@ -9,13 +9,4 @@ REM  Find location of this script
 set SDIR=%~dp0
 if "%SDIR:~-1%"=="\" set SDIR=%SDIR:~0,-1%
 
-IF exist %SDIR%\..\..\solr-webapp\webapp\nul (
-  echo %SDIR%\..\..\solr-webapp\webapp exists
-) ELSE (
-  echo -------------------
-  echo Unzip server\webapps\solr.war to server\solr-webapp\. to use this script.
-  echo Starting Solr via "bin\solr.cmd start" will also do this extraction.
-  echo -------------------
-)
-
 "%JVM%" -Dlog4j.configuration="file:%SDIR%\log4j.properties" -classpath "%SDIR%\..\..\solr-webapp\webapp\WEB-INF\lib\*;%SDIR%\..\..\lib\ext\*" org.apache.solr.cloud.ZkCLI %*

Modified: lucene/dev/branches/branch_5x/solr/server/scripts/cloud-scripts/zkcli.sh
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/server/scripts/cloud-scripts/zkcli.sh?rev=1692947&r1=1692946&r2=1692947&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/server/scripts/cloud-scripts/zkcli.sh (original)
+++ lucene/dev/branches/branch_5x/solr/server/scripts/cloud-scripts/zkcli.sh Mon Jul 27 20:51:38 2015
@@ -9,9 +9,5 @@ JVM="java"
 
 sdir="`dirname \"$0\"`"
 
-if [ ! -d "$sdir/../../solr-webapp/webapp" ]; then
-  unzip $sdir/../../webapps/solr.war -d $sdir/../../solr-webapp/webapp
-fi
-
 PATH=$JAVA_HOME/bin:$PATH $JVM -Dlog4j.configuration=file:$sdir/log4j.properties -classpath "$sdir/../../solr-webapp/webapp/WEB-INF/lib/*:$sdir/../../lib/ext/*" org.apache.solr.cloud.ZkCLI ${1+"$@"}
 

Modified: lucene/dev/branches/branch_5x/solr/server/scripts/map-reduce/set-map-reduce-classpath.sh
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/server/scripts/map-reduce/set-map-reduce-classpath.sh?rev=1692947&r1=1692946&r2=1692947&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/server/scripts/map-reduce/set-map-reduce-classpath.sh (original)
+++ lucene/dev/branches/branch_5x/solr/server/scripts/map-reduce/set-map-reduce-classpath.sh Mon Jul 27 20:51:38 2015
@@ -22,12 +22,6 @@ solr_distrib="$sdir/../../.."
 
 echo `absPath $solr_distrib`
 
-# extract war if necessary
-
-if [ ! -d "$solr_distrib/server/solr-webapp/webapp" ]; then
-   unzip -o $solr_distrib/server/webapps/solr.war -d $solr_distrib/server/solr-webapp/webapp
-fi
-
 # Setup env variables for MapReduceIndexerTool
 
 # Setup HADOOP_CLASSPATH

Modified: lucene/dev/branches/branch_5x/solr/webapp/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/build.xml?rev=1692947&r1=1692946&r2=1692947&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/build.xml (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/build.xml Mon Jul 27 20:51:38 2015
@@ -46,6 +46,7 @@
     <build-manifest title="Apache Solr Search Server"
                     implementation.title="org.apache.solr"/>
     <ant dir="${common-solr.dir}" inheritall="false" target="contribs-add-to-war"/>
+    <mkdir dir="${server.dir}/webapps"/>
     <war destfile="${server.dir}/webapps/solr.war"
          webxml="web/WEB-INF/web.xml"
          manifest="${manifest.file}">
@@ -60,6 +61,14 @@
       <fileset dir="web" excludes="${exclude.from.war}"/>
       <metainf dir="${common-solr.dir}" includes="LICENSE.txt,NOTICE.txt" excludes="${exclude.from.war}"/>
     </war>
+
+    <!-- Ship Solr with the WAR already extracted -->
+    <delete dir="${server.dir}/solr-webapp/webapp"/>
+    <mkdir dir="${server.dir}/solr-webapp/webapp"/>
+    <unzip dest="${server.dir}/solr-webapp/webapp" src="${server.dir}/webapps/solr.war"/>
+    <delete file="${server.dir}/webapps/solr.war"/>
+    <delete dir="${server.dir}/webapps"/>
+
   </target>
 
   <!-- nothing to do -->