ascopes commented on code in PR #1030:
URL:
https://github.com/apache/maven-plugin-tools/pull/1030#discussion_r2649563543
##########
maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/DescriptorGeneratorMojo.java:
##########
@@ -372,7 +373,12 @@ public void generate() throws MojoExecutionException {
mojoScanner.populatePluginDescriptor(request);
request.setPluginDescriptor(extendPluginDescriptor(request));
- outputDirectory.mkdirs();
+ if (!outputDirectory.exists()) {
Review Comment:
would
https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#createDirectories-java.nio.file.Path-java.nio.file.attribute.FileAttribute
be more sensible to use here? There is use of java.nio.file.Path further down
this file as well.
In Maven 4, I believe the `outputDirectories` parameter could itself be
replaced with a java.nio.file.Path, since the latest version of Plexus supports
both the URI and nio Path APIs out of the box... that'd remove the need to
convert back from the old APIs at all.
--
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]