Skip to content

Commit d245458

Browse files
authored
Modularize the ingest.common component (as well as dissect and grok dependent libs) (#87219)
This is change modularizes the ingest.common component, by adding a module-info.java. As well as two dependent libs. The project only requires painless SPI to compile, so that was fixed along the way ( so that the compile module path can be inferred directly from the dependencies ).
1 parent eb1be45 commit d245458

File tree

4 files changed

+52
-1
lines changed

4 files changed

+52
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
5+
* in compliance with, at your election, the Elastic License 2.0 or the Server
6+
* Side Public License, v 1.
7+
*/
8+
9+
module org.elasticsearch.dissect {
10+
exports org.elasticsearch.dissect;
11+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
5+
* in compliance with, at your election, the Elastic License 2.0 or the Server
6+
* Side Public License, v 1.
7+
*/
8+
9+
module org.elasticsearch.grok {
10+
requires org.jruby.jcodings;
11+
requires org.jruby.joni;
12+
13+
exports org.elasticsearch.grok;
14+
}

modules/ingest-common/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ esplugin {
1616
}
1717

1818
dependencies {
19-
compileOnly project(':modules:lang-painless')
19+
compileOnly project(':modules:lang-painless:spi')
2020
api project(':libs:elasticsearch-grok')
2121
api project(':libs:elasticsearch-dissect')
2222
implementation "org.apache.httpcomponents:httpclient:${versions.httpclient}"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
5+
* in compliance with, at your election, the Elastic License 2.0 or the Server
6+
* Side Public License, v 1.
7+
*/
8+
9+
module org.elasticsearch.ingest.common {
10+
requires org.elasticsearch.base;
11+
requires org.elasticsearch.dissect;
12+
requires org.elasticsearch.grok;
13+
requires org.elasticsearch.painless.spi;
14+
requires org.elasticsearch.server;
15+
requires org.elasticsearch.xcontent;
16+
17+
requires org.apache.httpcomponents.httpclient;
18+
requires org.apache.logging.log4j;
19+
requires org.apache.lucene.analysis.common;
20+
21+
exports org.elasticsearch.ingest.common; // for painless
22+
23+
opens org.elasticsearch.ingest.common to org.elasticsearch.painless.spi; // whitelist resource access
24+
25+
provides org.elasticsearch.painless.spi.PainlessExtension with org.elasticsearch.ingest.common.ProcessorsWhitelistExtension;
26+
}

0 commit comments

Comments
 (0)