Skip to content

Commit

Permalink
Resolve merge
Browse files Browse the repository at this point in the history
Signed-off-by: Sanjula Ganepola <[email protected]>
  • Loading branch information
SanjulaGanepola committed Jan 8, 2025
2 parents d63a1cf + 1ad5792 commit f378b2d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
10 changes: 5 additions & 5 deletions camel/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>3.14.6</version>
<version>3.14.10</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
Expand Down Expand Up @@ -74,7 +74,7 @@
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-stream</artifactId>
<version>3.14.7</version>
<version>3.14.10</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
Expand Down Expand Up @@ -105,7 +105,7 @@
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-kafka</artifactId>
<version>3.14.7</version>
<version>3.14.10</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
Expand All @@ -122,7 +122,7 @@
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jackson</artifactId>
<version>3.14.7</version>
<version>3.14.10</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -195,7 +195,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<version>3.13.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Expand Down
12 changes: 12 additions & 0 deletions camel/src/main/java/com/github/theprez/manzan/ManzanMainApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ public static void main(final String... _args) throws Exception {
return;
}

// Check to make sure we use right java version on IBM i
if (Config.isIBMi()){
// Get the Java vendor property
String javaVendor = System.getProperty("java.vendor");
// Check if the vendor is IBM
if (!javaVendor.toLowerCase().contains("ibm")) {
System.out.println("Java vendor: " + javaVendor);
System.err.println("Error: This application requires Java provided by IBM");
System.exit(1);
}
}

for(final String arg:_args) {
if(arg.startsWith("--configdir=")) {
System.setProperty(Config.DIRECTORY_OVERRIDE_PROPERTY, arg.replaceFirst("^[^=]+=", ""));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public abstract class Config {
public static final String DIRECTORY_OVERRIDE_PROPERTY = "manzan.configdir";
public static final String COMPONENT_OPTIONS_PREFIX = "componentOptions.";

protected static boolean isIBMi() {
public static boolean isIBMi() {
final String osName = System.getProperty("os.name", "Misty");
return "os400".equalsIgnoreCase(osName) || "os/400".equalsIgnoreCase(osName);
}
Expand Down
4 changes: 4 additions & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

This document will outline how to install Manzan on to IBM i. Manzan is installed through a pase shell. We do not recommend using `qsh` or `qp2term`, and instead using SSH and a bash shell.

## Which Java to Use

Use a Java version provided by IBM, which is at least version 8. When running the `java -version` command, the output should contain the string `IBM`. Ex. `IBM Semeru Runtime Certified Edition`. Otherwise, Manzan may not function properly.

## Install from GitHub

1. Make a "download" directory on IBM i by running the following from an SSH terminal:
Expand Down

0 comments on commit f378b2d

Please sign in to comment.