gnodet-bot commented on code in PR #1209:
URL: 
https://github.com/apache/maven-plugin-tools/pull/1209#discussion_r4292484240


##########
src/site/markdown/index.md:
##########
@@ -65,5 +63,8 @@ Javadoc tags are in general being resolved and replaced by 
their XHTML value bef
 
 - [Maven Plugin Testing](/plugin-testing/)
 
-- [Maven Plugin API](/ref/current/maven-plugin-api/)
+- [Maven 3 Plugin API](/ref/current/maven-plugin-api/)
 
+- [Maven 3 Plugin API](/ref/current/maven-plugin-api/), with its plugin 
descriptor

Review Comment:
   **Duplicate link.** Both this line and line 66 link to 
`/ref/current/maven-plugin-api/`. The trailing ", with its plugin descriptor" 
text is not a hyperlink — it should be a separate link to the descriptor page:
   
   ```suggestion
   - [Maven 3 Plugin Descriptor](/ref/current/maven-plugin-api/plugin.html)
   ```



##########
maven-plugin-tools-annotations/src/site/markdown/index.md:
##########
@@ -142,11 +145,56 @@ public class MyMojo
 }
 ```
 
+### for Maven 4 plugins
+
+In addition to Maven 3 plugins, Maven 4 has a Maven 4-specific API that adds 
new features:
+
+```java
+import org.apache.maven.api.MojoExecution;
+import org.apache.maven.api.Project;
+import org.apache.maven.api.Session;
+import org.apache.maven.api.di.Inject;
+import org.apache.maven.api.plugin.Log;
+import org.apache.maven.api.plugin.MojoException;
+import org.apache.maven.api.plugin.annotations.Execute;
+import org.apache.maven.api.plugin.annotations.Mojo;
+import org.apache.maven.api.plugin.annotations.Parameter;
+
+@Mojo(name = "<goal-name>")
+public class MyMojo implements org.apache.maven.api.plugin.Mojo {
+  /**
+   * Project directory.
+   */
+  @Parameter(defaultValue = "${basedir}", readonly = true)
+  private Path basedir;
+
+  @Parameter(property = "first.touchFile", defaultValue = 
"${project.build.directory}/touch.txt", required = true)
+  private Path touchFile;
+
+  @Inject
+  private Session session;
+
+  @Inject
+  private Project project;
+
+  @Inject
+  private MojoExecution mojo;
+
+  @Inject
+  private Log log;
+
+  public void execute() throws MojoException {
+    log.info("Executing first");
+  }
+}
+```
+

Review Comment:
   **Misleading link target.** The link text says `plugin descriptor` but the 
URL points to the annotations javadocs (`package-summary.html`), not to a 
descriptor schema. Consistent with `src/site/markdown/index.md`, this should 
point to `/ref/4-LATEST/api/maven-api-plugin/plugin.html`:
   
   ```suggestion
   - Maven 4 [META-INF/maven/plugin.xml plugin 
descriptor](/ref/4-LATEST/api/maven-api-plugin/plugin.html)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to