I am trying to generate javadoc for very simple java 21 records.
I have this straightforward record:
/**
* The type Some record.
*/
public record SomeRecord(String someField) {
}
and this pom:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<outputDirectory>target/javadoc</outputDirectory>
<reportOutputDirectory>target/javadoc</reportOutputDirectory>
<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
</configuration>
</plugin>
And I am running this maven command:
mvn clean install site -U javadoc:javadoc
Every time, I get this:
SomeRecord.java:6: warning: no @param for someField
[WARNING] public record SomeRecord(String someField) {
[WARNING] ^
What is wrong with this code? What is this @param? I recall a @Param for Spring, but @param (lower case?) How can I generate without the javadoc properly?
@param someField a fancy field for some purposein your JavaDoc. Also, it's just a warning: it should still produce the output just fine.