Skip to content

Commit 0696a3c

Browse files
committed
Fix CLI build
1 parent 85b16e4 commit 0696a3c

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

java-components/cli/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,12 @@
108108
<dependency>
109109
<groupId>com.github.stefanbirkner</groupId>
110110
<artifactId>system-lambda</artifactId>
111+
<scope>test</scope>
111112
</dependency>
112113
<dependency>
113114
<groupId>org.wiremock</groupId>
114115
<artifactId>wiremock</artifactId>
116+
<scope>test</scope>
115117
</dependency>
116118
</dependencies>
117119
<build>

java-components/cli/src/main/docker/Dockerfile.all-in-one

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
FROM registry.access.redhat.com/ubi8/openjdk-21@sha256:5ab904e6262629fca79d6f65fa859bfa376405522d2f660bdbfaaae2742586f1 AS builder
22

3+
USER root
4+
RUN microdnf --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install -y git
5+
6+
USER 185
37
WORKDIR /work
48
COPY ./ .
59

6-
RUN mvn -V -B package -pl cli -am -DskipTests
10+
# Quarkus GitInfo causes injection failure if there isn't a git commit to use.
11+
RUN git init && \
12+
git config user.email "[email protected]" && \
13+
git config user.name "HACBS" && \
14+
git add cli && git commit -m "CLI" -a && \
15+
mvn -V -B package -pl cli -am -DskipTests
716

817
FROM registry.access.redhat.com/ubi8/openjdk-21-runtime@sha256:0a8cf41082f11f5bc56bd9438851e54593e17051df49592e953fb59376c7d539
918
WORKDIR /work/

java-components/driver/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
<artifactId>commons-text</artifactId>
4545
<version>${version.commons-text}</version>
4646
</dependency>
47+
<dependency>
48+
<groupId>io.quarkus</groupId>
49+
<artifactId>quarkus-info</artifactId>
50+
</dependency>
4751
<dependency>
4852
<groupId>org.jboss.pnc</groupId>
4953
<artifactId>pnc-api</artifactId>
@@ -62,10 +66,6 @@
6266
<version>${version.lombok}</version>
6367
<scope>provided</scope>
6468
</dependency>
65-
<dependency>
66-
<groupId>io.quarkus</groupId>
67-
<artifactId>quarkus-info</artifactId>
68-
</dependency>
6969
<dependency>
7070
<groupId>io.quarkus</groupId>
7171
<artifactId>quarkus-junit5</artifactId>

java-components/driver/src/main/java/com/redhat/hacbs/driver/util/Info.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.redhat.hacbs.driver.util;
22

3-
import jakarta.enterprise.context.RequestScoped;
3+
import jakarta.enterprise.context.ApplicationScoped;
44
import jakarta.inject.Inject;
55

66
import org.eclipse.microprofile.config.inject.ConfigProperty;
@@ -9,7 +9,7 @@
99
import io.quarkus.info.BuildInfo;
1010
import io.quarkus.info.GitInfo;
1111

12-
@RequestScoped
12+
@ApplicationScoped
1313
public class Info {
1414

1515
@ConfigProperty(name = "quarkus.application.name")

0 commit comments

Comments
 (0)