Skip to content

Commit

Permalink
Yet another build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-rogers committed May 23, 2022
1 parent f417413 commit 4b8d802
Showing 1 changed file with 177 additions and 177 deletions.
354 changes: 177 additions & 177 deletions docker-tests/it-image/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,194 +34,194 @@ Reference: https://dzone.com/articles/build-docker-image-from-maven
-->

<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>
<modelVersion>4.0.0</modelVersion>

<packaging>pom</packaging>
<packaging>pom</packaging>

<artifactId>it-image</artifactId>
<name>it-image</name>
<description>Build the Docker image for integration tests.</description>
<artifactId>it-image</artifactId>
<name>it-image</name>
<description>Build the Docker image for integration tests.</description>

<parent>
<artifactId>druid</artifactId>
<groupId>org.apache.druid</groupId>
<version>0.24.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<parent>
<artifactId>druid</artifactId>
<groupId>org.apache.druid</groupId>
<version>0.24.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<properties>
<druid.image.name>${project.groupId}/test:${project.version}</druid.image.name>
<confluent-version>5.5.1</confluent-version>
<mariadb.version>2.7.3</mariadb.version>
<properties>
<druid.image.name>${project.groupId}/test:${project.version}</druid.image.name>
<confluent-version>5.5.1</confluent-version>
<mariadb.version>2.7.3</mariadb.version>
<mysql.image.version>5.7-debian</mysql.image.version>
<hadoop.integ.libs>"org.apache.hadoop:hadoop-client:${hadoop.compile.version}", "org.apache.hadoop:hadoop-azure:${hadoop.compile.version}"</hadoop.integ.libs>
<hadoop.s3.impl>org.apache.hadoop.fs.s3native.NativeS3FileSystem</hadoop.s3.impl>
</properties>

<repositories>
<!-- For the Kafka protobuf provider. -->
<repository>
<id>confluent</id>
<name>Confluent</name>
<url>https://packages.confluent.io/maven/</url>
</repository>
</repositories>

<profiles>
<profile>
<id>test-image</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>

<!-- Dependencies are inside the profile so they are ignored if not building
</properties>

<repositories>
<!-- For the Kafka protobuf provider. -->
<repository>
<id>confluent</id>
<name>Confluent</name>
<url>https://packages.confluent.io/maven/</url>
</repository>
</repositories>

<profiles>
<profile>
<id>test-image</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>

<!-- Dependencies are inside the profile so they are ignored if not building
the image. This is required for the "animal-sniffer" stage in the build
which builds everything except distribution, so our distribution dependency
fails if not scoped wihtin the profile. -->
<dependencies>
<!-- Dependencies placed in the image. -->
<dependency>
<groupId>org.apache.druid</groupId>
<artifactId>distribution</artifactId>
<version>${project.parent.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.druid</groupId>
<artifactId>it-tools</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>${mariadb.version}</version>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-protobuf-provider</artifactId>
<version>${confluent-version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<!-- Populate the target/docker directory with the MySQL
<dependencies>
<!-- Dependencies placed in the image. -->
<dependency>
<groupId>org.apache.druid</groupId>
<artifactId>distribution</artifactId>
<version>${project.parent.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.druid</groupId>
<artifactId>it-tools</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>${mariadb.version}</version>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-protobuf-provider</artifactId>
<version>${confluent-version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<!-- Populate the target/docker directory with the MySQL
and Kafka clients. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>copy</id>
<phase>prepare-package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/docker</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>${mariadb.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/docker</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>io.confluent</groupId>
<artifactId>kafka-protobuf-provider</artifactId>
<version>${confluent-version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/docker</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.apache.druid.extensions</groupId>
<artifactId>it-tools</artifactId>
<version>${project.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/docker</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>

<!-- Remove existing image from local repo -->
<execution>
<id>docker-clean</id>
<phase>clean</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>rmi</argument>
<argument>-f</argument> <!-- Prevent error if no image. -->
<argument>${druid.image.name}</argument>
</arguments>
</configuration>
</execution>

<!-- Create the docker image via a script which will also grab
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>copy</id>
<phase>prepare-package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/docker</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>${mariadb.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/docker</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>io.confluent</groupId>
<artifactId>kafka-protobuf-provider</artifactId>
<version>${confluent-version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/docker</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.apache.druid</groupId>
<artifactId>it-tools</artifactId>
<version>${project.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/docker</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>

<!-- Remove existing image from local repo -->
<execution>
<id>docker-clean</id>
<phase>clean</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<workingDirectory>${project.basedir}</workingDirectory>
<arguments>
<argument>rmi</argument>
<argument>-f</argument> <!-- Prevent error if no image. -->
<argument>${druid.image.name}</argument>
</arguments>
</configuration>
</execution>

<!-- Create the docker image via a script which will also grab
the distribution tarball. -->
<execution>
<id>build-image</id>
<phase>install</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<environmentVariables>
<DRUID_VERSION>${project.version}</DRUID_VERSION>
<MYSQL_VERSION>${mysql.version}</MYSQL_VERSION>
<MYSQL_IMAGE_VERSION>${mysql.image.version}</MYSQL_IMAGE_VERSION>
<MARIADB_VERSION>${mariadb.version}</MARIADB_VERSION>
<KAFKA_VERSION>${apache.kafka.version}</KAFKA_VERSION>
<CONFLUENT_VERSION>${confluent-version}</CONFLUENT_VERSION>
<ZK_VERSION>${zookeeper.version}</ZK_VERSION>
<HADOOP_VERSION>${hadoop.compile.version}</HADOOP_VERSION>
<MYSQL_DRIVER_CLASSNAME>com.mysql.jdbc.Driver</MYSQL_DRIVER_CLASSNAME>
<IMAGE_NAME>${druid.image.name}</IMAGE_NAME>
<TARGET_DIR>${project.build.directory}</TARGET_DIR>
<!-- Maven has no good way to get the root directory, so
<execution>
<id>build-image</id>
<phase>install</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<environmentVariables>
<DRUID_VERSION>${project.version}</DRUID_VERSION>
<MYSQL_VERSION>${mysql.version}</MYSQL_VERSION>
<MYSQL_IMAGE_VERSION>${mysql.image.version}</MYSQL_IMAGE_VERSION>
<MARIADB_VERSION>${mariadb.version}</MARIADB_VERSION>
<KAFKA_VERSION>${apache.kafka.version}</KAFKA_VERSION>
<CONFLUENT_VERSION>${confluent-version}</CONFLUENT_VERSION>
<ZK_VERSION>${zookeeper.version}</ZK_VERSION>
<HADOOP_VERSION>${hadoop.compile.version}</HADOOP_VERSION>
<MYSQL_DRIVER_CLASSNAME>com.mysql.jdbc.Driver</MYSQL_DRIVER_CLASSNAME>
<IMAGE_NAME>${druid.image.name}</IMAGE_NAME>
<TARGET_DIR>${project.build.directory}</TARGET_DIR>
<!-- Maven has no good way to get the root directory, so
this is as close as we can get. -->
<PARENT_DIR>${project.basedir}/../..</PARENT_DIR>
</environmentVariables>
<workingDirectory>${project.basedir}</workingDirectory>
<executable>bash</executable>
<arguments>
<argument>build-image.sh</argument>
</arguments>
</configuration>
</execution>

</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<PARENT_DIR>${project.basedir}/../..</PARENT_DIR>
</environmentVariables>
<workingDirectory>${project.basedir}</workingDirectory>
<executable>bash</executable>
<arguments>
<argument>build-image.sh</argument>
</arguments>
</configuration>
</execution>

</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 4b8d802

Please sign in to comment.