Add support for Maven multi-module projects
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 85
- Forks
- 26
- Avg merge
- 11h 49m
- Merged PRs (30d)
- 22
Description
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
- Create a multi-module Maven project containing
mvnwin the root - Place the pulumi-java project in a sub-module
- Run
pulumi up - 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).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Java language host's Maven dependency discovery path and reproduce the reported multi-module setup with mvnw in the root and the Pulumi project in a sub-module. Use pulumi up to verify that ancestor Maven wrapper discovery succeeds without copied files or symlinks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100