agent-gateway
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>com.openjiuwen</groupId>
<artifactId>agent-gateway</artifactId>
<version>0.1.2</version>
</dependency><?xml version="1.0" encoding="UTF-8"?>
<!--
agent-gateway — client-facing A2A governance + direct route-forwarding entry (FEAT-011).
Independently deployable Spring Boot unit (L2 §1.6). Downstream RDC and
agent-runtime are reached over HTTP/SSE via hexagonal ports (RdcRouteClient /
AgentRuntimeClient); the gateway MUST NOT depend on them as in-process
artifacts (decision D2 — no "must be co-process with RDC" coupling).
Since FEAT-048 the discovery port is backed by the unified registry SPI
(agent-registry-spi — the ONLY registry artifact on the compile classpath,
guarded by GatewayRegistrationPortBanArchTest). The active implementation
(agent-registry-rdc | agent-registry-nacos) is selected by the host
deployment via agent-registry.type; below it is test-scoped so module tests
boot the real auto-configuration.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.openjiuwen</groupId>
<artifactId>agent-solution-parent</artifactId>
<version>0.1.2</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>agent-gateway</artifactId>
<name>agent-gateway</name>
<description>Agent Gateway — A2A ingress governance + direct route forwarding (FEAT-011). Independently deployable; RDC and runtime reached over HTTP/SSE via ports.</description>
<url>https://gitcode.com/openJiuwen/agent-solution</url>
<licenses>
<license>
<name>Apache License 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>liubin</id>
<name>liubin</name>
<email>nickylba.liubin@huawei.com</email>
</developer>
</developers>
<scm>
<connection>scm:git:https://gitcode.com/openJiuwen/agent-solution.git</connection>
<developerConnection>scm:git:git@gitcode.com:openJiuwen/agent-solution.git</developerConnection>
<url>https://gitcode.com/openJiuwen/agent-solution</url>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<!-- Import this group's dependency platforms and preserve its transitive version overrides. -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>tools.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>${jackson-bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>${jackson-2-bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit-jupiter.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-bom</artifactId>
<version>${mockito.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.openjiuwen</groupId>
<artifactId>agent-runtime-java</artifactId>
<version>${agent-runtime-java.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-el</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-websocket</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio</artifactId>
<version>${okio.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okio</groupId>
<artifactId>okio-jvm</artifactId>
<version>${okio.version}</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>${byte-buddy.version}</version>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
<version>${byte-buddy.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- A2A facade: @RestController POST /a2a (L2 §1.1 / §4.9 GW-1). -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Jackson for opaque JSON-RPC body parsing (G3) and error-body
serialization. Spring Boot 4's web starter no longer pulls
jackson-databind transitively, so declare it explicitly. -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<!-- FEAT-013 forwarding SPI (FEAT-012 BUS path): ForwardingEnvelope,
AgentBusEventType, InvocationResponseStatus, ForwardingOutboxPort,
BrokerForwardingConsumerPort. SPI only — the heavy bus runtime/relay
(agent-bus-sdk/relay) is NOT pulled; downstream ports are stubbed in
tests and wired to the real SDK at deployment. -->
<dependency>
<groupId>com.openjiuwen</groupId>
<artifactId>event-bus-spi</artifactId>
<version>0.1.2</version>
</dependency>
<!-- FEAT-048 unified registry discovery SPI (AgentDiscoveryPort). SPI only:
the active implementation (agent-registry-rdc | agent-registry-nacos) is
chosen by the host deployment via agent-registry.type (test-scoped below
so module tests boot the real auto-configuration). -->
<dependency>
<groupId>com.openjiuwen</groupId>
<artifactId>agent-registry-spi</artifactId>
<version>0.1.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- Spring Boot 4 split WebMvcTest (and its MockMvc autoconfig) into a
standalone starter; spring-boot-starter-test no longer pulls it. -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-webmvc-test</artifactId>
<scope>test</scope>
</dependency>
<!-- FEAT-048 registry implementations: test scope only (module tests boot the
rdc auto-configuration, matchIfMissing=true). Production deployments pick
exactly one implementation artifact in the host launcher; nacos tests must
not set agent-registry.type=nacos (its ability gate contacts the server). -->
<dependency>
<groupId>com.openjiuwen</groupId>
<artifactId>agent-registry-rdc</artifactId>
<version>0.1.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.openjiuwen</groupId>
<artifactId>agent-registry-nacos</artifactId>
<version>0.1.2</version>
<scope>test</scope>
</dependency>
<!-- ArchUnit: gateway must not depend on the registration port (FEAT-048 §3)
nor on registry implementation internals. -->
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5</artifactId>
<version>${archunit.version}</version>
<scope>test</scope>
</dependency>
<!-- MockWebServer for the discovery-port wire-protocol smoke tests and
HttpAgentRuntimeClient tests (RDC-PORT / S2 slices). -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<version>${mockwebserver.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>agent-gateway-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<!-- Plain (library) jar with the 'lib' classifier so the launcher module can depend
on agent-gateway and see com.openjiuwen.gateway.* on its compile/runtime classpath
(the main artifact is the executable fat-jar whose BOOT-INF hides classes). The
main artifact stays the fat-jar for DIRECT-mode `java -jar`; this lib jar is
attached separately. Runtime config is excluded — the launcher owns deployment
config (registry-discovery-center convention). -->
<id>lib-jar</id>
<phase>package</phase>
<goals><goal>jar</goal></goals>
<configuration>
<classifier>lib</classifier>
<excludes>
<exclude>application*.yml</exclude>
<exclude>application*.properties</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/application*.yml</include>
<include>**/application*.yaml</include>
<include>**/application*.properties</include>
</includes>
</resource>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
<excludes>
<exclude>**/application*.yml</exclude>
<exclude>**/application*.yaml</exclude>
<exclude>**/application*.properties</exclude>
</excludes>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<release>${java.version}</release>
<parameters>true</parameters>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>${maven-install-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-dependency-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin.version}</version>
<configuration>
<propertiesEncoding>UTF-8</propertiesEncoding>
<delimiters>
<delimiter>@</delimiter>
</delimiters>
<useDefaultDelimiters>false</useDefaultDelimiters>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<executions>
<execution>
<id>repackage</id>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>