You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by nk...@apache.org on 2016/02/08 23:35:53 UTC

[18/50] [abbrv] lucene-solr git commit: SOLR-8363: Fix luceneMatchVersion check and update in build scripts

SOLR-8363: Fix luceneMatchVersion check and update in build scripts

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_5_4@1717905 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/c0d9de40
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/c0d9de40
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/c0d9de40

Branch: refs/heads/branch_5_4
Commit: c0d9de40f0123c04cbacf010342ef41125ccd154
Parents: edbc3f3
Author: Varun Thacker <va...@apache.org>
Authored: Fri Dec 4 07:15:01 2015 +0000
Committer: Varun Thacker <va...@apache.org>
Committed: Fri Dec 4 07:15:01 2015 +0000

----------------------------------------------------------------------
 dev-tools/scripts/addVersion.py                      | 15 ++++++++-------
 solr/CHANGES.txt                                     |  3 +++
 solr/build.xml                                       | 13 +++++++++++++
 solr/example/example-DIH/solr/db/conf/solrconfig.xml |  2 +-
 .../example-DIH/solr/mail/conf/solrconfig.xml        |  2 +-
 .../example/example-DIH/solr/rss/conf/solrconfig.xml |  2 +-
 .../example-DIH/solr/solr/conf/solrconfig.xml        |  2 +-
 .../example-DIH/solr/tika/conf/solrconfig.xml        |  2 +-
 solr/example/files/conf/solrconfig.xml               |  2 +-
 9 files changed, 30 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c0d9de40/dev-tools/scripts/addVersion.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/addVersion.py b/dev-tools/scripts/addVersion.py
index 702bc4d..0da761e 100644
--- a/dev-tools/scripts/addVersion.py
+++ b/dev-tools/scripts/addVersion.py
@@ -126,13 +126,14 @@ def update_example_solrconfigs(new_version):
   print('  updating example solrconfig.xml files')
   matcher = re.compile('<luceneMatchVersion>')
 
-  configset_dir = 'solr/server/solr/configsets'
-  if not os.path.isdir(configset_dir):
-    raise RuntimeError("Can't locate configset dir (layout change?) : " + configset_dir)
-  for root,dirs,files in os.walk(configset_dir, onerror=onerror):
-    for f in files:
-      if f == 'solrconfig.xml':
-        update_solrconfig(os.path.join(root, f), matcher, new_version) 
+  paths = ['solr/server/solr/configsets', 'solr/example']
+  for path in paths:
+    if not os.path.isdir(path):
+      raise RuntimeError("Can't locate configset dir (layout change?) : " + path)
+    for root,dirs,files in os.walk(path, onerror=onerror):
+      for f in files:
+        if f == 'solrconfig.xml':
+          update_solrconfig(os.path.join(root, f), matcher, new_version)
 
 def update_solrconfig(filename, matcher, new_version):
   print('    %s...' % filename, end='', flush=True)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c0d9de40/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 84892c8..93ab6f0 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -457,6 +457,9 @@ Other Changes
 * SOLR-8330: Standardize and fix logger creation and usage so that they aren't shared
   across source files.(Jason Gerlowski, Uwe Schindler, Anshum Gupta)
 
+* SOLR-8363: Fix check-example-lucene-match-version Ant task and addVersion.py script to
+  check and update luceneMatchVersion under solr/example/ configs as well logic. (Varun Thacker)
+
 ==================  5.3.1 ==================
 
 Bug Fixes

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c0d9de40/solr/build.xml
----------------------------------------------------------------------
diff --git a/solr/build.xml b/solr/build.xml
index e8d83db..215c949 100644
--- a/solr/build.xml
+++ b/solr/build.xml
@@ -282,6 +282,7 @@
 
   <target name="check-example-lucene-match-version">
     <property name="configsets.dir" value="${server.dir}/solr/configsets"/>
+    <!-- validates all configset solrconfig files-->
     <fail message="Some example solrconfig.xml files under ${configsets.dir} do not refer to the correct luceneMatchVersion: ${tests.luceneMatchVersion}">
       <condition>
         <resourcecount when="greater" count="0">
@@ -293,6 +294,18 @@
         </resourcecount>
       </condition>
     </fail>
+    <!-- validates remaining example solrconfig files-->
+    <fail message="Some example solrconfig.xml files under ${example} do not refer to the correct luceneMatchVersion: ${tests.luceneMatchVersion}">
+      <condition>
+        <resourcecount when="greater" count="0">
+          <fileset dir="${example}" includes="**/solrconfig.xml">
+            <not>
+              <contains text="&lt;luceneMatchVersion&gt;${tests.luceneMatchVersion}&lt;" casesensitive="no"/>
+            </not>
+          </fileset>
+        </resourcecount>
+      </condition>
+    </fail>
     <!-- Count the immediate sub-directories of the configsets dir to ensure all sub-dirs have a solrconfig.xml -->
     <resourcecount property="count.subdirs">
       <dirset dir="${configsets.dir}" includes="*"/>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c0d9de40/solr/example/example-DIH/solr/db/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/example/example-DIH/solr/db/conf/solrconfig.xml b/solr/example/example-DIH/solr/db/conf/solrconfig.xml
