sdk
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>org.ovirt.engine.api</groupId>
<artifactId>sdk</artifactId>
<version>4.6.0</version>
</dependency><?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2016 Red Hat, Inc.
Licensed 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>
<groupId>org.ovirt.engine.api</groupId>
<artifactId>java-sdk-parent</artifactId>
<version>4.6.0</version>
</parent>
<artifactId>sdk</artifactId>
<packaging>jar</packaging>
<name>oVirt Java SDK</name>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Make sure to always use Java 11: -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<!-- Copy model.jar to the target directory, so that it can be
later loaded by the generator: -->
<execution>
<id>copy-model</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.ovirt.engine.api</groupId>
<artifactId>model</artifactId>
<version>${model.version}</version>
<type>jar</type>
<classifier>sources</classifier>
<outputDirectory>${project.basedir}/target</outputDirectory>
<destFileName>model.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<!-- Copy needed metamodel sources, so that the SDK won't
depend on the metamodel: -->
<execution>
<id>copy-metamodel</id>
<phase>generate-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.ovirt.engine.api</groupId>
<artifactId>metamodel-runtime</artifactId>
<version>${metamodel.version}</version>
<type>jar</type>
<classifier>sources</classifier>
<outputDirectory>${project.basedir}/target/generated-sources</outputDirectory>
<includes>**/xml/*.java,**/util/*.java</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<!-- Run the code generator: -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>generate-code</id>
<phase>generate-sources</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>org.ovirt.api.metamodel.tool.Main</mainClass>
<arguments>
<argument>org.ovirt.sdk.java.Tool</argument>
<argument>--model</argument>
<argument>${project.basedir}/target/model.jar</argument>
<argument>--out</argument>
<argument>${project.basedir}/target/generated-sources</argument>
<argument>--resources</argument>
<argument>${project.basedir}/src/main/resources</argument>
</arguments>
<includePluginDependencies>true</includePluginDependencies>
<includeProjectDependencies>false</includeProjectDependencies>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>java-sdk-generator</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</plugin>
<!-- Add the generated Java code directory to the source path: -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<id>add-generated-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/target/generated-sources</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Attach the sources: -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>