Improve yang-maven-plugin error reporting 93/42193/2
authorMichael Vorburger <vorburger@redhat.com>
Thu, 21 Jul 2016 01:58:22 +0000 (03:58 +0200)
committerRobert Varga <nite@hq.sk>
Thu, 21 Jul 2016 08:26:15 +0000 (08:26 +0000)
commiteddc53acc6e439659970b15c13981551a5dcb0c4
tree0f85bc3cfebb3a86848cc73dcc4d75fd18f5d584
parentf498be1a54a341227494970bf8670b4e95dbf16c
Improve yang-maven-plugin error reporting

Instead of e.g. this: org.apache.maven.plugin.MojoFailureException:
Failed to scan for YANG files in depedencies (...) Caused by:
java.util.zip.ZipException: invalid CEN header (bad signature) at
java.util.zip.ZipFile.open(Native Method)

it will now report the much more useful variation like this:
org.apache.maven.plugin.MojoFailureException: Failed to scan for YANG
files in dependency:
/home/vorburger/.m2/repository/org/opendaylight/openflowplugin/model/model-flow-base/0.3.0-SNAPSHOT/model-flow-base-0.3.0-SNAPSHOT.jar

Change-Id: I1062d10d9157f9ac6b44cd86a29af8cc8e87b25f
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
yang/yang-maven-plugin/src/main/java/org/opendaylight/yangtools/yang2sources/plugin/Util.java