Skip to content

Commit

Permalink
Move security manager codebases files to plugin-metadata (#65243)
Browse files Browse the repository at this point in the history
The codebases files are hints that allow the test framework to map
codebase names required by plugin security policy files to urls that may
exist as classes directories on disk. These files end up in the same
test resources directory in gradle, but in eclipse they exist in
different directories. This commit reorganizes the files so they exist
within the same plugin-metadata source, thereby existing in the same
output directory used by tests. Finally, the codebases files are
filtered out of the final jar within the plugin build.
  • Loading branch information
rjernst authored Nov 19, 2020
1 parent a8ddf76 commit 06b2deb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ class PluginBuildPlugin implements Plugin<Project> {
// create the actual bundle task, which zips up all the files for the plugin
TaskProvider<Zip> bundle = project.tasks.register('bundlePlugin', Zip) {
from buildProperties
from pluginMetadata // metadata (eg custom security policy)
from(pluginMetadata) {
// metadata (eg custom security policy)
// the codebases properties file is only for tests and not needed in production
exclude 'plugin-security.codebases'
}
/*
* If the plugin is using the shadow plugin then we need to bundle
* that shadow jar.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
elasticsearch-nio: org.elasticsearch.nio.ChannelFactory
netty-common: io.netty.util.NettyRuntime

0 comments on commit 06b2deb

Please sign in to comment.