BigInsights-on-Apache-Hadoop icon indicating copy to clipboard operation
BigInsights-on-Apache-Hadoop copied to clipboard

truststore commands should probably fail on error

Open snowch opened this issue 8 years ago • 0 comments

E.g.

    ant.exec(executable: "${getKeytoolPath()}", dir:'./', failonerror: "true") {
        arg(line: '-import -trustcacerts -alias biginsights -file ../../certificate -keystore ./truststore.jks -storepass mypassword -noprompt')
    }

When running with an invalid certificate:

$ ./gradlew Example --debug
...
...
The ' characters around the executable and arguments are
not part of the command.
19:48:09.700 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Execute:Java13CommandLauncher: Executing '/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/bin/keytool' with arguments:
'-import'
'-trustcacerts'
'-alias'
'biginsights'
'-file'
'../../certificate'
'-keystore'
'./truststore.jks'
'-storepass'
'mypassword'
'-noprompt'

The ' characters around the executable and arguments are
not part of the command.
19:48:09.960 [INFO] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:exec] keytool error: java.lang.Exception: Input not an X.509 certificate
19:48:09.963 [DEBUG] [org.gradle.configuration.project.BuildScriptProcessor] Timing: Running the build script took 5.625 secs
19:48:09.978 [ERROR] [org.gradle.BuildExceptionReporter]
19:48:09.979 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
19:48:09.980 [ERROR] [org.gradle.BuildExceptionReporter]
19:48:09.980 [ERROR] [org.gradle.BuildExceptionReporter] * Where:
19:48:09.980 [ERROR] [org.gradle.BuildExceptionReporter] Build file '/Users/snowch/Repos/BigInsights-on-Apache-Hadoop/examples/HiveGroovy/build.gradle' line: 54
19:48:09.980 [ERROR] [org.gradle.BuildExceptionReporter]
19:48:09.980 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
19:48:09.981 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred evaluating root project 'HiveGroovy'.
19:48:09.981 [ERROR] [org.gradle.BuildExceptionReporter] > exec returned: 1
19:48:09.981 [ERROR] [org.gradle.BuildExceptionReporter]
19:48:09.981 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
19:48:09.981 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.
19:48:09.982 [LIFECYCLE] [org.gradle.BuildResultLogger]
19:48:09.982 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED

snowch avatar Dec 07 '16 19:12 snowch