Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.*;
import java.util.ArrayList;
import java.util.stream.Collectors;
import java.util.stream.Stream;

Expand Down Expand Up @@ -196,7 +197,7 @@ public class DescriptorGeneratorMojo extends AbstractGeneratorMojo {
* @since 3.5
*/
@Parameter
private List<String> mojoDependencies = null;
private final List<String> mojoDependencies = new ArrayList<>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can not be a final ... Maven need a possibility to set this filed during plugin configuration


/**
* Creates links to existing external javadoc-generated documentation.
Expand Down Expand Up @@ -372,7 +373,12 @@ public void generate() throws MojoExecutionException {
mojoScanner.populatePluginDescriptor(request);
request.setPluginDescriptor(extendPluginDescriptor(request));

outputDirectory.mkdirs();
if (!outputDirectory.exists()) {
if (!outputDirectory.mkdirs()) {
throw new MojoExecutionException(
"Could not create output directory: " + outputDirectory.getAbsolutePath());
}
}

PluginDescriptorFilesGenerator pluginDescriptorGenerator = new PluginDescriptorFilesGenerator();
pluginDescriptorGenerator.execute(outputDirectory, request);
Expand Down Expand Up @@ -459,7 +465,7 @@ public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {
w.write(content);
}
}
} catch (Exception e) {
} catch (IOException e) {
throw new GeneratorException("Unable to generate index for v4 beans", e);
}
}
Expand Down