Skip to content

Commit

Permalink
Add plugin processor and update dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chavjoh committed Jan 24, 2025
1 parent 86d2a62 commit a89608f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
34 changes: 30 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.chavaillaz</groupId>
<artifactId>elasticsearch-log4j-appender</artifactId>
<version>3.0.0-SNAPSHOT</version>
<version>3.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>${project.groupId}.${project.artifactId}</name>
Expand Down Expand Up @@ -38,17 +38,18 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<lombok.version>1.18.36</lombok.version>
<log4j.version>2.24.3</log4j.version>

<!-- Elasticsearch image versions need also to be updated in ElasticAppenderTest -->
<elasticsearch.version>8.17.0</elasticsearch.version>
<elasticsearch.version>8.17.1</elasticsearch.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-bom</artifactId>
<version>2.24.3</version>
<version>${log4j.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -136,7 +137,7 @@
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.27.2</version>
<version>3.27.3</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -157,6 +158,31 @@
</path>
</annotationProcessorPaths>
</configuration>
<executions>
<execution>
<id>generate-log4j-plugin-descriptor</id>
<goals>
<goal>compile</goal>
</goals>
<phase>process-classes</phase>
<configuration>
<proc>only</proc>
<annotationProcessorPaths>
<path>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
</path>
</annotationProcessorPaths>
<annotationProcessors>
<!-- Process sources to generate `Log4j2Plugins.dat` -->
<processor>
org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
</processor>
</annotationProcessors>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ElasticsearchAppenderTest {
public static final String ELASTICSEARCH_PASSWORD = "changeme";
public static final DockerImageName ELASTICSEARCH_IMAGE = DockerImageName
.parse("docker.elastic.co/elasticsearch/elasticsearch")
.withTag("8.17.0");
.withTag("8.17.1");

protected static String createApiKey(ElasticsearchClient client) throws IOException {
return client.security()
Expand Down

0 comments on commit a89608f

Please sign in to comment.