Skip to content

Commit e136f8f

Browse files
bullet-toothdmitry-timofeev
authored andcommitted
Fix Javadoc generation for lombok classes (#901)
Move lombok classes to a separate directory and configure a Maven plugin to put 'delomboked' classes in 'target/generated-sources' so that the Javadoc tool can operate on the Lombok-enhanced Java _source_ files.
1 parent 4c00b5b commit e136f8f

File tree

6 files changed

+31
-3
lines changed

6 files changed

+31
-3
lines changed

exonum-light-client/pom.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,20 @@
270270
</execution>
271271
</executions>
272272
</plugin>
273+
274+
<plugin>
275+
<groupId>org.projectlombok</groupId>
276+
<artifactId>lombok-maven-plugin</artifactId>
277+
<version>1.18.6.0</version>
278+
<executions>
279+
<execution>
280+
<phase>generate-sources</phase>
281+
<goals>
282+
<goal>delombok</goal>
283+
</goals>
284+
</execution>
285+
</executions>
286+
</plugin>
273287
</plugins>
274288
</build>
275289

@@ -291,6 +305,20 @@
291305
<groupId>org.jacoco</groupId>
292306
<artifactId>jacoco-maven-plugin</artifactId>
293307
<version>0.8.3</version>
308+
<configuration>
309+
<excludes>
310+
<!--
311+
Exclude lombok annotated classes which are located at `src/main/lombok`,
312+
because the plugin can't be configured to look for sources there.
313+
-->
314+
<exclude>com/exonum/client/response/Block.class</exclude>
315+
<exclude>com/exonum/client/response/Block*BlockBuilder.class</exclude>
316+
<exclude>com/exonum/client/response/BlockResponse.class</exclude>
317+
<exclude>com/exonum/client/response/BlocksResponse.class</exclude>
318+
<exclude>com/exonum/client/response/HealthCheckInfo.class</exclude>
319+
<exclude>com/exonum/client/response/TransactionResponse.class</exclude>
320+
</excludes>
321+
</configuration>
294322
<executions>
295323
<execution>
296324
<id>prepare-jacoco-agent</id>

exonum-light-client/src/main/java/com/exonum/client/response/Block.java renamed to exonum-light-client/src/main/lombok/com/exonum/client/response/Block.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class Block {
4343
int proposerId;
4444

4545
/**
46-
* Returns the height of this block which is a distance between the last block and the "genesis"
46+
* The height of this block which is a distance between the last block and the "genesis"
4747
* block. Genesis block has 0 height. Therefore, the blockchain height is equal to
4848
* the number of blocks plus one.
4949
*

exonum-light-client/src/main/java/com/exonum/client/response/HealthCheckInfo.java renamed to exonum-light-client/src/main/lombok/com/exonum/client/response/HealthCheckInfo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
@Value
2323
public class HealthCheckInfo {
2424
/**
25-
* Shows information about whether it is possible to achieve the consensus between
26-
* validators in the current state.
25+
* Consensus status shows/indicates whether it is possible
26+
* to achieve the consensus between validators in the current network state.
2727
*/
2828
ConsensusStatus consensusStatus;
2929

0 commit comments

Comments
 (0)