Skip to content

IllegalArgumentException: Unknown os.arch aarch64 #20

Closed
@rawlingsj

Description

@rawlingsj

The Jenkins project recently enabled spotless-maven-plugin for Jenkinsfiles see jenkinsci/jenkins#7834. As a result we have started seeing errors when building on aarch64, s390x and ppc64le

Caused by: java.lang.IllegalArgumentException: Unknown os.arch s390x'.
    at com.diffplug.common.swt.os.OS.calculateNative (OS.java:147)
    at com.diffplug.common.swt.os.OS.detectPlatform (OS.java:113)
    at com.diffplug.common.swt.os.OS.detectPlatform (OS.java:120)

After a quick look could it be this code

String os_arch = systemProperty.apply("os.arch");
switch (os_arch) {
case "i386":
case "x86":
return LINUX_x86;
case "x86_64":
case "amd64":
return LINUX_x64;
default:
throw new IllegalArgumentException("Unknown os.arch " + os_arch + "'.");
}

that needs needs to handle extra architectures?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions