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

Java support #360

Merged
merged 14 commits into from
Oct 5, 2020
Merged

Java support #360

merged 14 commits into from
Oct 5, 2020

Conversation

jsteinich
Copy link
Collaborator

@jsteinich jsteinich commented Sep 7, 2020

Closes #197

Adds:

  • Core library output to Java
  • Ability to generate modules/providers in Java
  • Java app template with maven
  • Basic documentation
  • Simple examples
  • Setup for release

Setting up the maven keys and profile is probably best left to the internal team.

@jsteinich
Copy link
Collaborator Author

There might be some instability in running the examples integration task. I'm not sure if https://github.com/hashicorp/terraform-cdk/pull/360/checks?check_run_id=1096559302 was a one off, or if we need to bootstrap the maven repo or have each example use its own cache.

@jsteinich jsteinich marked this pull request as ready for review September 11, 2020 12:57
@jsteinich
Copy link
Collaborator Author

There might be some instability in running the examples integration task

Looks like that is the case. I'll have to think about this some more. Once https://issues.apache.org/jira/browse/MRESOLVER-131 is finished, this could get easier.

@jsteinich
Copy link
Collaborator Author

I decided to just not run the java examples in parallel for now.
Looks like jsii did make a change recently to isolate local maven repos, so we could actually modify the examples to run isolated, though it would complicate the run command over what a user is likely to use.
(mvn -e -q --settings user.xml compile exec:java vs mvn -e -q compile exec:java)

Copy link
Contributor

@skorfmann skorfmann left a comment

Choose a reason for hiding this comment

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

Besides from Maven credentials for the Github action, is there anything else missing to get this merged @jsteinich ?

@jsteinich
Copy link
Collaborator Author

Besides from Maven credentials for the Github action, is there anything else missing to get this merged @jsteinich ?

I think that's all we need.

@skorfmann
Copy link
Contributor

Besides from Maven credentials for the Github action, is there anything else missing to get this merged @jsteinich ?

I think that's all we need.

@anubhavmishra could you create these credentials and add them as secrets for actions?

@anubhavmishra
Copy link
Member

I started working on getting an account to publish to Maven Central. It requires a bunch of changes to allow Sonatype to verify our account. It does require work so I will get back to you on this one.

https://github.com/aws/jsii-release#maven

@skorfmann
Copy link
Contributor

We'll look into github package registry as a temporary way to publish the packages

@jsteinich
Copy link
Collaborator Author

We'll look into github package registry as a temporary way to publish the packages

Just looked into it some. Seems like they still don't support anonymous package download which will make it quite annoying to use.

Would publishing the artifacts not under hashicorp make the maven central setup easier? Or you using jcenter or some other repo?

@skorfmann
Copy link
Contributor

Just looked into it some. Seems like they still don't support anonymous package download which will make it quite annoying to use.

Oh, yeah - that's bad https://docs.github.com/en/free-pro-team@latest/packages/publishing-and-managing-packages/installing-a-package

Would publishing the artifacts not under hashicorp make the maven central setup easier?

What options do you see there?

@jsteinich
Copy link
Collaborator Author

Would publishing the artifacts not under hashicorp make the maven central setup easier?

What options do you see there?

I haven't personally published to maven central, but the instructions seem pretty simple so I'm wondering if existing hashicorp accounts are complicating things. Maybe something like org.cdktf or org.terraformcdk that is managed outside hashicorp.

@jsteinich
Copy link
Collaborator Author

jsteinich commented Oct 5, 2020

I updated the release workflow to publish to GitHub packages rather than maven central and left a note about it in the Java getting started guide.
I'm also going to try working on getting the functionality into jsii-release to make is easier for the pre-built providers (though it seems possible to do in projen without that).

@skorfmann
Copy link
Contributor

Awesome stuff! Thank you so much for contributing this 🚀

@skorfmann skorfmann merged commit 16b9964 into hashicorp:master Oct 5, 2020
This was referenced Oct 5, 2020
@skorfmann skorfmann mentioned this pull request Nov 5, 2020
@github-actions
Copy link
Contributor

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Java
3 participants