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

Migrate to AdoptOpenJdk api V3 #15

Closed
nvuillam opened this issue Nov 9, 2020 · 15 comments · Fixed by #35
Closed

Migrate to AdoptOpenJdk api V3 #15

nvuillam opened this issue Nov 9, 2020 · 15 comments · Fixed by #35

Comments

@nvuillam
Copy link
Owner

nvuillam commented Nov 9, 2020

Ad discussed here with AdoptOpenJdk maintainers, it is strongly encouraged to migrate to their V3 api, as the V2 has been marked as deprecated

It would be nice to migrate njre to V3 :)

https://api.adoptopenjdk.net/

@raftario
Copy link
Collaborator

I don't really plan on working on njre anymore as I don't have any use for it and it's not particularly depended on. I'll still look at PRs and I'm open to transfering ownership to another maintainer.

@nvuillam
Copy link
Owner Author

As my repos seems to be the ones the most using njre, it would make sense ... :)

https://github.com/raftario/njre/network/dependents?package_id=UGFja2FnZS00MDgxNjc1MDg%3D

I can own & maintain njre if you wish so !

@raftario
Copy link
Collaborator

Sounds good to me ! I'll transfer ownership.

@nvuillam
Copy link
Owner Author

Ok, I'll take good care of it :)

@nvuillam
Copy link
Owner Author

@raftario I may have some free time these next times, I'm ready for transfer when u are :)
My plans :

  • Migrate to AdoptOpenJdk V3 API
  • Apply linters on project
  • Put all doc directly in README

@raftario
Copy link
Collaborator

I already added you as a contributor on npm and initiated the GitHub repo transfer 👍

@nvuillam
Copy link
Owner Author

Didn't see the acceptance mail in the middle of all github notifs mails :)
Just accepted it, thanks !

@thehale
Copy link

thehale commented Nov 9, 2021

@nvuillam What ended up being the status of this issue? I just tried to use njre for the first time and it seems like it can no longer download a JDK since the URLs it tries to pull the binaries from result in a server timeout...

@nvuillam
Copy link
Owner Author

nvuillam commented Nov 9, 2021

@jhale1805 i've been lazy... while it worked i did nothing, are u sure V2 does not work anymore ?
If yes we have to upgrade to v3.... maybe u'd like to contribute ? :)

@thehale
Copy link

thehale commented Nov 11, 2021

@nvuillam I tried both examples in the docs and each one gave a JSON parsing error that resulted from the response being the HTML of a server timeout page.

That said, while I've been programming for several years, I'm still new to JavaScript, so I could also totally believe that I did something wrong, even though I copy and pasted the exact code from the examples.

As for contributing, I'll definitely take a look. I'm currently a student so I don't know how much time I'll have. I also found an alternate way to accomplish my immediate goal, but this package does seem valuable to other projects I'd like to tackle in the future so I'll see what I can figure out.

@thehale
Copy link

thehale commented Nov 11, 2021

Reading through their migration guide, it looks like it might be as simple as changing the base url for the request...

Update: that migration guide is for switching to eclipse maintained builds, which doesn't include as wide of a variety of jdk/jre builds

However, the v3 API seems pretty straightforward, and it looks like binaries can now be requested directly instead of requiring an intermediary request for the path to the binary.

In all, we'd have to fill out the options object a little more and add some enhanced validation, but it definitely looks doable with a few days worth of work.

@nvuillam
Copy link
Owner Author

That seems to be a great little student project, I'll write a note for your teachers, they'll surely appreciate that you already contribute to open source :)

@NLueg
Copy link

NLueg commented Feb 11, 2022

I'm not sure if relevant for you, but I published an own package (like a decade ago) based on njre but with some more features.
I recently migrated to AdoptOpenJdk V3 and also included TypeScript for using the package.
You can find it here: https://github.com/NLueg/node-java-connector

@nvuillam
Copy link
Owner Author

I inherited njre maintenance after using it for https://github.com/nvuillam/node-java-caller ... which looks quite similar to node-java-connector ^^

mheiges pushed a commit to mheiges/njre that referenced this issue Sep 15, 2023
nvuillam pushed a commit that referenced this issue Sep 19, 2023
* migrate to adoptium API v3; fixes #15

* adjust whitespace

* use adoptopenjdk API by default

* fix vendor param description

* linting

Will help to fix nvuillam/npm-groovy-lint#288

---------

Co-authored-by: Mark Heiges <mark.heiges@semanticbits.com>
@nvuillam
Copy link
Owner Author

@mheiges v1.0.0 has been released with your updates, and I also upgrade many dependencies :)

Thanks again for the 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 a pull request may close this issue.

4 participants