Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use pulumi in a Maven multi-module project #1441

Open
cowwoc opened this issue Oct 24, 2024 · 0 comments
Open

Unable to use pulumi in a Maven multi-module project #1441

cowwoc opened this issue Oct 24, 2024 · 0 comments
Labels
kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team

Comments

@cowwoc
Copy link

cowwoc commented Oct 24, 2024

What happened?

error: failed to discover plugin requirements: language host could not determine Pulumi packages: could not find ./mvnw, mvn on the $PATH: exec: "mvn": executable file not found in %PATH%

Example

  1. Create a multi-module Maven project containing mvnw in the root
  2. Place the pulumi-java project in a sub-module
  3. Run pulumi up
  4. Pulumi will complain:

error: failed to discover plugin requirements: language host could not determine Pulumi packages: could not find ./mvnw, mvn on the $PATH: exec: "mvn": executable file not found in %PATH%

Creating symbol links from the mvnw installation in the root module does not help (I get the same error). If I copy the files over, the error goes away, but obviously it's bad to maintain copies as they will fall out-of-sync.

Ideally, pulumi should scan the ancestor directories one at a time looking for mvnw and use the existing installation without needing a local copy or symbol link.

Output of pulumi about

CLI
Version      3.137.0
Go Version   go1.23.2
Go Compiler  gc

Host
OS       Microsoft Windows 10 Pro
Version  10.0.19045 Build 19045
Arch     x86_64

This project is written in java: executable='C:\Users\Gili\scoop\apps\openjdk\current\bin\java.exe' version='openjdk 23.0.1 2024-10-15
OpenJDK Runtime Environment (build 23.0.1+11-39)
OpenJDK 64-Bit Server VM (build 23.0.1+11-39, mixed mode, sharing)' java='C:\Users\Gili\scoop\apps\openjdk\current\bin\java.exe' javac='23.0.1'

Backend
Name           pulumi.com
URL            https://app.pulumi.com/cowwoc
User           cowwoc
Organizations  cowwoc, licensed-app
Token type     personal

No dependencies found

Pulumi locates its logs in C:\Users\Gili\AppData\Local\Temp by default
warning: Failed to get information about the plugin: failed to discover plugin requirements: language host could not determine Pulumi packages: could not find ./mvnw, mvn on the $PATH: exec: "mvn": executable file not found in %!P(MISSING)ATH%!(NOVERB)
warning: Failed to get information about the current stack: No current stack

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@cowwoc cowwoc added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team
Projects
None yet
Development

No branches or pull requests

1 participant