Reputation: 257
I've managed to build my source from git and put it into S3. Now, I want to run this jar in the post-build phase. The jar is located on S3 as well inside a public bucket, having a read-permission by all. I've began with a simple hello-world.jar
, but when I add this to to the code-build's configuration:
post_build:
commands:
- java -jar https://s3.amazonaws.com/*****/hello-world-test-1.0-SNAPSHOT.jar
I'm getting following error message in the post build phase:
Error while executing command: java -jar https://s3.amazonaws.com/*******/hello-world-test-1.0-SNAPSHOT.jar. Reason: exit status 1
What did I missed? Is it possible to run a jar which is located at remote server ?
Upvotes: 0
Views: 1486
Reputation: 31417
You could use one of the jar-related API mentioned in documentation
java JarRunner url [arguments]
So,
java JarRunner https://s3.amazonaws.com/*****/hello-world-test-1.0-SNAPSHOT.jar
Assuming your jar has Main-Class
defined in manifest file.
Upvotes: 2