Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename core module to server #28180

Merged
merged 3 commits into from
Jan 11, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}]")
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
1,412 changes: 706 additions & 706 deletions buildSrc/src/main/resources/checkstyle_suppressions.xml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions buildSrc/version.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jna = 4.4.0-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
Expand Down
6 changes: 3 additions & 3 deletions client/rest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')]
}
Expand All @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions client/sniffer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ 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')]
}

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')]
}

Expand All @@ -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 {
Expand All @@ -101,4 +101,4 @@ thirdPartyAudit.excludes = [
//commons-logging provided dependencies
'javax.servlet.ServletContextEvent',
'javax.servlet.ServletContextListener'
]
]
2 changes: 1 addition & 1 deletion client/test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
10 changes: 5 additions & 5 deletions distribution/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}

/*****************************************************************************
Expand Down Expand Up @@ -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 }
Expand Down
4 changes: 2 additions & 2 deletions docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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:*'
}
Expand Down
8 changes: 4 additions & 4 deletions core/build.gradle → server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
Expand All @@ -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 {
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion core/cli/build.gradle → server/cli/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading