mirror of https://github.com/apache/lucene.git
LUCENE-10301: Place test-framework into separated modules folder. (#566)
This commit is contained in:
parent
1552c83fc5
commit
54ebf3c73b
|
@ -93,6 +93,14 @@ public class TestModularLayer {
|
|||
+ modulesPath.toAbsolutePath());
|
||||
}
|
||||
|
||||
Path testModulesPath = Paths.get(modulesPropertyValue).resolve("modules-test-framework");
|
||||
if (!Files.isDirectory(testModulesPath)) {
|
||||
throw new AssertionError(
|
||||
DISTRIBUTION_PROPERTY
|
||||
+ " property does not point to a directory where this path is present: "
|
||||
+ modulesPath.toAbsolutePath());
|
||||
}
|
||||
|
||||
Path thirdPartyModulesPath = Paths.get(modulesPropertyValue).resolve("modules-thirdparty");
|
||||
if (!Files.isDirectory(thirdPartyModulesPath)) {
|
||||
throw new AssertionError(
|
||||
|
@ -101,7 +109,7 @@ public class TestModularLayer {
|
|||
+ thirdPartyModulesPath.toAbsolutePath());
|
||||
}
|
||||
|
||||
coreModulesFinder = ModuleFinder.of(modulesPath);
|
||||
coreModulesFinder = ModuleFinder.of(modulesPath, testModulesPath);
|
||||
allCoreModules = coreModulesFinder.findAll();
|
||||
}
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ configure(project(":lucene:distribution")) {
|
|||
docs
|
||||
|
||||
jars
|
||||
jarsTestFramework
|
||||
jarsThirdParty
|
||||
|
||||
binaryDirForTests
|
||||
|
@ -36,13 +37,21 @@ configure(project(":lucene:distribution")) {
|
|||
|
||||
// Maven-published submodule JARs are part of the binary distribution.
|
||||
// We don't copy their transitive dependencies.
|
||||
def binaryModules = rootProject.ext.mavenProjects
|
||||
def binaryModules = rootProject.ext.mavenProjects.findAll { p -> !(p in [
|
||||
// Placed in a separate folder (module layer conflicts).
|
||||
project(":lucene:test-framework"),
|
||||
]) }
|
||||
for (Project module : binaryModules) {
|
||||
jars(module, {
|
||||
transitive = false
|
||||
})
|
||||
}
|
||||
|
||||
// It's placed in a separate modules folder since it has service providers that are consumed by lucene-core for tests.
|
||||
// We won't resolve it when running the Luke app.
|
||||
jarsTestFramework(project(":lucene:test-framework"), {
|
||||
transitive = false
|
||||
})
|
||||
|
||||
// The third-party JARs consist of all the transitive dependencies from these modules.
|
||||
// Not sure whether we have to include all the thirdparty JARs from across all the modules.
|
||||
|
@ -98,6 +107,9 @@ configure(project(":lucene:distribution")) {
|
|||
from(configurations.jars, {
|
||||
into 'modules'
|
||||
})
|
||||
from(configurations.jarsTestFramework, {
|
||||
into 'modules-test-framework'
|
||||
})
|
||||
|
||||
// Binary modules (with dependencies). Don't duplicate project artifacts.
|
||||
from((configurations.jarsThirdParty - configurations.jars), {
|
||||
|
|
Loading…
Reference in New Issue