-
Notifications
You must be signed in to change notification settings - Fork 87
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
migration to Nexus 3.71 API #158
Conversation
ca61a96
to
078c2f9
Compare
We re-generate the JSON on demand if it does not exist. But if the requested package does not have any artifact, we should return 404 and not an empty response.
d9a7162
to
a5eba0a
Compare
ping @bhamail Could you have a look at this (or name someone who can)? I know this is quite a breaking change, but I guess NXRM 3.71 is breaking for almost any plugin. We might want to add a migration utility 🤔 |
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.
I am NOT a Nexus Repository expert, so please test these changes thoroughly to make sure they work well for you.
It is really great to see this contribution!!! There are lot's of community repo format plugins that could benefit from this sort of update to the new DB hotness. Thanks for diving into the deep end!
Another thought: It might be worth adding some documentation that states the current version of the Composer plugin ONLY works with NXRM v3.71+ or whatever. That way, people on older versions hopefully don't upgrade themselves into a bad place by accident. (There are likely to be a lot of upgrade challenges with the DB changes, and anything we can do to minimize that sort of pain is good(tm) ).
...mposer-it/src/test/java/org/sonatype/nexus/repository/composer/internal/ComposerProxyIT.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/sonatype/nexus/repository/composer/internal/browse/ComposerBrowseModule.java
Outdated
Show resolved
Hide resolved
...omposer/src/main/java/org/sonatype/nexus/repository/composer/store/ComposerAssetBlobDAO.java
Outdated
Show resolved
Hide resolved
<configuration> | ||
<rules> | ||
<!-- | ||
Ensure use of Java 8, as required by NXRM |
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.
Not certain about the Java rules going forward, but I think maybe Java 8 actually stops being supported after NXRM 3.70. See "Java" https://help.sonatype.com/en/sonatype-nexus-repository-system-requirements.html
This gets messy fast.
Maybe add a link to the docs in the comment. At some point, we probably want to PREVENT the use of Java 8...
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.
This is just the JDK version required to build the plugin, not necessarily the same as the runtime requirement.
I’d be happy to raise this to 11 or 17. We could also clean up quite a few lines then.
2675bfc
to
5e8a804
Compare
* add Java 17 * add notice for NXRM 3.71+ * update plugin version in examples * update dead or outdated links
Anyway thanks very much for your review.
Updated the README, including a notice on NXRM compatibility, added Java 17 and updated some broken links. |
Thanks for the new version, it allowed me to update my Nexus |
f4834ad
to
3224e70
Compare
Hmm, I thought I fixed the integration tests. Unfortunately the tests are passing locally, but not in CI.
Update: Got it! Had to add the <dependency>
<groupId>org.sonatype.nexus.testsuite</groupId>
<artifactId>nexus-repository-testsupport</artifactId>
<version>${nxrm-version}</version>
<classifier>features</classifier>
<type>xml</type>
<scope>test</scope>
</dependency> The hint was
in nexus-repository-composer-it/target/it-data/1/nexus3/log/nexus.log and corresponding some artifact resolving errors. |
Update the plugin structures and formats to latest Nexus 3.71 changes, i.e. drop OrientDB support, migrate to fluent API.
TODO:
Run-tested all 3 repository types in a local Nexus 3.71.0-06 container (Java 17, H2)
This is based on #154. Resolves #157