Skip to content

Commit

Permalink
test(kubernetes-client): allow incomplete model classpath
Browse files Browse the repository at this point in the history
Prevent Quarkus from adding --link-at-build-time GraalVM flag

Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa committed Nov 13, 2023
1 parent c59ee9a commit 26713db
Show file tree
Hide file tree
Showing 8 changed files with 191 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>io.quarkus</groupId>
<artifactId>quarkus-integration-test-kubernetes-client-hack-extension-parent</artifactId>
<version>999-SNAPSHOT</version>
</parent>

<artifactId>quarkus-integration-test-kubernetes-client-hack-extension-deployment</artifactId>
<name>Quarkus - Integration Tests - Kubernetes Client Hack Extension - Deployment</name>

<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-core-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-integration-test-kubernetes-client-hack-extension</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-extension-processor</artifactId>
<version>${project.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>templating-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<id>filtering-java-templates</id>
<goals>
<goal>filter-sources</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package io.quarkus.kubernetes.client.deployment;

import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.nativeimage.NativeImageAllowIncompleteClasspathBuildItem;

public class NativeOverrides {

@BuildStep
NativeImageAllowIncompleteClasspathBuildItem incompleteModel() {
return new NativeImageAllowIncompleteClasspathBuildItem("quarkus-kubernetes-client");
}
}
21 changes: 21 additions & 0 deletions integration-tests/kubernetes-client-hack-extension/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<artifactId>quarkus-extensions-parent</artifactId>
<groupId>io.quarkus</groupId>
<version>999-SNAPSHOT</version>
<relativePath>../../extensions/pom.xml</relativePath>
</parent>

<artifactId>quarkus-integration-test-kubernetes-client-hack-extension-parent</artifactId>
<name>Quarkus - Integration Tests - Kubernetes Client Hack Extension</name>
<packaging>pom</packaging>
<modules>
<module>deployment</module>
<module>runtime</module>
</modules>
</project>
48 changes: 48 additions & 0 deletions integration-tests/kubernetes-client-hack-extension/runtime/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>io.quarkus</groupId>
<artifactId>quarkus-integration-test-kubernetes-client-hack-extension-parent</artifactId>
<version>999-SNAPSHOT</version>
</parent>

<artifactId>quarkus-integration-test-kubernetes-client-hack-extension</artifactId>
<name>Quarkus - Integration Tests - Kubernetes Client Hack Extension - Runtime</name>

<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-core</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-extension-maven-plugin</artifactId>
<version>${project.version}</version>
<configuration>
<deployment>${project.groupId}:${project.artifactId}-deployment:${project.version}</deployment>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-extension-processor</artifactId>
<version>${project.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
artifact: ${project.groupId}:${project.artifactId}:${project.version}
name: "Kubernetes Client Hack Extension"
metadata:
keywords:
- "kubernetes-client"
guide: "https://quarkus.io/guides/kubernetes-client"
categories:
- "cloud"
status: "test"
config:
18 changes: 18 additions & 0 deletions integration-tests/kubernetes-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-kubernetes-config</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-integration-test-kubernetes-client-hack-extension</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-openshift-client</artifactId>
Expand Down Expand Up @@ -85,6 +90,19 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-integration-test-kubernetes-client-hack-extension-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-openshift-client-deployment</artifactId>
Expand Down
22 changes: 22 additions & 0 deletions integration-tests/openshift-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@
<artifactId>quarkus-integration-test-openshift-client</artifactId>
<name>Quarkus - Integration Tests - OpenShift Client</name>

<properties>
<quarkus.kubernetes-client.allow-incomplete-model>true</quarkus.kubernetes-client.allow-incomplete-model>
</properties>

<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-jackson</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-integration-test-kubernetes-client-hack-extension</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-openshift-client</artifactId>
Expand Down Expand Up @@ -61,6 +70,19 @@
</dependency>

<!-- Minimal test dependencies to *-deployment artifacts for consistent build order -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-integration-test-kubernetes-client-hack-extension-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-openshift-client-deployment</artifactId>
Expand Down
1 change: 1 addition & 0 deletions integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@
<module>amazon-lambda-http-resteasy</module>
<module>amazon-lambda-http-resteasy-reactive</module>
<module>container-image</module>
<module>kubernetes-client-hack-extension</module>
<module>kubernetes</module>
<module>kubernetes-client</module>
<module>kubernetes-client-devservices</module>
Expand Down

0 comments on commit 26713db

Please sign in to comment.