Merge branch 'master' into bugfix/UIMA-6242-uimaFIT-Maven-plugin-should-fail-on-error-by-default

* master: (124 commits)
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release uimafit-3.1.0
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release uimafit-3.1.0
  [NO JIRA] Adjust UIMA version in the NOTICE file of the binary distribution
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release uimafit-3.1.0
  [NO JIRA] Update documentation to changed API in ExternalResourceFactory and removed a spurious character
  [NO JIRA] Adjusted comparison version for API change report
  [NO JIRA] Updated README file for release.
  [NO JIRA] Updated README file for release.
  [UIMA-6214] Method signature class in ExternalResourceFactory
  Update an Eclipse metadata file.
  [UIMA-5847] Remove UV3 bug workarounds in FSCollectionFactory
  [UIMA-6216] Upgrade to UIMA Core 3.1.1
  [NO JIRA] Fix NOTICE file
  No issue. Make japicmp pick up the right post-analysis file.
  No issue. Set version to 3.1.0-SNAPSHOT
  [UIMA-6181]b Fix complaints about maven-plugin-plugin in Eclipse
  [No Issue] Minor improvement of unit test illustrating error when binding resources to aggregates with nested dependent AEs.
  ...
diff --git a/uimafit-maven-plugin/src/main/java/org/apache/uima/fit/maven/GenerateDescriptorsMojo.java b/uimafit-maven-plugin/src/main/java/org/apache/uima/fit/maven/GenerateDescriptorsMojo.java
index 8cda479..a1aa5c4 100644
--- a/uimafit-maven-plugin/src/main/java/org/apache/uima/fit/maven/GenerateDescriptorsMojo.java
+++ b/uimafit-maven-plugin/src/main/java/org/apache/uima/fit/maven/GenerateDescriptorsMojo.java
@@ -80,6 +80,12 @@
   @Parameter(defaultValue = "${project.build.sourceEncoding}", required = true)
   private String encoding;
 
+  /**
+   * Fail on error.
+   */
+  @Parameter(defaultValue = "true", required = true)
+  private boolean failOnError;
+
   enum TypeSystemSerialization {
     NONE, EMBEDDED
   }
@@ -162,13 +168,13 @@
           componentsManifest.append("classpath*:").append(clazzPath + ".xml").append('\n');
         }
       } catch (SAXException e) {
-        getLog().warn("Cannot serialize descriptor for [" + clazzName + "]", e);
+        handleError("Cannot serialize descriptor for [" + clazzName + "]", e);
       } catch (IOException e) {
-        getLog().warn("Cannot write descriptor for [" + clazzName + "]", e);
+        handleError("Cannot write descriptor for [" + clazzName + "]", e);
       } catch (ClassNotFoundException e) {
-        getLog().warn("Cannot analyze class [" + clazzName + "]", e);
+        handleError("Cannot analyze class [" + clazzName + "]", e);
       } catch (ResourceInitializationException e) {
-        getLog().warn("Cannot generate descriptor for [" + clazzName + "]", e);
+        handleError("Cannot generate descriptor for [" + clazzName + "]", e);
       } finally {
         Thread.currentThread().setContextClassLoader(classLoader);
       }
@@ -185,12 +191,20 @@
       try {
         FileUtils.fileWrite(path.getPath(), encoding, componentsManifest.toString());
       } catch (IOException e) {
-        throw new MojoExecutionException("Cannot write components manifest to [" + path + "]"
+        handleError("Cannot write components manifest to [" + path + "]"
                 + ExceptionUtils.getRootCauseMessage(e), e);
       }
     }
   }
 
+  private void handleError(String message, Exception e) throws MojoExecutionException {
+    if (failOnError) {
+      throw new MojoExecutionException(message, e);
+    }
+
+    getLog().error(message, e);
+  }
+
   private void embedTypeSystems(ProcessingResourceMetaData metadata)
           throws ResourceInitializationException {
     TypeSystemDescriptionFactory.forceTypeDescriptorsScan();