You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

将Nexus 3.7插件升级适配3.9版本时Rest接口404问题求助

Fixing Rundeck Plugin REST 404 in Nexus 3.9.0-01

Got it, let’s work through this issue step by step. You’re right that Sonatype removed the siesta prefix from their REST API in Nexus 3.9+, but that’s only one piece of the puzzle—here are the critical changes you need to make to get your custom plugin working:

1. Update API Annotations & Dependencies

Siesta was a custom framework Sonatype used for REST endpoints; Nexus 3.9+ switched to standard JAX-RS. So:

  • Replace Siesta-specific imports like org.sonatype.siesta.Resource with JAX-RS standard ones (e.g., javax.ws.rs.Path, javax.ws.rs.GET, javax.ws.rs.core.Application).
  • Remove any siesta-core or related Siesta dependencies from your build config (pom.xml or gradle script) and replace them with the JAX-RS API dependency matching Nexus 3.9.0-01’s version (usually javax.ws.rs:javax.ws.rs-api:2.1 or similar).

2. Adjust REST Resource Registration

Siesta handled resource registration automatically, but now you need to use JAX-RS’s standard application registration:

  • Create a new class that extends javax.ws.rs.core.Application, override the getClasses() method, and return your REST resource class(es) in the list.
  • Update your plugin’s descriptor (like nexus-plugin.xml) to register this Application class instead of the old Siesta Resource type.

3. Verify Endpoint Paths

Even after removing siesta from the URL, double-check your @Path annotations:

  • Nexus 3.9+ custom REST endpoints typically sit under the /service/rest/ base path. For example, if your old endpoint was /siesta/rundeck/options, your new @Path should be something like /rundeck/options (Nexus will automatically prepend /service/rest/ if registered correctly).
  • Use Nexus’s built-in API browser (usually at /service/rest/swagger-ui/) to check if your endpoint appears in the list—if it doesn’t, it’s not being registered properly.

4. Fix Permission & Access Controls

Siesta had its own permission annotations, which might not work anymore:

  • Replace any Siesta-specific permission annotations (like @RequiresPermissions) with Nexus’s current permission system (e.g., org.sonatype.nexus.security.authz.annotation.RequiresPermission).
  • Ensure the permissions your plugin uses are correctly defined and assigned in Nexus—sometimes a 404 can actually be a permission denial masquerading as a missing endpoint.

5. Debug with Nexus Logs

Turn on debug logging for Nexus’s REST layer to see what’s going wrong:

  • Enable debug logs for org.sonatype.nexus.rest in Nexus’s log configuration.
  • Check nexus.log for errors during plugin loading or endpoint registration—you might see messages about missing dependencies, failed registration, or invalid path mappings that explain the 404.

内容的提问来源于stack exchange,提问作者John Williams

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 09:15:26