Skip to content

Commit

Permalink
Fix CLI build
Browse files Browse the repository at this point in the history
  • Loading branch information
rnc committed Dec 4, 2024
1 parent 85b16e4 commit 0696a3c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
2 changes: 2 additions & 0 deletions java-components/cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,12 @@
<dependency>
<groupId>com.github.stefanbirkner</groupId>
<artifactId>system-lambda</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wiremock</groupId>
<artifactId>wiremock</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
Expand Down
11 changes: 10 additions & 1 deletion java-components/cli/src/main/docker/Dockerfile.all-in-one
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
FROM registry.access.redhat.com/ubi8/openjdk-21@sha256:5ab904e6262629fca79d6f65fa859bfa376405522d2f660bdbfaaae2742586f1 AS builder

USER root
RUN microdnf --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install -y git

USER 185
WORKDIR /work
COPY ./ .

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

FROM registry.access.redhat.com/ubi8/openjdk-21-runtime@sha256:0a8cf41082f11f5bc56bd9438851e54593e17051df49592e953fb59376c7d539
WORKDIR /work/
Expand Down
8 changes: 4 additions & 4 deletions java-components/driver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
<artifactId>commons-text</artifactId>
<version>${version.commons-text}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-info</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.pnc</groupId>
<artifactId>pnc-api</artifactId>
Expand All @@ -62,10 +66,6 @@
<version>${version.lombok}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-info</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.redhat.hacbs.driver.util;

import jakarta.enterprise.context.RequestScoped;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;

import org.eclipse.microprofile.config.inject.ConfigProperty;
Expand All @@ -9,7 +9,7 @@
import io.quarkus.info.BuildInfo;
import io.quarkus.info.GitInfo;

@RequestScoped
@ApplicationScoped
public class Info {

@ConfigProperty(name = "quarkus.application.name")
Expand Down

0 comments on commit 0696a3c

Please sign in to comment.