Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

truststore commands should probably fail on error #29

Open
snowch opened this issue Dec 7, 2016 · 0 comments
Open

truststore commands should probably fail on error #29

snowch opened this issue Dec 7, 2016 · 0 comments

Comments

@snowch
Copy link
Collaborator

snowch commented Dec 7, 2016

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant