| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| --> |
| <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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| <modelVersion>4.0.0</modelVersion> |
| |
| <parent> |
| <artifactId>camel-ai-parent</artifactId> |
| <groupId>org.apache.camel</groupId> |
| <version>4.9.0-SNAPSHOT</version> |
| </parent> |
| |
| <artifactId>camel-torchserve</artifactId> |
| <packaging>jar</packaging> |
| <name>Camel :: AI :: TorchServe</name> |
| <description>Provide access to PyTorch TorchServe servers to run inference with PyTorch models remotely |
| </description> |
| |
| <properties> |
| <!-- TorchServe container is not available on these platforms --> |
| <skipITs.ppc64le>true</skipITs.ppc64le> |
| <skipITs.s390x>true</skipITs.s390x> |
| </properties> |
| |
| <dependencies> |
| <!-- camel --> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-support</artifactId> |
| </dependency> |
| |
| <!-- Dependencies required by the generated client --> |
| <!-- HTTP client: apache client --> |
| <dependency> |
| <groupId>org.apache.httpcomponents.client5</groupId> |
| <artifactId>httpclient5</artifactId> |
| <version>${httpclient-version}</version> |
| </dependency> |
| |
| <!-- JSON processing: jackson --> |
| <dependency> |
| <groupId>com.fasterxml.jackson.core</groupId> |
| <artifactId>jackson-core</artifactId> |
| <version>${jackson2-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>com.fasterxml.jackson.core</groupId> |
| <artifactId>jackson-annotations</artifactId> |
| <version>${jackson2-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>com.fasterxml.jackson.core</groupId> |
| <artifactId>jackson-databind</artifactId> |
| <version>${jackson2-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>com.fasterxml.jackson.jakarta.rs</groupId> |
| <artifactId>jackson-jakarta-rs-json-provider</artifactId> |
| <version>${jackson2-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>com.fasterxml.jackson.datatype</groupId> |
| <artifactId>jackson-datatype-jsr310</artifactId> |
| <version>${jackson2-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.openapitools</groupId> |
| <artifactId>jackson-databind-nullable</artifactId> |
| <version>${jackson-databind-nullable-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>jakarta.annotation</groupId> |
| <artifactId>jakarta.annotation-api</artifactId> |
| <version>${jakarta-annotation-api-version}</version> |
| </dependency> |
| |
| <!-- testing --> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-test-junit5</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.wiremock</groupId> |
| <artifactId>wiremock</artifactId> |
| <version>${wiremock-version}</version> |
| <scope>test</scope> |
| </dependency> |
| |
| <!-- test infra --> |
| <dependency> |
| <groupId>org.apache.camel</groupId> |
| <artifactId>camel-test-infra-torchserve</artifactId> |
| <version>${project.version}</version> |
| <type>test-jar</type> |
| <scope>test</scope> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.openapitools</groupId> |
| <artifactId>openapi-generator-maven-plugin</artifactId> |
| <version>${openapi-generator-version}</version> |
| <executions> |
| <execution> |
| <id>generate-inference</id> |
| <goals> |
| <goal>generate</goal> |
| </goals> |
| <configuration> |
| <inputSpec>${project.basedir}/src/main/resources/openapi/inference.json</inputSpec> |
| <generatorName>java</generatorName> |
| <apiPackage>org.apache.camel.component.torchserve.client.inference.api</apiPackage> |
| <modelPackage>org.apache.camel.component.torchserve.client.inference.model</modelPackage> |
| <invokerPackage>org.apache.camel.component.torchserve.client.inference.invoker |
| </invokerPackage> |
| <configOptions> |
| <useJakartaEe>true</useJakartaEe> |
| <library>apache-httpclient</library> |
| </configOptions> |
| <generateApiTests>false</generateApiTests> |
| <generateModelTests>false</generateModelTests> |
| <skipValidateSpec>true</skipValidateSpec> |
| </configuration> |
| </execution> |
| <execution> |
| <id>generate-management</id> |
| <goals> |
| <goal>generate</goal> |
| </goals> |
| <configuration> |
| <inputSpec>${project.basedir}/src/main/resources/openapi/management.json</inputSpec> |
| <generatorName>java</generatorName> |
| <apiPackage>org.apache.camel.component.torchserve.client.management.api</apiPackage> |
| <modelPackage>org.apache.camel.component.torchserve.client.management.model</modelPackage> |
| <invokerPackage>org.apache.camel.component.torchserve.client.management.invoker |
| </invokerPackage> |
| <configOptions> |
| <useJakartaEe>true</useJakartaEe> |
| <library>apache-httpclient</library> |
| </configOptions> |
| <generateModelTests>false</generateModelTests> |
| <generateApiTests>false</generateApiTests> |
| <skipValidateSpec>true</skipValidateSpec> |
| </configuration> |
| </execution> |
| <execution> |
| <id>generate-metrics</id> |
| <goals> |
| <goal>generate</goal> |
| </goals> |
| <configuration> |
| <inputSpec>${project.basedir}/src/main/resources/openapi/metrics.json</inputSpec> |
| <generatorName>java</generatorName> |
| <apiPackage>org.apache.camel.component.torchserve.client.metrics.api</apiPackage> |
| <modelPackage>org.apache.camel.component.torchserve.client.metrics.model</modelPackage> |
| <invokerPackage>org.apache.camel.component.torchserve.client.metrics.invoker |
| </invokerPackage> |
| <configOptions> |
| <useJakartaEe>true</useJakartaEe> |
| <library>apache-httpclient</library> |
| </configOptions> |
| <generateApiTests>false</generateApiTests> |
| <generateModelTests>false</generateModelTests> |
| <skipValidateSpec>true</skipValidateSpec> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>build-helper-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>add-source</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>add-source</goal> |
| </goals> |
| <configuration> |
| <sources> |
| <source>${project.build.directory}/generated-sources/openapi/src/main/java</source> |
| </sources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| |
| </project> |