Skip to content

Commit

Permalink
Add annotationProcessorPaths to pom.xml code snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
mk868 committed Nov 13, 2024
1 parent c168f33 commit 3ef3c7a
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,15 +327,35 @@ annotation. Use `packagePattern` to change this (see Javadoc for details).

### Maven

Add a dependency that contains the discoverable annotation processor:
Add the `record-builder-core` dependency and specify the annotation processor in the Maven Compiler Plugin:

```xml
<dependency>
<groupId>io.soabase.record-builder</groupId>
<artifactId>record-builder-processor</artifactId>
<version>${record.builder.version}</version>
<scope>provided</scope>
</dependency>
<dependencies>
<dependency>
<groupId>io.soabase.record-builder</groupId>
<artifactId>record-builder-core</artifactId>
<version>${record.builder.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>io.soabase.record-builder</groupId>
<artifactId>record-builder-processor</artifactId>
<version>${record.builder.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
```

### Gradle
Expand Down

0 comments on commit 3ef3c7a

Please sign in to comment.