Skip to content

Commit

Permalink
Document with latest spring-boot and native buildpacks (#568)
Browse files Browse the repository at this point in the history
* no need to use BP_NATIVE_IMAGE nor BP_MAVEN_BUILD_ARGUMENTS
  • Loading branch information
anthonydahanne authored Jun 16, 2023
1 parent 22a4ab2 commit 2c81082
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions java/maven/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ See [prerequisites](https://paketo.io/docs/howto/java/#prerequisites) of this sa
## Building

```bash
pack build applications/maven --env BP_JVM_VERSION=17
pack build applications/maven
```

Alternatively, if you want to attach a Maven `settings.xml` file to pass additional configuration to Maven.
Expand All @@ -18,7 +18,7 @@ The command above will use the sample `settings.xml` file from this repo. It may

```bash
cp ~/.m2/settings.xml java/maven/bindings/maven/settings.xml
pack build applications/maven --env BP_JVM_VERSION=17 --volume $(pwd)/bindings:/platform/bindings
pack build applications/maven --volume $(pwd)/bindings:/platform/bindings
```

## Running
Expand Down
10 changes: 10 additions & 0 deletions java/native-image/java-native-image-sample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### With `pack`

#### Spring Boot 3.0.x based app

```bash
pack build applications/native-image \
--builder paketobuildpacks/builder-jammy-tiny \
Expand All @@ -12,6 +14,14 @@ pack build applications/native-image \
--env BP_JVM_VERSION=17
```

#### Spring Boot 3.1.x and later based app

```bash
pack build applications/native-image \
--builder paketobuildpacks/builder-jammy-tiny \
--env BP_MAVEN_ACTIVE_PROFILES=native \
```

### With the Spring Boot Maven Plugin

```bash
Expand Down
2 changes: 1 addition & 1 deletion java/native-image/java-native-image-sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.5</version>
<version>3.1.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>io.paketo</groupId>
Expand Down

0 comments on commit 2c81082

Please sign in to comment.