index c22ac22..cce98fb 100644
--- a/solr/example/example-DIH/solr/db/conf/solrconfig.xml
+++ b/solr/example/example-DIH/solr/db/conf/solrconfig.xml
@@ -35,7 +35,7 @@
        that you fully re-index after changing this setting as it can
        affect both how text is indexed and queried.
   -->
-  <luceneMatchVersion>5.2.0</luceneMatchVersion>
+  <luceneMatchVersion>5.4.0</luceneMatchVersion>
 
   <!-- <lib/> directives can be used to instruct Solr to load any Jars
        identified and use them to resolve any "plugins" specified in

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c0d9de40/solr/example/example-DIH/solr/mail/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/example/example-DIH/solr/mail/conf/solrconfig.xml b/solr/example/example-DIH/solr/mail/conf/solrconfig.xml
index 25b36eb..f76e658 100644
--- a/solr/example/example-DIH/solr/mail/conf/solrconfig.xml
+++ b/solr/example/example-DIH/solr/mail/conf/solrconfig.xml
@@ -35,7 +35,7 @@
        that you fully re-index after changing this setting as it can
        affect both how text is indexed and queried.
   -->
-  <luceneMatchVersion>5.2.0</luceneMatchVersion>
+  <luceneMatchVersion>5.4.0</luceneMatchVersion>
 
   <!-- <lib/> directives can be used to instruct Solr to load any Jars
        identified and use them to resolve any "plugins" specified in

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c0d9de40/solr/example/example-DIH/solr/rss/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/example/example-DIH/solr/rss/conf/solrconfig.xml b/solr/example/example-DIH/solr/rss/conf/solrconfig.xml
index 124db5d..cb5648d 100644
--- a/solr/example/example-DIH/solr/rss/conf/solrconfig.xml
+++ b/solr/example/example-DIH/solr/rss/conf/solrconfig.xml
@@ -35,7 +35,7 @@
        that you fully re-index after changing this setting as it can
        affect both how text is indexed and queried.
   -->
-  <luceneMatchVersion>5.2.0</luceneMatchVersion>
+  <luceneMatchVersion>5.4.0</luceneMatchVersion>
 
   <!-- <lib/> directives can be used to instruct Solr to load any Jars
        identified and use them to resolve any "plugins" specified in

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c0d9de40/solr/example/example-DIH/solr/solr/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/example/example-DIH/solr/solr/conf/solrconfig.xml b/solr/example/example-DIH/solr/solr/conf/solrconfig.xml
index c28d64e..b5d9eaf 100644
--- a/solr/example/example-DIH/solr/solr/conf/solrconfig.xml
+++ b/solr/example/example-DIH/solr/solr/conf/solrconfig.xml
@@ -35,7 +35,7 @@
        that you fully re-index after changing this setting as it can
        affect both how text is indexed and queried.
   -->
-  <luceneMatchVersion>5.2.0</luceneMatchVersion>
+  <luceneMatchVersion>5.4.0</luceneMatchVersion>
 
   <!-- <lib/> directives can be used to instruct Solr to load any Jars
        identified and use them to resolve any "plugins" specified in

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c0d9de40/solr/example/example-DIH/solr/tika/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/example/example-DIH/solr/tika/conf/solrconfig.xml b/solr/example/example-DIH/solr/tika/conf/solrconfig.xml
index d643bfc..e5be846 100644
--- a/solr/example/example-DIH/solr/tika/conf/solrconfig.xml
+++ b/solr/example/example-DIH/solr/tika/conf/solrconfig.xml
@@ -35,7 +35,7 @@
        that you fully re-index after changing this setting as it can
        affect both how text is indexed and queried.
   -->
-  <luceneMatchVersion>5.2.0</luceneMatchVersion>
+  <luceneMatchVersion>5.4.0</luceneMatchVersion>
 
   <!-- <lib/> directives can be used to instruct Solr to load any Jars
        identified and use them to resolve any "plugins" specified in

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c0d9de40/solr/example/files/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/example/files/conf/solrconfig.xml b/solr/example/files/conf/solrconfig.xml
index e515c1b..4727e14 100644
--- a/solr/example/files/conf/solrconfig.xml
+++ b/solr/example/files/conf/solrconfig.xml
@@ -35,7 +35,7 @@
        that you fully re-index after changing this setting as it can
        affect both how text is indexed and queried.
   -->
-  <luceneMatchVersion>5.0.0</luceneMatchVersion>
+  <luceneMatchVersion>5.4.0</luceneMatchVersion>
 
   <!-- <lib/> directives can be used to instruct Solr to load any Jars
        identified and use them to resolve any "plugins" specified in