mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
Build: Reorganize src roots
This change flattens the directory structure, both for the elasticsearch specific directories, as well as within the elasticsearch x-pack plugin. closes elastic/elasticsearch#2957 Original commit: elastic/x-pack-elasticsearch@45891a4632
This commit is contained in:
parent
1cca04924f
commit
1fa0f835fe
@ -16,9 +16,9 @@ subprojects {
|
||||
|
||||
task bundlePack(type: Zip) {
|
||||
onlyIf { project('kibana').bundlePlugin.enabled }
|
||||
dependsOn 'elasticsearch:x-pack:bundlePlugin'
|
||||
dependsOn 'elasticsearch:bundlePlugin'
|
||||
dependsOn 'kibana:bundlePlugin'
|
||||
from { zipTree(project('elasticsearch:x-pack').bundlePlugin.outputs.files.singleFile) }
|
||||
from { zipTree(project('elasticsearch').bundlePlugin.outputs.files.singleFile) }
|
||||
from { zipTree(project('kibana').bundlePlugin.outputs.files.singleFile) }
|
||||
destinationDir file('build/distributions')
|
||||
baseName = 'x-pack'
|
||||
@ -55,5 +55,5 @@ subprojects {
|
||||
approvedLicenses = ['Elasticsearch Confidential']
|
||||
additionalLicense 'ESCON', 'Elasticsearch Confidential', 'ELASTICSEARCH CONFIDENTIAL'
|
||||
}
|
||||
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-api:${version}": ':x-plugins:elasticsearch:x-pack' ]
|
||||
ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-api:${version}": ':x-plugins:elasticsearch' ]
|
||||
}
|
||||
|
@ -66,21 +66,6 @@ dependencies {
|
||||
testCompile 'com.squareup.okio:okio:1.6.0'
|
||||
}
|
||||
|
||||
// we keep the source directories in the original structure of split plugins,
|
||||
// in order to facilitate backports to 2.x. TODO: remove after 5.0 release
|
||||
for (String module : ['', 'license-plugin/', 'security/', 'watcher/', 'monitoring/', 'graph/']) {
|
||||
sourceSets {
|
||||
main {
|
||||
java.srcDir("${module}src/main/java")
|
||||
resources.srcDir("${module}src/main/resources")
|
||||
}
|
||||
test {
|
||||
java.srcDir("${module}src/test/java")
|
||||
resources.srcDir("${module}src/test/resources")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// make LicenseSigner available for testing signed licenses
|
||||
sourceSets.test.java {
|
||||
srcDir '../license-tools/src/main/java'
|
||||
@ -101,9 +86,9 @@ processResources {
|
||||
}
|
||||
boolean snapshot = "true".equals(System.getProperty("build.snapshot", "true"))
|
||||
if (snapshot) {
|
||||
from 'license-plugin/keys/dev/public.key'
|
||||
from 'keys/dev/public.key'
|
||||
} else {
|
||||
from 'license-plugin/keys/prod/public.key'
|
||||
from 'keys/prod/public.key'
|
||||
}
|
||||
}
|
||||
|
||||
@ -125,15 +110,9 @@ bundlePlugin {
|
||||
from('bin/x-pack') {
|
||||
into 'bin'
|
||||
}
|
||||
from('security/bin/x-pack') {
|
||||
into 'bin'
|
||||
}
|
||||
from('security/config/x-pack') {
|
||||
from('config/x-pack') {
|
||||
into 'config'
|
||||
}
|
||||
from('watcher/bin/x-pack') {
|
||||
into 'bin'
|
||||
}
|
||||
}
|
||||
|
||||
// add api jar for extension authors to compile against
|
||||
@ -146,10 +125,11 @@ project.afterEvaluate {
|
||||
String apiFileName = jarFile.fileName.toString().replace(project.version, "api-${project.version}")
|
||||
Files.copy(jarFile, jarFile.resolveSibling(apiFileName), StandardCopyOption.REPLACE_EXISTING)
|
||||
|
||||
String pomFileName = jarFile.fileName.toString().replace('.jar', '.pom')
|
||||
/*String pomFileName = jarFile.fileName.toString().replace('.jar', '.pom')
|
||||
String apiPomFileName = apiFileName.replace('.jar', '.pom')
|
||||
Files.copy(jarFile.resolveSibling(pomFileName), jarFile.resolveSibling(apiPomFileName),
|
||||
StandardCopyOption.REPLACE_EXISTING)
|
||||
*/
|
||||
}
|
||||
}
|
||||
assemble.dependsOn(apiJar)
|
||||
@ -157,7 +137,7 @@ project.afterEvaluate {
|
||||
publications {
|
||||
apijar(MavenPublication) {
|
||||
from project.components.java
|
||||
artifactId = artifactId + '-api'
|
||||
artifactId = 'x-pack-api'
|
||||
pom.withXml { XmlProvider xml ->
|
||||
Node root = xml.asNode()
|
||||
root.appendNode('name', project.pluginProperties.extension.name)
|
||||
|
@ -1,8 +0,0 @@
|
||||
= Elasticsearch Security Plugin
|
||||
|
||||
This plugins adds security features to elasticsearch
|
||||
|
||||
You can build the plugin with `mvn package`.
|
||||
|
||||
The documentation is put in the `docs/` directory.
|
||||
|
@ -1,31 +0,0 @@
|
||||
[[Testing Framework Cheatsheet]]
|
||||
= Testing
|
||||
|
||||
[partintro]
|
||||
|
||||
Elasticsearch and X-Pack use jUnit for testing, they also use randomness
|
||||
in the tests, that can be set using a seed, please refer to the
|
||||
Elasticsearch TESTING.asciidoc cheatsheet to know all about it.
|
||||
|
||||
Tests are executed with network transport and unicast discovery, as this is
|
||||
the configuration that's secured by X-Pack.
|
||||
|
||||
== Testing the REST layer
|
||||
|
||||
The available integration tests are specific for Security functionalities
|
||||
and make use of the java API to communicate with the elasticsearch nodes,
|
||||
using the internal binary transport (port 9300 by default).
|
||||
Security is also tested using the REST tests provided by Elasticsearch core,
|
||||
just by running those same tests against a cluster with X-Pack installed.
|
||||
|
||||
The REST tests are run automatically during the integration test phase
|
||||
(`gradle integTest`). Some tests are blacklisted as they are known to fail against
|
||||
X-Pack due to different behaviours introduced by the security plugin.
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
gradle integTest
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
`XPackRestIT` is the executable test class that runs all the
|
||||
yaml suites available within the `rest-api-spec` folder.
|
||||
|
@ -1,15 +0,0 @@
|
||||
es.logger.level=INFO
|
||||
log4j.rootLogger=${es.logger.level}, out
|
||||
|
||||
log4j.logger.org.apache.http=INFO, out
|
||||
log4j.additivity.org.apache.http=false
|
||||
|
||||
log4j.appender.out=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.out.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.out.layout.conversionPattern=[%d{ISO8601}][%-5p][%-25c] %m%n
|
||||
|
||||
log4j.logger.xpack.security.audit.logfile=${es.logger.level}, access_log
|
||||
|
||||
log4j.appender.access_log=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.access_log.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.access_log.layout.conversionPattern=%m%n
|
@ -1,32 +0,0 @@
|
||||
# Licensed to Elasticsearch under one or more contributor
|
||||
# license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright
|
||||
# ownership. Elasticsearch licenses this file to you under
|
||||
# the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on
|
||||
# an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||
# either express or implied. See the License for the specific
|
||||
# language governing permissions and limitations under the License.
|
||||
|
||||
com.carrotsearch.randomizedtesting.RandomizedTest#globalTempDir() @ Use newTempDirPath() instead
|
||||
com.carrotsearch.randomizedtesting.annotations.Seed @ Don't commit hardcoded seeds
|
||||
|
||||
org.apache.lucene.codecs.Codec#setDefault(org.apache.lucene.codecs.Codec) @ Use the SuppressCodecs("*") annotation instead
|
||||
|
||||
@defaultMessage use org.elasticsearch.common.Base64#encodeBytes(byte[])
|
||||
org.apache.commons.codec.binary.Base64#encodeBase64(byte[])
|
||||
org.apache.commons.codec.binary.Base64#encodeBase64String(byte[])
|
||||
|
||||
@defaultMessage use org.elasticsearch.common.Base64#encodeBytes(byte[], int, int, int) with Base64.URL_SAFE
|
||||
org.apache.commons.codec.binary.Base64#encodeBase64URLSafe(byte[])
|
||||
org.apache.commons.codec.binary.Base64#encodeBase64URLSafeString(byte[])
|
||||
|
||||
@defaultMessage use org.elasticsearch.common.Base64#decode
|
||||
org.apache.commons.codec.binary.Base64#decodeBase64(java.lang.String)
|
||||
org.apache.commons.codec.binary.Base64#decodeBase64(byte[])
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user