frontend-maven-plugin icon indicating copy to clipboard operation
frontend-maven-plugin copied to clipboard

Check libc type is not reliable

Open andrew-aladjev opened this issue 6 months ago • 2 comments

Hello, I have musl libc locally near glibc, because I am using some alpine project utils locally. This is fairly legal.

You are detecting musl in the following way:

public static Boolean CHECK_FOR_ALPINE() {
  return new File("/etc/alpine-release").exists();
}

I have /etc/alpine-release file locally, so your plugin tries to download a musl node version for me.

Downloading https://nodejs.org/dist/v18.12.0/node-v18.12.0-linux-x64-musl.tar.gz
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:install-node-and-npm (install-frontend-tools) on project: Could not download Node.js: Got error code 404 from the server.

But I am not using musl libc right now and I am not going to use musl libc for the target project. So please implement the following updates:

  1. Remove CHECK_FOR_ALPINE and everything related to the Alpine workaround.
  2. Add option for libc type: glibc, musl, uclibc, etc.

andrew-aladjev avatar May 07 '25 08:05 andrew-aladjev

Wouldn't removing the existing code break functionality for existing users?

eirslett avatar May 07 '25 15:05 eirslett

@eirslett Hello Eric, yes, it is better to introduce libc type first and deprecate automatic selection based on some alpine file. Automatic selection may be removed in 3 releases.

andrew-aladjev avatar May 07 '25 20:05 andrew-aladjev