Skip to content

Commit 231538b

Browse files
committed
Revert "build: drop Lombok dependency"
This reverts commit 053e586.
1 parent 15a7bc6 commit 231538b

1 file changed

Lines changed: 73 additions & 0 deletions

File tree

pom.xml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
<maven.compiler.source>17</maven.compiler.source>
5353
<maven.compiler.target>17</maven.compiler.target>
5454
<maven.compiler.release>17</maven.compiler.release>
55+
<lombok.version>1.18.42</lombok.version>
5556
<gson.version>2.13.2</gson.version>
5657
<httpclient.version>5.5.1</httpclient.version>
5758
<lang3.version>3.19.0</lang3.version>
@@ -111,6 +112,11 @@
111112
<artifactId>httpclient5</artifactId>
112113
<version>${httpclient.version}</version>
113114
</dependency>
115+
<dependency>
116+
<groupId>org.projectlombok</groupId>
117+
<artifactId>lombok</artifactId>
118+
<version>${lombok.version}</version>
119+
</dependency>
114120
<dependency>
115121
<groupId>com.google.code.gson</groupId>
116122
<artifactId>gson</artifactId>
@@ -234,6 +240,52 @@
234240
<runOrder>balanced</runOrder>
235241
</configuration>
236242
</plugin>
243+
<plugin>
244+
<groupId>org.projectlombok</groupId>
245+
<artifactId>lombok-maven-plugin</artifactId>
246+
<version>1.18.20.0</version>
247+
<executions>
248+
<execution>
249+
<id>delombok-sources</id>
250+
<phase>generate-sources</phase>
251+
<goals>
252+
<goal>delombok</goal>
253+
</goals>
254+
<configuration>
255+
<sourceDirectory>src/main/java</sourceDirectory>
256+
<outputDirectory>${project.build.directory}/delombok</outputDirectory>
257+
<addOutputDirectory>false</addOutputDirectory>
258+
<encoding>UTF-8</encoding>
259+
</configuration>
260+
</execution>
261+
</executions>
262+
<dependencies>
263+
<dependency>
264+
<groupId>org.projectlombok</groupId>
265+
<artifactId>lombok</artifactId>
266+
<version>${lombok.version}</version>
267+
</dependency>
268+
</dependencies>
269+
</plugin>
270+
<plugin>
271+
<groupId>org.apache.maven.plugins</groupId>
272+
<artifactId>maven-antrun-plugin</artifactId>
273+
<version>3.0.0</version>
274+
<executions>
275+
<execution>
276+
<id>generate-delomboked-sources-jar</id>
277+
<phase>package</phase>
278+
<goals>
279+
<goal>run</goal>
280+
</goals>
281+
<configuration>
282+
<target>
283+
<jar destfile="${project.build.directory}/${project.build.finalName}-sources.jar" basedir="${project.build.directory}/delombok"/>
284+
</target>
285+
</configuration>
286+
</execution>
287+
</executions>
288+
</plugin>
237289
<plugin>
238290
<groupId>org.codehaus.mojo</groupId>
239291
<artifactId>versions-maven-plugin</artifactId>
@@ -256,6 +308,22 @@
256308
<artifactId>build-helper-maven-plugin</artifactId>
257309
<version>3.2.0</version>
258310
<executions>
311+
<execution>
312+
<id>attach-delomboked-sources-jar</id>
313+
<phase>package</phase>
314+
<goals>
315+
<goal>attach-artifact</goal>
316+
</goals>
317+
<configuration>
318+
<artifacts>
319+
<artifact>
320+
<file>${project.build.directory}/${project.build.finalName}-sources.jar</file>
321+
<type>jar</type>
322+
<classifier>sources</classifier>
323+
</artifact>
324+
</artifacts>
325+
</configuration>
326+
</execution>
259327
<execution>
260328
<id>add-test-source</id>
261329
<phase>generate-test-sources</phase>
@@ -307,6 +375,7 @@
307375
</execution>
308376
</executions>
309377
<configuration>
378+
<sourcepath>${project.build.directory}/delombok</sourcepath>
310379
<!--Disable warnings about missing docstrings.-->
311380
<doclint>all,-missing</doclint>
312381
</configuration>
@@ -434,6 +503,10 @@
434503
</plugins>
435504
</pluginManagement>
436505
<plugins>
506+
<plugin>
507+
<groupId>org.projectlombok</groupId>
508+
<artifactId>lombok-maven-plugin</artifactId>
509+
</plugin>
437510
<plugin>
438511
<groupId>org.xolstice.maven.plugins</groupId>
439512
<artifactId>protobuf-maven-plugin</artifactId>

0 commit comments

Comments
 (0)