Github user bbende commented on a diff in the pull request:
https://github.com/apache/nifi-maven/pull/7#discussion_r240308506
--- Diff: src/main/java/org/apache/nifi/NarMojo.java ---
@@ -426,12 +479,260 @@
protected boolean cloneDuringInstanceClassLoading;
+ /**
+ * The {@link RepositorySystemSession} used for obtaining the local
and remote artifact repositories.
+ */
+ @Parameter(defaultValue = "${repositorySystemSession}", readonly =
true)
+ private RepositorySystemSession repoSession;
+
+
+ /**
+ * The {@link ProjectBuilder} used to generate the {@link
MavenProject} for the nar artifact the dependency tree is being generated for.
+ */
+ @Component
+ private ProjectBuilder projectBuilder;
+
+
+
@Override
- public void execute() throws MojoExecutionException,
MojoFailureException {
+ public void execute() throws MojoExecutionException {
copyDependencies();
+
+ try {
+ generateDocumentation();
--- End diff --
Could we add an optional property like "enforceDocGeneration" (or some
better name) that when true we would let the exception be thrown here to fail
the build?
The use-case would be to know that when doing a release we have
successfully generated the docs if the build passed. Right now it can silently
fail with a warning and you'd have to manually inspect every NAR to really know.
---