mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 04:15:06 +00:00
[docs][fixes #3853] Update maven instructions: You need to explicitly specify lombok is an annotation processor.
This commit is contained in:
2 files changed
+45
-14
No files matched your search
@@ -10,7 +10,13 @@
|
||||
</div><div class="row text-center">
|
||||
<h2><a href="/lombok-edge.jar" id="downloadLink">Download edge release now!</a></h2>
|
||||
<p>
|
||||
You can use the edge release from maven using the projectlombok.org repository:<pre>
|
||||
You can use the edge release from maven using the projectlombok.org repository.
|
||||
This requires:<ul>
|
||||
<li>Adding the lombok maven repository to your <code>repositories</code> section</li>
|
||||
<li>Adding lombok as a dependency to your project in the <code>dependencies</code> section, specifying version <code>edge-SNAPSHOT</code>.</li>
|
||||
<li>Adding lombok as an annotation processor in the <code>annotationProcessorPaths</code> section, specifying version <code>edge-SNAPSHOT</code>.</li>
|
||||
</ul>
|
||||
These sections in your pom file should look like this:<pre>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>projectlombok.org</id>
|
||||
@@ -26,6 +32,26 @@
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies></pre>
|
||||
<pre>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>edge-SNAPSHOT</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</pre>
|
||||
</p>
|
||||
<p>
|
||||
You can use the edge release from gradle using the projectlombok.org repository:<pre>
|
||||
|
||||
@@ -22,20 +22,25 @@
|
||||
</dependencies>
|
||||
</pre>
|
||||
</p>
|
||||
</@s.section>
|
||||
|
||||
<@s.section title="JDK9+ with module-info.java">
|
||||
<p>
|
||||
The configuration of the compiler plug-in should contain the following:<pre>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${version}</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</pre>
|
||||
</p>
|
||||
You also need to add lombok as an annotation processor. This is mandatory starting with JDK23, or JDK9+ if compiling as modules (you have <code>module-info.java</code> files in your build):<pre>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${version}</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</@s.section>
|
||||
|
||||
<@s.section title="Eclipse Compiler (ECJ/JDT)">
|
||||
|
||||
Reference in new issue
Block a user