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

fix: move output of java imports into /src/main/java #240

Merged
merged 2 commits into from
Jun 18, 2020

Conversation

campionfellin
Copy link
Contributor

As discussed offline, we want java imports to fall under /src/main/java. This PR does 2 things:

  1. Fixes the outdir for java, so new file structure looks like this:
├── src
|  └── main
|     ├── java
|     |  ├── com
|     |  |  └── mycompany
|     |  └── imports
|     |     └── k8s
|     └── resources
|        └── imports
|           └── k8s

and you import with import imports.k8s

  1. Also simplifies the pom.xml, with no need for maven magic

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Signed-off-by: campionfellin <campionfellin@gmail.com>
Signed-off-by: campionfellin <campionfellin@gmail.com>
@campionfellin
Copy link
Contributor Author

campionfellin commented Jun 18, 2020

By the way, this does still create an empty imports/ directory at the base of the project. I'm not too concerned about it for now, but I can look into it a bit more.


It basically comes down to this:

https://github.com/awslabs/cdk8s/blob/89bb2c397d1d2745928a2f97969a145a50a3892f/packages/cdk8s-cli/bin/cmds/import.ts#L7-L8

https://github.com/awslabs/cdk8s/blob/89bb2c397d1d2745928a2f97969a145a50a3892f/packages/cdk8s-cli/bin/cmds/import.ts#L22

I guess we could probably have language-specific default outdirs

Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤩

@mergify
Copy link
Contributor

mergify bot commented Jun 18, 2020

Your pull request will be updated and merged automatically (do not update manually).

@mergify mergify bot merged commit 9445358 into cdk8s-team:master Jun 18, 2020
@campionfellin
Copy link
Contributor Author

Great how a 5 minute call saved like ~1 week of back-and-forths on PR 😎

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

Successfully merging this pull request may close these issues.

None yet

2 participants