Running Maven
Pass Maven arguments after jup run mvn:
jup run mvn test
jup run mvn clean package -DskipTests
jup run mvn dependency:tree
To narrow project selection, append --project <keyword>. Matching is
case-insensitive and checks both the project name and its absolute path:
jup run mvn clean package --project example
One match is selected automatically. Multiple matches remain available in the interactive selector; no matches produce an error.
Every invocation:
- loads all initialized Maven projects, even outside a project directory;
- orders them by a time-decaying recent-use score;
- filters them by
--project <keyword>when supplied; - selects the only match automatically, or lets you choose with the Up/Down keys and Enter;
- validates the saved Maven executable;
- sets the saved
JAVA_HOMEfor the child process; - places the selected JDK’s
binfirst on the child PATH; - prepends
--settings <path>when a settings alias is bound; - starts Maven in the selected project root.
The ranking score has a 14-day half-life. Full paths keep projects with the same directory name unambiguous.
In CI and redirected pipelines, jup does not prompt. It searches upward for
the nearest initialized project and starts Maven in the current directory.
When --project <keyword> uniquely identifies a configured project, that
project is used instead. Multiple matches require a more specific keyword.
Maven’s standard input, output, error, and exit status remain connected to the terminal or calling process. The current shell environment is never modified.