You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2019/07/30 12:00:42 UTC

[plc4x-build-tools] branch develop updated: - Changed the plugin to fail the build, if an exception occurs during the generation of code.

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x-build-tools.git


The following commit(s) were added to refs/heads/develop by this push:
     new c00f19e  - Changed the plugin to fail the build, if an exception occurs during the generation of code.
c00f19e is described below

commit c00f19ee48f7cab15d62090bb46b532b79b2f96e
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Tue Jul 30 14:00:36 2019 +0200

    - Changed the plugin to fail the build, if an exception occurs during the generation of code.
---
 .../main/java/org/apache/plc4x/plugins/codegenerator/GenerateMojo.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/code-generation/plc4x-maven-plugin/src/main/java/org/apache/plc4x/plugins/codegenerator/GenerateMojo.java b/code-generation/plc4x-maven-plugin/src/main/java/org/apache/plc4x/plugins/codegenerator/GenerateMojo.java
index 1d11d3f..1e53acb 100644
--- a/code-generation/plc4x-maven-plugin/src/main/java/org/apache/plc4x/plugins/codegenerator/GenerateMojo.java
+++ b/code-generation/plc4x-maven-plugin/src/main/java/org/apache/plc4x/plugins/codegenerator/GenerateMojo.java
@@ -130,7 +130,7 @@ public class GenerateMojo extends AbstractMojo {
             language.generate(outputDir, "org.apache.plc4x." + languageName.toLowerCase() +
                 "." + protocolName.toLowerCase(), types);
         } catch (GenerationException e) {
-            getLog().error("Error generating sources", e);
+            throw new MojoExecutionException("Error generating sources", e);
         }
 
         // Add the generated sources to the project internally.