| <?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> |
| <groupId>org.apache.hive</groupId> |
| <artifactId>hive</artifactId> |
| <version>4.3.0-SNAPSHOT</version> |
| <relativePath>../../../pom.xml</relativePath> |
| </parent> |
| <artifactId>hive-kubernetes-operator</artifactId> |
| <packaging>jar</packaging> |
| <name>Hive Kubernetes Operator</name> |
| <description>Kubernetes operator for managing Apache Hive clusters</description> |
| <properties> |
| <hive.path.to.root>../../..</hive.path.to.root> |
| <!-- The operator is a standalone shaded JAR and requires SLF4J 2.x |
| for the log4j-slf4j2-impl binding. This overrides the parent's |
| slf4j.version (1.7.x) intentionally. --> |
| <slf4j2.version>2.0.16</slf4j2.version> |
| </properties> |
| <dependencies> |
| <dependency> |
| <groupId>io.javaoperatorsdk</groupId> |
| <artifactId>operator-framework</artifactId> |
| <version>${josdk.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>io.javaoperatorsdk</groupId> |
| <artifactId>operator-framework-core</artifactId> |
| <version>${josdk.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>io.fabric8</groupId> |
| <artifactId>kubernetes-client</artifactId> |
| <version>${fabric8.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>io.fabric8</groupId> |
| <artifactId>kubernetes-httpclient-vertx</artifactId> |
| <version>${fabric8.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>io.github.java-diff-utils</groupId> |
| <artifactId>java-diff-utils</artifactId> |
| <version>4.17</version> |
| </dependency> |
| <dependency> |
| <groupId>io.vertx</groupId> |
| <artifactId>vertx-web-common</artifactId> |
| <version>4.5.27</version> |
| </dependency> |
| <!-- fabric8 CRD generator annotation processor --> |
| <dependency> |
| <groupId>io.fabric8</groupId> |
| <artifactId>crd-generator-apt</artifactId> |
| <version>${fabric8.version}</version> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.curator</groupId> |
| <artifactId>curator-framework</artifactId> |
| <version>${curator.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.slf4j</groupId> |
| <artifactId>slf4j-api</artifactId> |
| <version>${slf4j2.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-slf4j2-impl</artifactId> |
| <version>${log4j2.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.logging.log4j</groupId> |
| <artifactId>log4j-core</artifactId> |
| <version>${log4j2.version}</version> |
| </dependency> |
| </dependencies> |
| <build> |
| <sourceDirectory>src/java</sourceDirectory> |
| <resources> |
| <resource> |
| <directory>src/resources</directory> |
| </resource> |
| </resources> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-compiler-plugin</artifactId> |
| <configuration> |
| <proc>full</proc> |
| <annotationProcessorPaths> |
| <path> |
| <groupId>io.fabric8</groupId> |
| <artifactId>crd-generator-apt</artifactId> |
| <version>${fabric8.version}</version> |
| </path> |
| </annotationProcessorPaths> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-shade-plugin</artifactId> |
| <version>${maven.shade.plugin.version}</version> |
| <executions> |
| <execution> |
| <phase>package</phase> |
| <goals> |
| <goal>shade</goal> |
| </goals> |
| <configuration> |
| <createDependencyReducedPom>false</createDependencyReducedPom> |
| <shadedArtifactAttached>true</shadedArtifactAttached> |
| <shadedClassifierName>shaded</shadedClassifierName> |
| <transformers> |
| <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
| <mainClass>org.apache.hive.kubernetes.operator.HiveOperatorMain</mainClass> |
| </transformer> |
| <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> |
| </transformers> |
| <filters> |
| <filter> |
| <artifact>*:*</artifact> |
| <excludes> |
| <exclude>META-INF/*.SF</exclude> |
| <exclude>META-INF/*.DSA</exclude> |
| <exclude>META-INF/*.RSA</exclude> |
| </excludes> |
| </filter> |
| </filters> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <!-- Exclude generated CRD from RAT license check --> |
| <plugin> |
| <groupId>org.apache.rat</groupId> |
| <artifactId>apache-rat-plugin</artifactId> |
| <configuration> |
| <excludes> |
| <exclude>helm/hive-operator/crds/**</exclude> |
| </excludes> |
| </configuration> |
| </plugin> |
| <!-- Copy generated CRD YAML to helm/hive-operator/crds for Helm --> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>copy-crd-to-helm-crds</id> |
| <phase>compile</phase> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <configuration> |
| <target> |
| <mkdir dir="${basedir}/helm/hive-operator/crds"/> |
| <copy todir="${basedir}/helm/hive-operator/crds" overwrite="true"> |
| <fileset dir="${project.build.outputDirectory}/META-INF/fabric8"> |
| <include name="*-v1.yml"/> |
| </fileset> |
| </copy> |
| <replaceregexp file="${basedir}/helm/hive-operator/Chart.yaml" match="^version:.*$" replace="version: "${project.version}"" byline="true"/> |
| <replaceregexp file="${basedir}/helm/hive-operator/Chart.yaml" match="^appVersion:.*$" replace="appVersion: "${project.version}"" byline="true"/> |
| </target> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| <profiles> |
| <profile> |
| <id>kubernetes</id> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>docker-build</id> |
| <phase>package</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <executable>docker</executable> |
| <arguments> |
| <argument>build</argument> |
| <argument>--no-cache</argument> |
| <argument>-t</argument> |
| <argument>apache/hive:operator-${project.version}</argument> |
| <argument>.</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| </project> |