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

curl/oracle-accept-license syntax #1

Open
dvriend opened this issue Jul 14, 2019 · 2 comments
Open

curl/oracle-accept-license syntax #1

dvriend opened this issue Jul 14, 2019 · 2 comments

Comments

@dvriend
Copy link

dvriend commented Jul 14, 2019

For all(?) of the chapter repos, I'm running into trouble with the build (i.e. mvn clean package docker:build).

The curl command supplied in the master branch fails:
curl -k -LO "http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip" -H 'Cookie: oraclelicense=accept-securebackup-cookie' && \

The following command succeeds.
curl -q -L -C - -b "oraclelicense=accept-securebackup-cookie" -o /tmp/jce_policy-8.zip -O http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip && \

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Console output !!!!!!!!!!!!!!!!!!!!!
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for thoughtmechanix-parent-pom 0.0.1-SNAPSHOT:
[INFO]
[INFO] Config Server ...................................... FAILURE [ 14.458 s]
[INFO] Eagle Eye Licensing Service ........................ SKIPPED
[INFO] Eagle Eye Organization Service ..................... SKIPPED
[INFO] Eureka Server ...................................... SKIPPED
[INFO] thoughtmechanix-parent-pom ......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.444 s
[INFO] Finished at: 2019-07-14T12:34:26-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.10:build (default-cli) on project configurationserver: Exception caught: The command '/bin/sh -c cd /tmp/ && curl -k -LO "http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip" -H 'Cookie: oraclelicense=accept-securebackup-cookie' && unzip jce_policy-8.zip && rm jce_policy-8.zip && yes |cp -v /tmp/UnlimitedJCEPolicyJDK8/*.jar /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/' returned a non-zero code: 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

@syeddanishzakir8080
Copy link

Just so anyone is facing the same issue, I found the solution here.

@jitendraVishnoi
Copy link

jitendraVishnoi commented Jan 27, 2020

Changed wget from curl as next command in chain was not waiting for curl to finish downolad.

FROM openjdk:8-jdk-alpine
RUN apk update && apk upgrade && apk add netcat-openbsd && apk add curl
RUN mkdir -p /usr/local/configserver
RUN echo $JAVA_HOME
RUN cd /tmp/ &&
wget "http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip" --header 'Cookie: oraclelicense=accept-securebackup-cookie' &&
unzip jce_policy-8.zip &&
rm jce_policy-8.zip &&
yes |cp -v /tmp/UnlimitedJCEPolicyJDK8/*.jar /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/
ADD @project.build.finalName@.jar /usr/local/configserver/
ADD run.sh run.sh
RUN chmod +x run.sh
CMD ./run.sh

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

3 participants