Closed nkavian closed 11 months ago
I'm not sure there's anything that can be done 🤷 if using Node 14 is OK then I guess the problem is solved! Or maybe upgrade to Java 17 to get the latest Ubuntu and unlock the newest Node version...
I was hoping for a different outcome. If this plugin is insisting it doesn't want to use Node/NPM installed by the user, then this plugin should manage and take care of the dependencies. Alternatively, I was really hoping that it would be understood that locking Node/NPM this was actually impractical and that users should be allowed to manage it on their own if they need to.
I can't for example, just upgrade from Java 11 to Java 17, since I have other Java dependencies that require Java 8/11. I'm caught in the middle since others are locking things.
I found the workaround because I understand system library issues, but I don't think others will be as lucky.
thanks for the quick response.
This plugin might not be the right tool for the job. For use cases where you would like to use system-provided node/npm binaries (and not lock down the versions), the exec-maven-plugin is a much better alternative: https://www.mojohaus.org/exec-maven-plugin/ Another option is to use a Docker image with the newer Ubuntu but with JDK 11? I think you might have stumbled upon an edge case. As far as I know, there are no other reports of this bug.
Agreed, it is likely an edge case or very limited case.
It requires an enterprise that needs to uses a (CI/CD) deploying a (Java) application with the necessity to bring in (Node modules) that would be deployed on (AWS CodeBuild).
That combination is likely rare.
Hi @nkavian, I am facing pretty much the same issue here. Can you please share the workaround you found? Thanks.
@clementepereyra sorry for the delayed response
In the AWS build project I use an Environment
Image
of aws/codebuild/standard:5.0
.
In the buildspec.yml
I use:
phases:
install:
runtime-versions:
java: corretto11.x
nodejs: 14.x
If standards:5.0
is ever retired, then we have a major blocker.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Maven builds fail on AWS.
If the current behavior is a bug, please provide the steps to reproduce.
Create an AWS CodeBuild project and specify in the
buildspec.yml
to build your Java 11 maven project.Configure the build server as
Amazon Linux 2 x86_64 standard:corretto11
.The build fails, and with debug logging it's basically complaining about missing system libraries.
What is the expected behavior?
If this plugin insists on controlling the NodeJS version, it should also resolve the dependency issues.
Initially I was trying to install node myself into the build pipeline and found out this plugin is specifically against it.
Additional context / workaround:
corretto11
and based on this matrix, I had to install NodeJS14
to be able to useUbuntu standard:5.0
which is an older system image. Eventually, these images will have mismatches and this workaround will eventually be gone. i.e. I can't install NodeJS18
.https://docs.aws.amazon.com/codebuild/latest/userguide/available-runtimes.html
Please mention your frontend-maven-plugin and operating system version.
1.13.4