-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Add Java Example #149
Add Java Example #149
Conversation
Add a Java "Hello, world" example. * Consume jsii and aws-cdk java via maven * Configure cdk.json to work idiomatically with the toolkit * Reorganize examples/ directory to cdk-examples-java and cdk-examples-typescript
examples/cdk-examples-java/cdk.json
Outdated
@@ -0,0 +1,3 @@ | |||
{ | |||
"app": "/bin/bash run-program.sh" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would very much prefer delegating to java -jar ${jar built by mvn package}
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, refactored the POM to produce a self-contained executable JAR and then we can run it with java -jar
🤗
<target>1.8</target> | ||
</configuration> | ||
</plugin> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would add the necessary things to produce a manifest
that mentions the mainClass
.
* Use a generated pom.xml to plug-in version numbers * Emit a local maven repo directory structure to `maven-repo` * Fix bundle-beta.sh to produce repo/maven from maven-repo dirs * Update jsii to 5a79bce * Align all versions to v0.7.2-beta
I was just not super interested in hand-writing the PoJo and Builder for the props class. Any recommendation? |
You're doing Java, so go ahead and use an IDE that writes those for you? |
Add a Java CDK app example to demonstrate how CDK can be used from Java. The example demonstrates: * Configuration of `cdk.json` to allow idiomatic use of the toolkit (`cdk synth`, `cdk deploy`). * How to write a CDK app, stack, etc. * How to write a reusable construct (`SinkQueue`) along with unit tests See README file for more details. Misc: * Reorganize `examples/` directory to `cdk-examples-java` and `cdk-examples-typescript`
Add a Java "Hello, world" example.
By submitting this pull request, I confirm that my contribution is made under
the terms of the beta license.