You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "hboutemy (via GitHub)" <gi...@apache.org> on 2026/09/20 14:59:06 UTC
[PR] switch from 4.0.0-beta-4 to 3.17.0 [maven-plugin-tools]
hboutemy opened a new pull request, #1209:
URL: https://github.com/apache/maven-plugin-tools/pull/1209
see https://github.com/apache/maven-sources/issues/57#issuecomment-5750294987
let's maintain only `master` that produces a Maven 3 plugin being able to generate both Maven 3 plugin descriptors and Maven 4 plugin descriptors
this acts also dropping `maven-script` and old-Maven 2-style javadoc annotations
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] switch from 4.0.0-beta-4 to 3.17.0 [maven-plugin-tools]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #1209:
URL: https://github.com/apache/maven-plugin-tools/pull/1209#issuecomment-5845946483
I have checked plugin descriptor generated on a few plugins 3.x - build used plugin-tools 3.9.16 and 4.0.0-beta-3
looks the same
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] switch from 4.0.0-beta-4 to 3.17.0 [maven-plugin-tools]
Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] switch from 4.0.0-beta-4 to 3.17.0 [maven-plugin-tools]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #1209:
URL: https://github.com/apache/maven-plugin-tools/pull/1209#issuecomment-5846493740
Of course we need check commits to cherry-pick, one I remember:
- https://github.com/apache/maven-plugin-tools/pull/1145
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] switch from 4.0.0-beta-4 to 3.17.0 [maven-plugin-tools]
Posted by "hboutemy (via GitHub)" <gi...@apache.org>.
hboutemy commented on PR #1209:
URL: https://github.com/apache/maven-plugin-tools/pull/1209#issuecomment-5798352880
need to check/clarify Maven 3 plugin.xml generation = https://maven.apache.org/ref/3.9.16/maven-plugin-api/plugin.html
vs Maven 4 one = https://maven.apache.org/ref/4.0.0-rc-6/api/maven-api-plugin/plugin.html
key difference is not only the new fields in Maven 4 plugin descriptor, but renamings:
- `requiresDependencyResolution` to `dependencyResolution`
- `require*` to new names
see https://github.com/apache/maven/blob/master/api/maven-api-plugin/src/main/mdo/plugin.mdo#L211
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] switch from 4.0.0-beta-4 to 3.17.0 [maven-plugin-tools]
Posted by "slawekjaranowski (via GitHub)" <gi...@apache.org>.
slawekjaranowski commented on PR #1209:
URL: https://github.com/apache/maven-plugin-tools/pull/1209#issuecomment-5845713339
> this acts also dropping maven-script and old-Maven 2-style javadoc annotations
so it will be a braking change
--
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: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org