Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion gradle/globals.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ allprojects {

group "org.apache"

def lucenePrereleaseBuild = '9'
// def lucenePrereleaseBuild = '9'

// Repositories to fetch dependencies from.
repositories {
mavenCentral()
/* Reenable this if we need it again in future
maven {
name "LucenePrerelease${lucenePrereleaseBuild}"
url "https://nightlies.apache.org/solr/lucene-prereleases/${lucenePrereleaseBuild}/"
}
*/
}

// Artifacts will have names after full gradle project path
Expand Down
38 changes: 14 additions & 24 deletions gradle/validation/jar-checks.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ subprojects {
dependsOn configurations.jarValidation

doFirst {
def isSolr = project.path.startsWith(":solr")

// When gradle resolves a configuration it applies exclude rules from inherited configurations
// globally (this seems like a bug to me). So we process each inherited configuration independently
// but make sure there are no other dependencies on jarValidation itself.
Expand Down Expand Up @@ -132,28 +130,20 @@ subprojects {
continue
}

// Skip any artifacts from Lucene modules.
if (dep.moduleGroup.startsWith("org.apache.lucene")) {
// ... but process their transitive dependencies for Solr compatibility.
if (isSolr) {
queue.addAll(dep.children)
}
} else {
queue.addAll(dep.children)
dep.moduleArtifacts.each { resolvedArtifact ->
def file = resolvedArtifact.file
if (visited.add(file)) {
infos.add([
name : resolvedArtifact.name,
jarName : file.toPath().getFileName().toString(),
path : file,
module : resolvedArtifact.moduleVersion,
checksum : provider { new DigestUtils(DigestUtils.sha1Digest).digestAsHex(file).trim() },
// We keep track of the files referenced by this dependency (sha, license, notice, etc.)
// so that we can determine unused dangling files later on.
referencedFiles: []
])
}
queue.addAll(dep.children)
dep.moduleArtifacts.each { resolvedArtifact ->
def file = resolvedArtifact.file
if (visited.add(file)) {
infos.add([
name : resolvedArtifact.name,
jarName : file.toPath().getFileName().toString(),
path : file,
module : resolvedArtifact.moduleVersion,
checksum : provider { new DigestUtils(DigestUtils.sha1Digest).digestAsHex(file).trim() },
// We keep track of the files referenced by this dependency (sha, license, notice, etc.)
// so that we can determine unused dangling files later on.
referencedFiles: []
])
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.apache.solr.handler.admin;

import com.codahale.metrics.Gauge;
import org.apache.lucene.LucenePackage;
import org.apache.lucene.util.Version;
import org.apache.solr.api.AnnotatedApi;
import org.apache.solr.api.Api;
import org.apache.solr.common.cloud.UrlScheme;
Expand Down Expand Up @@ -370,10 +370,8 @@ private static SimpleOrderedMap<Object> getLuceneInfo() {
info.add( "solr-spec-version", p.getSpecificationVersion() );
info.add( "solr-impl-version", p.getImplementationVersion() );

p = LucenePackage.class.getPackage();

info.add( "lucene-spec-version", p.getSpecificationVersion() );
info.add( "lucene-impl-version", p.getImplementationVersion() );
info.add( "lucene-spec-version", Version.LATEST.toString() );
info.add( "lucene-impl-version", Version.getPackageImplementationVersion() );

return info;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1679,23 +1679,23 @@ public void testEmptyIndex() throws Exception {
TopDocs td = empty.search(query, 10, sort, true);
assertEquals(0, td.totalHits.value);

sort.setSort(SortField.FIELD_DOC);
sort = new Sort(SortField.FIELD_DOC);
td = empty.search(query, 10, sort, true);
assertEquals(0, td.totalHits.value);

sort.setSort(new SortField("int", SortField.Type.INT), SortField.FIELD_DOC);
sort = new Sort(new SortField("int", SortField.Type.INT), SortField.FIELD_DOC);
td = empty.search(query, 10, sort, true);
assertEquals(0, td.totalHits.value);

sort.setSort(new SortField("string", SortField.Type.STRING, true), SortField.FIELD_DOC);
sort = new Sort(new SortField("string", SortField.Type.STRING, true), SortField.FIELD_DOC);
td = empty.search(query, 10, sort, true);
assertEquals(0, td.totalHits.value);

sort.setSort(new SortField("string_val", SortField.Type.STRING_VAL, true), SortField.FIELD_DOC);
sort = new Sort(new SortField("string_val", SortField.Type.STRING_VAL, true), SortField.FIELD_DOC);
td = empty.search(query, 10, sort, true);
assertEquals(0, td.totalHits.value);

sort.setSort(new SortField("float", SortField.Type.FLOAT), new SortField("string", SortField.Type.STRING));
sort = new Sort(new SortField("float", SortField.Type.FLOAT), new SortField("string", SortField.Type.STRING));
td = empty.search(query, 10, sort, true);
assertEquals(0, td.totalHits.value);
}
Expand Down
Loading