Skip to content

Commit 99f88f1

Browse files
authored
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.
1 parent 7d0eb32 commit 99f88f1

File tree

4,641 files changed

+744
-744
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,641 files changed

+744
-744
lines changed

build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ configure(subprojects.findAll { it.projectDir.toPath().startsWith(rootPath) }) {
7979
* backwards compatibility guarantees and only keeping the latest beta or rc
8080
* in a branch if there are only betas and rcs in the branch so we have
8181
* *something* to test against. */
82-
VersionCollection versions = new VersionCollection(file('core/src/main/java/org/elasticsearch/Version.java').readLines('UTF-8'))
82+
VersionCollection versions = new VersionCollection(file('server/src/main/java/org/elasticsearch/Version.java').readLines('UTF-8'))
8383
if (versions.currentVersion.toString() != VersionProperties.elasticsearch) {
8484
throw new GradleException("The last version in Versions.java [${versions.currentVersion}] does not match " +
8585
"VersionProperties.elasticsearch [${VersionProperties.elasticsearch}]")
@@ -181,8 +181,8 @@ subprojects {
181181
ext.projectSubstitutions = [
182182
"org.elasticsearch.gradle:build-tools:${version}": ':build-tools',
183183
"org.elasticsearch:rest-api-spec:${version}": ':rest-api-spec',
184-
"org.elasticsearch:elasticsearch:${version}": ':core',
185-
"org.elasticsearch:elasticsearch-cli:${version}": ':core:cli',
184+
"org.elasticsearch:elasticsearch:${version}": ':server',
185+
"org.elasticsearch:elasticsearch-cli:${version}": ':server:cli',
186186
"org.elasticsearch:elasticsearch-nio:${version}": ':libs:elasticsearch-nio',
187187
"org.elasticsearch.client:elasticsearch-rest-client:${version}": ':client:rest',
188188
"org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}": ':client:sniffer',
@@ -227,7 +227,7 @@ subprojects {
227227

228228
// Handle javadoc dependencies across projects. Order matters: the linksOffline for
229229
// org.elasticsearch:elasticsearch must be the last one or all the links for the
230-
// other packages (e.g org.elasticsearch.client) will point to core rather than
230+
// other packages (e.g org.elasticsearch.client) will point to server rather than
231231
// their own artifacts.
232232
if (project.plugins.hasPlugin(BuildPlugin)) {
233233
String artifactsHost = VersionProperties.elasticsearch.endsWith("-SNAPSHOT") ? "https://snapshots.elastic.co" : "https://artifacts.elastic.co"
@@ -255,7 +255,7 @@ subprojects {
255255
gradle.projectsEvaluated {
256256
allprojects {
257257
if (project.path == ':test:framework') {
258-
// :test:framework:test cannot run before and after :core:test
258+
// :test:framework:test cannot run before and after :server:test
259259
return
260260
}
261261
configurations.all {

buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class PrecommitTasks {
8484
Task mainForbidden = project.tasks.findByName('forbiddenApisMain')
8585
if (mainForbidden != null) {
8686
mainForbidden.configure {
87-
signaturesURLs += getClass().getResource('/forbidden/es-core-signatures.txt')
87+
signaturesURLs += getClass().getResource('/forbidden/es-server-signatures.txt')
8888
}
8989
}
9090
Task testForbidden = project.tasks.findByName('forbiddenApisTest')

buildSrc/src/main/resources/checkstyle_suppressions.xml

+706-706
Large diffs are not rendered by default.

buildSrc/version.properties

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ jna = 4.5.1
1717
randomizedrunner = 2.5.2
1818
junit = 4.12
1919
httpclient = 4.5.2
20-
# When updating httpcore, please also update core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
20+
# When updating httpcore, please also update server/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
2121
httpcore = 4.4.5
22-
# When updating httpasyncclient, please also update core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
22+
# When updating httpasyncclient, please also update server/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
2323
httpasyncclient = 4.1.2
2424
commonslogging = 1.1.3
2525
commonscodec = 1.10
2626
hamcrest = 1.3
2727
securemock = 1.2
28-
# When updating mocksocket, please also update core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
28+
# When updating mocksocket, please also update server/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
2929
mocksocket = 1.2
3030

3131
# benchmark dependencies

client/rest/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ dependencies {
5757
}
5858

5959
forbiddenApisMain {
60-
//client does not depend on core, so only jdk and http signatures should be checked
60+
//client does not depend on server, so only jdk and http signatures should be checked
6161
signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt'),
6262
PrecommitTasks.getResource('/forbidden/http-signatures.txt')]
6363
}
@@ -66,12 +66,12 @@ forbiddenApisTest {
6666
//we are using jdk-internal instead of jdk-non-portable to allow for com.sun.net.httpserver.* usage
6767
bundledSignatures -= 'jdk-non-portable'
6868
bundledSignatures += 'jdk-internal'
69-
//client does not depend on core, so only jdk signatures should be checked
69+
//client does not depend on server, so only jdk signatures should be checked
7070
signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt'),
7171
PrecommitTasks.getResource('/forbidden/http-signatures.txt')]
7272
}
7373

74-
//JarHell is part of es core, which we don't want to pull in
74+
// JarHell is part of es server, which we don't want to pull in
7575
jarHell.enabled=false
7676

7777
namingConventions {

client/sniffer/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ dependencies {
5757
}
5858

5959
forbiddenApisMain {
60-
//client does not depend on core, so only jdk signatures should be checked
60+
//client does not depend on server, so only jdk signatures should be checked
6161
signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt')]
6262
}
6363

6464
forbiddenApisTest {
6565
//we are using jdk-internal instead of jdk-non-portable to allow for com.sun.net.httpserver.* usage
6666
bundledSignatures -= 'jdk-non-portable'
6767
bundledSignatures += 'jdk-internal'
68-
//client does not depend on core, so only jdk signatures should be checked
68+
//client does not depend on server, so only jdk signatures should be checked
6969
signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt')]
7070
}
7171

@@ -74,7 +74,7 @@ dependencyLicenses {
7474
mapping from: /commons-.*/, to: 'commons'
7575
}
7676

77-
//JarHell is part of es core, which we don't want to pull in
77+
// JarHell is part of es server, which we don't want to pull in
7878
jarHell.enabled=false
7979

8080
namingConventions {
@@ -101,4 +101,4 @@ thirdPartyAudit.excludes = [
101101
//commons-logging provided dependencies
102102
'javax.servlet.ServletContextEvent',
103103
'javax.servlet.ServletContextListener'
104-
]
104+
]

client/test/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ forbiddenApisTest {
4848
signaturesURLs = [PrecommitTasks.getResource('/forbidden/jdk-signatures.txt')]
4949
}
5050

51-
//JarHell is part of es core, which we don't want to pull in
51+
// JarHell is part of es server, which we don't want to pull in
5252
jarHell.enabled=false
5353

5454
// TODO: should we have licenses for our test deps?

distribution/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ task generateDependenciesReport(type: ConcatFilesTask) {
5959
* Notice file *
6060
*****************************************************************************/
6161

62-
// integ test zip only uses core, so a different notice file is needed there
62+
// integ test zip only uses server, so a different notice file is needed there
6363
task buildCoreNotice(type: NoticeTask) {
64-
licensesDir new File(project(':core').projectDir, 'licenses')
64+
licensesDir new File(project(':server').projectDir, 'licenses')
6565
}
6666

6767
// other distributions include notices from modules as well, which are added below later
6868
task buildFullNotice(type: NoticeTask) {
69-
licensesDir new File(project(':core').projectDir, 'licenses')
69+
licensesDir new File(project(':server').projectDir, 'licenses')
7070
}
7171

7272
/*****************************************************************************
@@ -173,8 +173,8 @@ configure(distributions) {
173173
*****************************************************************************/
174174
libFiles = copySpec {
175175
into 'lib'
176-
from project(':core').jar
177-
from project(':core').configurations.runtime
176+
from { project(':server').jar }
177+
from { project(':server').configurations.runtime }
178178
from { project(':libs:plugin-classloader').jar }
179179
// delay add tools using closures, since they have not yet been configured, so no jar task exists yet
180180
from { project(':distribution:tools:launchers').jar }

docs/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ integTestCluster {
3232
configFile 'analysis/stemmer_override.txt'
3333
configFile 'userdict_ja.txt'
3434
configFile 'KeywordTokenizer.rbbi'
35-
extraConfigFile 'hunspell/en_US/en_US.aff', '../core/src/test/resources/indices/analyze/conf_dir/hunspell/en_US/en_US.aff'
36-
extraConfigFile 'hunspell/en_US/en_US.dic', '../core/src/test/resources/indices/analyze/conf_dir/hunspell/en_US/en_US.dic'
35+
extraConfigFile 'hunspell/en_US/en_US.aff', '../server/src/test/resources/indices/analyze/conf_dir/hunspell/en_US/en_US.aff'
36+
extraConfigFile 'hunspell/en_US/en_US.dic', '../server/src/test/resources/indices/analyze/conf_dir/hunspell/en_US/en_US.dic'
3737
// Whitelist reindexing from the local node so we can test it.
3838
setting 'reindex.remote.whitelist', '127.0.0.1:*'
3939
}

core/build.gradle renamed to server/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ dependencies {
9292
// repackaged jna with native bits linked against all elastic supported platforms
9393
compile "org.elasticsearch:jna:${versions.jna}"
9494

95-
if (isEclipse == false || project.path == ":core-tests") {
95+
if (isEclipse == false || project.path == ":server-tests") {
9696
testCompile("org.elasticsearch.test:framework:${version}") {
97-
// tests use the locally compiled version of core
97+
// tests use the locally compiled version of server
9898
exclude group: 'org.elasticsearch', module: 'elasticsearch'
9999
}
100100
}
@@ -105,7 +105,7 @@ dependencies {
105105
if (isEclipse) {
106106
// in eclipse the project is under a fake root, we need to change around the source sets
107107
sourceSets {
108-
if (project.path == ":core") {
108+
if (project.path == ":server") {
109109
main.java.srcDirs = ['java']
110110
main.resources.srcDirs = ['resources']
111111
} else {
@@ -276,7 +276,7 @@ dependencyLicenses {
276276
}
277277
}
278278

279-
if (isEclipse == false || project.path == ":core-tests") {
279+
if (isEclipse == false || project.path == ":server-tests") {
280280
task integTest(type: RandomizedTestingTask,
281281
group: JavaBasePlugin.VERIFICATION_GROUP,
282282
description: 'Multi-node tests',

core/cli/build.gradle renamed to server/cli/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ dependencies {
3939
}
4040

4141
test.enabled = false
42-
// Since CLI does not depend on :core, it cannot run the jarHell task
42+
// Since CLI does not depend on :server, it cannot run the jarHell task
4343
jarHell.enabled = false
4444

4545
forbiddenApisMain {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)