Skip to content

Commit

Permalink
Move java-hello-world-maven to clouds/native-oci-cloud-shell
Browse files Browse the repository at this point in the history
  • Loading branch information
olyagpl committed Dec 18, 2024
1 parent d87389b commit f9be0d9
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
name: java-hello-world-maven
name: clouds/native-oci-cloud-shell
on:
push:
paths:
- 'java-hello-world-maven/**'
- '.github/workflows/java-hello-world-maven.yml'
# pull_request: (requires EE, which is unavailable in PRs)
- 'clouds/native-oci-cloud-shell/**'
- '.github/workflows/clouds-native-oci-cloud-shell.yml'
schedule:
- cron: "0 0 1 * *" # run every month
workflow_dispatch:
permissions:
contents: read
jobs:
run:
name: Run 'java-hello-world-maven'
name: Run 'clouds/native-oci-cloud-shell'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
java-version: '21.0.2'
java-version: '21'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: 'maven'
native-image-job-reports: 'true'
- name: Run 'java-hello-world-maven'
- name: Run 'clouds/native-oci-cloud-shell'
run: |
cd java-hello-world-maven
cd clouds/native-oci-cloud-shell
mvn --no-transfer-progress clean package
java -jar target/my-app-1.0-SNAPSHOT.jar
mvn --no-transfer-progress clean -Pnative -DskipTests package
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Oracle GraalVM is available for use on Oracle Cloud Infrastructure (OCI) at no a

## What is Cloud Shell?

[Cloud Shell](https://www.oracle.com/devops/cloud-shell/) is a free-to-use browser-based terminal accessible from the Oracle Cloud Console. It provides access to a Linux shell with preinstalled developer tools and a preauthenticated OCI CLI. You can use the shell to interact with OCI resources, follow labs and tutorials, and quickly run utility commands.
[Cloud Shell](https://www.oracle.com/devops/cloud-shell/) is a free-to-use browser-based terminal accessible from the Oracle Cloud Console. It provides access to a Linux shell with preinstalled developer tools and a pre-authenticated OCI CLI. You can use the shell to interact with OCI resources, follow labs and tutorials, and quickly run utility commands.

Oracle GraalVM for JDK 17 (with Native Image) is preinstalled in Cloud Shell, so you don’t have to install and configure a development machine to get started.

Expand Down Expand Up @@ -50,7 +50,6 @@ Oracle GraalVM for JDK 17 (with Native Image) is preinstalled in Cloud Shell, so

This step is optional - [Check software version and environment variables](../_common/README-check-version-env-vars.md)


## Step 4: Set up your project, build and run as a JAR

1. Git clone this example.
Expand All @@ -69,7 +68,6 @@ This step is optional - [Check software version and environment variables](../_c
git pull --depth=1 origin master
cd java-hello-world-maven
```

2. Build a JAR file for the example app.
Expand All @@ -78,7 +76,7 @@ This step is optional - [Check software version and environment variables](../_c
mvn clean package
```

3. Run the JAR using:
3. Run the JAR:

```shell
java -jar target/my-app-1.0-SNAPSHOT.jar
Expand Down Expand Up @@ -148,3 +146,5 @@ You will notice the `Quick Build` mode reduces the time required to generate a n
```text
Hello World!
```

Learn how to start using Oracle GraalVM with other OCI services at [docs.oracle.com](https://docs.oracle.com/en/graalvm/jdk/23/docs/getting-started/oci/).
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
<native.maven.plugin.version>0.9.28</native.maven.plugin.version>
<native.maven.plugin.version>0.10.3</native.maven.plugin.version>
</properties>

<dependencies>
Expand All @@ -43,8 +43,7 @@
</manifest>
</archive>
</configuration>
</plugin>

</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down Expand Up @@ -78,13 +77,12 @@
<configuration>
<imageName>my-app</imageName>
<verbose>true</verbose>
<!-- For Quick Build (22.1+) -->
<!-- <quickBuild>true</quickBuild> -->
<buildArgs>
<buildArg>-H:+ReportExceptionStackTraces</buildArg>
<!-- For mostly static native image (only on Linux AMD64 systems) -->
<!-- <buildArg>-H:+StaticExecutableWithDynamicLibC</buildArg> -->
<!-- To generate the Native Image build output JSON (22.3+) -->
<!-- To generate the Native Image build output JSON -->
<!-- <buildArg>-H:BuildOutputJSONFile=build.json</buildArg> -->
</buildArgs>
</configuration>
Expand Down

0 comments on commit f9be0d9

Please sign in to comment.