Class WebMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.google.adk.maven.WebMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
@Mojo(name="web",
requiresDependencyResolution=RUNTIME)
@Execute(phase=COMPILE)
public class WebMojo
extends org.apache.maven.plugin.AbstractMojo
Maven plugin goal that starts the Google ADK Web Server with user-provided agents.
This Mojo provides a convenient way for developers to test and interact with their agents through ADK Web UI. The plugin dynamically loads user-defined agents and makes them available through a browser interface.
Basic Usage
mvn google-adk:web -Dagents=com.example.MyAgentLoader
Configuration Parameters
- agents (required) - Full class path to AgentLoader implementation
- port (optional, default: 8000) - Server port
- host (optional, default: localhost) - Server host address
- hotReloading (optional, default: true) - Enable hot reloading for config-based agents
- registry (optional) - Full class path to custom ComponentRegistry subclass for injecting customized tools and agents
AgentLoader Implementation
The agents parameter should point to a class that implements AgentLoader. It can
reference either:
- A static field:
com.example.MyProvider.INSTANCE - A class with default constructor:
com.example.MyProvider
Web Interface
Once started, ADK Web UI is available at http://host:port where users can interact
with available agents.
- Author:
- Google ADK Team
-
Field Summary
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Constructor Details
-
WebMojo
public WebMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-