Rename core module to server (#28180)
This is related to #27933. It renames the core module to server. This is the first step towards introducing an elasticsearch-core jar.
This commit is contained in:
parent
7d0eb3292b
commit
99f88f15c5
10
build.gradle
10
build.gradle
|
@ -79,7 +79,7 @@ configure(subprojects.findAll { it.projectDir.toPath().startsWith(rootPath) }) {
|
|||
* backwards compatibility guarantees and only keeping the latest beta or rc
|
||||
* in a branch if there are only betas and rcs in the branch so we have
|
||||
* *something* to test against. */
|
||||
VersionCollection versions = new VersionCollection(file('core/src/main/java/org/elasticsearch/Version.java').readLines('UTF-8'))
|
||||
VersionCollection versions = new VersionCollection(file('server/src/main/java/org/elasticsearch/Version.java').readLines('UTF-8'))
|
||||
if (versions.currentVersion.toString() != VersionProperties.elasticsearch) {
|
||||
throw new GradleException("The last version in Versions.java [${versions.currentVersion}] does not match " +
|
||||
"VersionProperties.elasticsearch [${VersionProperties.elasticsearch}]")
|
||||
|
@ -181,8 +181,8 @@ subprojects {
|
|||
ext.projectSubstitutions = [
|
||||
"org.elasticsearch.gradle:build-tools:${version}": ':build-tools',
|
||||
"org.elasticsearch:rest-api-spec:${version}": ':rest-api-spec',
|
||||
"org.elasticsearch:elasticsearch:${version}": ':core',
|
||||
"org.elasticsearch:elasticsearch-cli:${version}": ':core:cli',
|
||||
"org.elasticsearch:elasticsearch:${version}": ':server',
|
||||
"org.elasticsearch:elasticsearch-cli:${version}": ':server:cli',
|
||||
"org.elasticsearch:elasticsearch-nio:${version}": ':libs:elasticsearch-nio',
|
||||
"org.elasticsearch.client:elasticsearch-rest-client:${version}": ':client:rest',
|
||||
"org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}": ':client:sniffer',
|
||||
|
@ -227,7 +227,7 @@ subprojects {
|
|||
|
||||
// Handle javadoc dependencies across projects. Order matters: the linksOffline for
|
||||
// org.elasticsearch:elasticsearch must be the last one or all the links for the
|
||||
// other packages (e.g org.elasticsearch.client) will point to core rather than
|
||||
// other packages (e.g org.elasticsearch.client) will point to server rather than
|
||||
// their own artifacts.
|
||||
if (project.plugins.hasPlugin(BuildPlugin)) {
|
||||
String artifactsHost = VersionProperties.elasticsearch.endsWith("-SNAPSHOT") ? "https://snapshots.elastic.co" : "https://artifacts.elastic.co"
|
||||
|
@ -255,7 +255,7 @@ subprojects {
|
|||
gradle.projectsEvaluated {
|
||||
allprojects {
|
||||
if (project.path == ':test:framework') {
|
||||
// :test:framework:test cannot run before and after :core:test
|
||||
// :test:framework:test cannot run before and after :server:test
|
||||
return
|
||||
}
|
||||
configurations.all {
|
||||
|
|
|
@ -84,7 +84,7 @@ class PrecommitTasks {
|
|||
Task mainForbidden = project.tasks.findByName('forbiddenApisMain')
|
||||
if (mainForbidden != null) {
|
||||
mainForbidden.configure {
|
||||
signaturesURLs += getClass().getResource('/forbidden/es-core-signatures.txt')
|
||||
signaturesURLs += getClass().getResource('/forbidden/es-server-signatures.txt')
|
||||
}
|
||||
}
|
||||
Task testForbidden = project.tasks.findByName('forbiddenApisTest')
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -17,15 +17,15 @@ jna = 4.5.1
|
|||
randomizedrunner = 2.5.2
|
||||
junit = 4.12
|
||||
httpclient = 4.5.2
|
||||
# When updating httpcore, please also update core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
|
||||
# When updating httpcore, please also update server/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
|
||||
httpcore = 4.4.5
|
||||
# When updating httpasyncclient, please also update core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
|
||||
# When updating httpasyncclient, please also update server/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
|
||||
httpasyncclient = 4.1.2
|
||||
commonslogging = 1.1.3
|
||||
commonscodec = 1.10
|
||||
hamcrest = 1.3
|
||||
securemock = 1.2
|
||||
# When updating mocksocket, please also update core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
|
||||
# When updating mocksocket, please also update server/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
|
||||
mocksocket = 1.2
|
||||
|
||||
# benchmark dependencies
|
||||
|
|
|
@ -57,7 +57,7 @@ dependencies {
|
|||
}
|
||||
|
||||
forbiddenApisMain {
|
||||
//client does not depend on core, so only jdk and http signatures should be checked
|
||||
//client does not depend on server, so only jdk and http signatures should be checked
|
||||
signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt'),
|
||||
PrecommitTasks.getResource('/forbidden/http-signatures.txt')]
|
||||
}
|
||||
|
@ -66,12 +66,12 @@ forbiddenApisTest {
|
|||
//we are using jdk-internal instead of jdk-non-portable to allow for com.sun.net.httpserver.* usage
|
||||
bundledSignatures -= 'jdk-non-portable'
|
||||
bundledSignatures += 'jdk-internal'
|
||||
//client does not depend on core, so only jdk signatures should be checked
|
||||
//client does not depend on server, so only jdk signatures should be checked
|
||||
signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt'),
|
||||
PrecommitTasks.getResource('/forbidden/http-signatures.txt')]
|
||||
}
|
||||
|
||||
//JarHell is part of es core, which we don't want to pull in
|
||||
// JarHell is part of es server, which we don't want to pull in
|
||||
jarHell.enabled=false
|
||||
|
||||
namingConventions {
|
||||
|
|
|
@ -57,7 +57,7 @@ dependencies {
|
|||
}
|
||||
|
||||
forbiddenApisMain {
|
||||
//client does not depend on core, so only jdk signatures should be checked
|
||||
//client does not depend on server, so only jdk signatures should be checked
|
||||
signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt')]
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ forbiddenApisTest {
|
|||
//we are using jdk-internal instead of jdk-non-portable to allow for com.sun.net.httpserver.* usage
|
||||
bundledSignatures -= 'jdk-non-portable'
|
||||
bundledSignatures += 'jdk-internal'
|
||||
//client does not depend on core, so only jdk signatures should be checked
|
||||
//client does not depend on server, so only jdk signatures should be checked
|
||||
signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt')]
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ dependencyLicenses {
|
|||
mapping from: /commons-.*/, to: 'commons'
|
||||
}
|
||||
|
||||
//JarHell is part of es core, which we don't want to pull in
|
||||
// JarHell is part of es server, which we don't want to pull in
|
||||
jarHell.enabled=false
|
||||
|
||||
namingConventions {
|
||||
|
@ -101,4 +101,4 @@ thirdPartyAudit.excludes = [
|
|||
//commons-logging provided dependencies
|
||||
'javax.servlet.ServletContextEvent',
|
||||
'javax.servlet.ServletContextListener'
|
||||
]
|
||||
]
|
||||
|
|
|
@ -48,7 +48,7 @@ forbiddenApisTest {
|
|||
signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt')]
|
||||
}
|
||||
|
||||
//JarHell is part of es core, which we don't want to pull in
|
||||
// JarHell is part of es server, which we don't want to pull in
|
||||
jarHell.enabled=false
|
||||
|
||||
// TODO: should we have licenses for our test deps?
|
||||
|
|
|
@ -59,14 +59,14 @@ task generateDependenciesReport(type: ConcatFilesTask) {
|
|||
* Notice file *
|
||||
*****************************************************************************/
|
||||
|
||||
// integ test zip only uses core, so a different notice file is needed there
|
||||
// integ test zip only uses server, so a different notice file is needed there
|
||||
task buildCoreNotice(type: NoticeTask) {
|
||||
licensesDir new File(project(':core').projectDir, 'licenses')
|
||||
licensesDir new File(project(':server').projectDir, 'licenses')
|
||||
}
|
||||
|
||||
// other distributions include notices from modules as well, which are added below later
|
||||
task buildFullNotice(type: NoticeTask) {
|
||||
licensesDir new File(project(':core').projectDir, 'licenses')
|
||||
licensesDir new File(project(':server').projectDir, 'licenses')
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
|
@ -173,8 +173,8 @@ configure(distributions) {
|
|||
*****************************************************************************/
|
||||
libFiles = copySpec {
|
||||
into 'lib'
|
||||
from project(':core').jar
|
||||
from project(':core').configurations.runtime
|
||||
from { project(':server').jar }
|
||||
from { project(':server').configurations.runtime }
|
||||
from { project(':libs:plugin-classloader').jar }
|
||||
// delay add tools using closures, since they have not yet been configured, so no jar task exists yet
|
||||
from { project(':distribution:tools:launchers').jar }
|
||||
|
|
|
@ -32,8 +32,8 @@ integTestCluster {
|
|||
configFile 'analysis/stemmer_override.txt'
|
||||
configFile 'userdict_ja.txt'
|
||||
configFile 'KeywordTokenizer.rbbi'
|
||||
extraConfigFile 'hunspell/en_US/en_US.aff', '../core/src/test/resources/indices/analyze/conf_dir/hunspell/en_US/en_US.aff'
|
||||
extraConfigFile 'hunspell/en_US/en_US.dic', '../core/src/test/resources/indices/analyze/conf_dir/hunspell/en_US/en_US.dic'
|
||||
extraConfigFile 'hunspell/en_US/en_US.aff', '../server/src/test/resources/indices/analyze/conf_dir/hunspell/en_US/en_US.aff'
|
||||
extraConfigFile 'hunspell/en_US/en_US.dic', '../server/src/test/resources/indices/analyze/conf_dir/hunspell/en_US/en_US.dic'
|
||||
// Whitelist reindexing from the local node so we can test it.
|
||||
setting 'reindex.remote.whitelist', '127.0.0.1:*'
|
||||
}
|
||||
|
|
|
@ -92,9 +92,9 @@ dependencies {
|
|||
// repackaged jna with native bits linked against all elastic supported platforms
|
||||
compile "org.elasticsearch:jna:${versions.jna}"
|
||||
|
||||
if (isEclipse == false || project.path == ":core-tests") {
|
||||
if (isEclipse == false || project.path == ":server-tests") {
|
||||
testCompile("org.elasticsearch.test:framework:${version}") {
|
||||
// tests use the locally compiled version of core
|
||||
// tests use the locally compiled version of server
|
||||
exclude group: 'org.elasticsearch', module: 'elasticsearch'
|
||||
}
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ dependencies {
|
|||
if (isEclipse) {
|
||||
// in eclipse the project is under a fake root, we need to change around the source sets
|
||||
sourceSets {
|
||||
if (project.path == ":core") {
|
||||
if (project.path == ":server") {
|
||||
main.java.srcDirs = ['java']
|
||||
main.resources.srcDirs = ['resources']
|
||||
} else {
|
||||
|
@ -276,7 +276,7 @@ dependencyLicenses {
|
|||
}
|
||||
}
|
||||
|
||||
if (isEclipse == false || project.path == ":core-tests") {
|
||||
if (isEclipse == false || project.path == ":server-tests") {
|
||||
task integTest(type: RandomizedTestingTask,
|
||||
group: JavaBasePlugin.VERIFICATION_GROUP,
|
||||
description: 'Multi-node tests',
|
|
@ -39,7 +39,7 @@ dependencies {
|
|||
}
|
||||
|
||||
test.enabled = false
|
||||
// Since CLI does not depend on :core, it cannot run the jarHell task
|
||||
// Since CLI does not depend on :server, it cannot run the jarHell task
|
||||
jarHell.enabled = false
|
||||
|
||||
forbiddenApisMain {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue