Running Maven Command
Pass Maven arguments after jup run mvn:
jup run mvn testjup run mvn clean package -DskipTestsjup run mvn dependency:treeTo 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 exampleOne match is selected automatically. Multiple matches remain available in the interactive selector; no matches produce an error.
Interactive Terminals
Section titled “Interactive Terminals”At an initialized project root, jup run mvn without --project uses the
current project directly without showing the selector. Inside an initialized
project, it uses the nearest saved project and starts Maven in the current
directory. In other interactive locations, each 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.
Non-Interactive Environments
Section titled “Non-Interactive Environments”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.