You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2019/12/06 12:05:20 UTC

[lucene-solr] branch gradle-master updated: Correct lucene version passed to tests to be stripped of qualifiers.

This is an automated email from the ASF dual-hosted git repository.

dweiss pushed a commit to branch gradle-master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/gradle-master by this push:
     new 226f549  Correct lucene version passed to tests to be stripped of qualifiers.
226f549 is described below

commit 226f5490a05c379337addc58060dd07195f051ca
Author: Dawid Weiss <dw...@apache.org>
AuthorDate: Fri Dec 6 13:05:10 2019 +0100

    Correct lucene version passed to tests to be stripped of qualifiers.
---
 gradle/testing/randomization.gradle | 13 +++++++++++--
 solr/solrj/build.gradle             |  7 ++-----
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/gradle/testing/randomization.gradle b/gradle/testing/randomization.gradle
index 6042676..b97ad7f 100644
--- a/gradle/testing/randomization.gradle
+++ b/gradle/testing/randomization.gradle
@@ -22,6 +22,15 @@ configure(rootProject) {
     rootSeed = propertyOrDefault('tests.seed', String.format("%08X", new Random().nextLong()))
     rootSeedLong = SeedUtils.parseSeedChain(rootSeed)[0]
     projectSeedLong = rootSeedLong ^ project.path.hashCode()
+
+    // "base" version is stripped of the qualifier. Compute it.
+    baseVersion = {
+      def m = (rootProject.version =~ /^(\d+\.\d+\.\d+)(-(.+))?/)
+      if (!m) {
+        throw GradleException("Can't strip version to just x.y.z: " + rootProject.version)
+      }
+      return m[0][1]
+    }()
   }
 
   task randomizationInfo() {
@@ -72,7 +81,7 @@ allprojects {
           // test data
           [propName: 'tests.linedocsfile', value: 'europarl.lines.txt.gz', description: "Test data file path."],
           // miscellaneous; some of them very weird.
-          [propName: 'tests.LUCENE_VERSION', value: rootProject.version, description: "Base Lucene version."],
+          [propName: 'tests.LUCENE_VERSION', value: baseVersion, description: "Base Lucene version."],
           [propName: 'tests.bwcdir', value: null, description: "Data for backward-compatibility indexes."],
       ]
     }
@@ -85,7 +94,7 @@ configure(allprojects.findAll {project -> project.path.startsWith(":solr") }) {
     ext {
       testOptions += [
           [propName: 'tests.disableHdfs', value: Os.isFamily(Os.FAMILY_WINDOWS) ? 'true' : 'false', description: "Enables or disables @HDFS tests."],
-          [propName: 'tests.luceneMatchVersion', value: rootProject.version, description: "Base Lucene version."],
+          [propName: 'tests.luceneMatchVersion', value: baseVersion, description: "Base Lucene version."],
           [propName: 'common-solr.dir', value: file("${commonDir}/../solr").path, description: "Solr base dir."],
           [propName: 'solr.directoryFactory', value: "org.apache.solr.core.MockDirectoryFactory", description: "Solr directory factory."],
           [propName: 'tests.src.home', value: null, description: "See SOLR-14023."],
diff --git a/solr/solrj/build.gradle b/solr/solrj/build.gradle
index 69ff4e7..e9025a5 100644
--- a/solr/solrj/build.gradle
+++ b/solr/solrj/build.gradle
@@ -36,11 +36,8 @@ dependencies {
     exclude group: "org.slf4j", module: "slf4j-log4j12"
   })
 
-  api('com.fasterxml:aalto-xml', {
-  })
-
-  api('com.fasterxml.staxmate:staxmate', {
-  })
+  api('com.fasterxml:aalto-xml')
+  api('com.fasterxml.staxmate:staxmate')
 
   testImplementation project(':solr:test-framework')
   testImplementation 'org.eclipse.jetty:jetty-webapp'