From de61c1a1b387bd973597bb506d915cbc9846a832 Mon Sep 17 00:00:00 2001 From: Hiram Chirino Date: Tue, 3 Jun 2025 12:23:08 -0400 Subject: [PATCH 1/2] fix: resolve javadoc reference errors causing build failures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Fixed broken javadoc reference in StartException.java from Plugin.Builder#build() to PluginFactory.Builder#build() • Fixed broken javadoc reference in PluginFactory.java from Plugin#builder() to PluginFactory#builder() • Moved maven-javadoc-plugin configuration from release profile to main pluginManagement for consistent execution • Ensured javadoc generation runs during all builds, not just release builds This commit resolves Maven build failures that were occurring at release due to invalid javadoc cross-references. The references were pointing to non-existent Plugin.Builder class methods when they should have been pointing to the correct PluginFactory.Builder methods. Additionally, the javadoc plugin configuration was moved to ensure consistent documentation generation across all build profiles, improving the overall build reliability and documentation quality. Signed-off-by: Hiram Chirino --- .../roastedroot/proxywasm/jaxrs/it/App.java | 9 ++++ .../proxywasm/jaxrs/it/Resources.java | 7 +++ pom.xml | 48 +++++++++---------- .../roastedroot/proxywasm/PluginFactory.java | 2 +- .../roastedroot/proxywasm/StartException.java | 2 +- 5 files changed, 41 insertions(+), 27 deletions(-) diff --git a/integration-tests/tomee/src/main/java/io/roastedroot/proxywasm/jaxrs/it/App.java b/integration-tests/tomee/src/main/java/io/roastedroot/proxywasm/jaxrs/it/App.java index 6099331..0a22644 100644 --- a/integration-tests/tomee/src/main/java/io/roastedroot/proxywasm/jaxrs/it/App.java +++ b/integration-tests/tomee/src/main/java/io/roastedroot/proxywasm/jaxrs/it/App.java @@ -13,10 +13,19 @@ @ApplicationScoped public class App { + /** + * Default constructor. + */ + public App() { + // Default constructor for CDI + } + private static final Gson gson = new Gson(); /** * Configures the headerTests PluginFactory. + * + * @return a configured PluginFactory for header testing */ @Produces public PluginFactory headerTests() { diff --git a/integration-tests/tomee/src/main/java/io/roastedroot/proxywasm/jaxrs/it/Resources.java b/integration-tests/tomee/src/main/java/io/roastedroot/proxywasm/jaxrs/it/Resources.java index 2fe2f51..108dc52 100644 --- a/integration-tests/tomee/src/main/java/io/roastedroot/proxywasm/jaxrs/it/Resources.java +++ b/integration-tests/tomee/src/main/java/io/roastedroot/proxywasm/jaxrs/it/Resources.java @@ -11,6 +11,13 @@ @Path("/") public class Resources { + /** + * Default constructor. + */ + public Resources() { + // Default constructor for JAX-RS + } + /** * Endpoint for testing header manipulation with a shared Wasm plugin instance. * diff --git a/pom.xml b/pom.xml index 1079da1..e9f38f0 100644 --- a/pom.xml +++ b/pom.xml @@ -256,6 +256,29 @@ true + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + all + true + 11 + ${maven.compiler.release} + + **/internal/** + + + + + attach-javadocs + + jar + + + + @@ -317,31 +340,6 @@ release - - - - org.apache.maven.plugins - maven-javadoc-plugin - ${maven-javadoc-plugin.version} - - all - 11 - ${maven.compiler.release} - - **/internal/** - - - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins diff --git a/proxy-wasm-java-host/src/main/java/io/roastedroot/proxywasm/PluginFactory.java b/proxy-wasm-java-host/src/main/java/io/roastedroot/proxywasm/PluginFactory.java index 06ecfd3..fd241df 100644 --- a/proxy-wasm-java-host/src/main/java/io/roastedroot/proxywasm/PluginFactory.java +++ b/proxy-wasm-java-host/src/main/java/io/roastedroot/proxywasm/PluginFactory.java @@ -26,7 +26,7 @@ public interface PluginFactory { /** * Creates and returns a new {@link Plugin} instance. * Implementations are responsible for all necessary setup, including potentially - * loading the WASM module and configuring it using {@link Plugin#builder(com.dylibso.chicory.wasm.WasmModule)}. + * loading the WASM module and configuring it using {@link PluginFactory#builder(com.dylibso.chicory.wasm.WasmModule)}. * * @return A newly created {@link Plugin} instance. * @throws Exception If any error occurs during plugin creation (e.g., file loading, WASM instantiation, diff --git a/proxy-wasm-java-host/src/main/java/io/roastedroot/proxywasm/StartException.java b/proxy-wasm-java-host/src/main/java/io/roastedroot/proxywasm/StartException.java index 77b8315..e77761e 100644 --- a/proxy-wasm-java-host/src/main/java/io/roastedroot/proxywasm/StartException.java +++ b/proxy-wasm-java-host/src/main/java/io/roastedroot/proxywasm/StartException.java @@ -3,7 +3,7 @@ /** * Exception thrown when an error occurs during the initialization or startup phase of a Proxy-WASM plugin. * - *

This typically happens during the execution of the {@link Plugin.Builder#build()} method, + *

This typically happens during the execution of the {@link PluginFactory.Builder#build()} method, * encompassing issues such as WASM module instantiation failures, errors within the WASM * {@code _start} function, or failures during the initial {@code proxy_on_vm_start} or * {@code proxy_on_configure} calls within the plugin. From 5c535559d2129a5b95541cd773649d40be495e66 Mon Sep 17 00:00:00 2001 From: Hiram Chirino Date: Tue, 3 Jun 2025 13:21:45 -0400 Subject: [PATCH 2/2] Fix: we only need annotated mode for CDI. Signed-off-by: Hiram Chirino --- integration-tests/tomee/src/main/webapp/WEB-INF/beans.xml | 2 +- proxy-wasm-jaxrs/src/main/resources/META-INF/beans.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-tests/tomee/src/main/webapp/WEB-INF/beans.xml b/integration-tests/tomee/src/main/webapp/WEB-INF/beans.xml index bf9ad39..4b847c6 100644 --- a/integration-tests/tomee/src/main/webapp/WEB-INF/beans.xml +++ b/integration-tests/tomee/src/main/webapp/WEB-INF/beans.xml @@ -3,4 +3,4 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd" - version="4.0" bean-discovery-mode="all"/> \ No newline at end of file + version="4.0" bean-discovery-mode="annotated"/> \ No newline at end of file diff --git a/proxy-wasm-jaxrs/src/main/resources/META-INF/beans.xml b/proxy-wasm-jaxrs/src/main/resources/META-INF/beans.xml index e1dbba5..6cb702e 100644 --- a/proxy-wasm-jaxrs/src/main/resources/META-INF/beans.xml +++ b/proxy-wasm-jaxrs/src/main/resources/META-INF/beans.xml @@ -2,7 +2,7 @@ + version="4.0" bean-discovery-mode="annotated"> io.roastedroot.proxywasm.jaxrs.cdi.ServerAdaptor