Skip to content

Commit

Permalink
feat : changes to build native image
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli committed Nov 21, 2023
1 parent 3fa7088 commit e06d398
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/kafka-sample-spring-boot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,22 @@ jobs:
run:
working-directory: "kafka-sample/spring-boot"
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/[email protected]
- uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'temurin'
java-version: '17'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: 'maven'
native-image-job-reports: 'true'

- name: Printing versions
run: |
echo "GRAALVM_HOME: $GRAALVM_HOME"
echo "JAVA_HOME: $JAVA_HOME"
java --version
native-image --version
- name: Build with Maven
run: ./mvnw -B verify --file pom.xml
run: ./mvnw -Pnative -B verify spring-boot:build-image --file pom.xml
16 changes: 5 additions & 11 deletions kafka-sample/spring-boot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<description>Demo project for Spring Boot</description>

<properties>
<java.version>21</java.version>
<java.version>17</java.version>
<spotless.version>2.40.0</spotless.version>
<springdoc-openapi.version>2.2.0</springdoc-openapi.version>
</properties>
Expand All @@ -39,11 +39,6 @@
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
Expand Down Expand Up @@ -75,15 +70,14 @@
<artifactId>kafka</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
Expand Down

0 comments on commit e06d398

Please sign in to comment.