How to run Maven from another directory (without cd to project dir)?

Ali Shakiba

Supposing my maven project is located in /some/location/project and my current location is /another/location/ how can I run maven build without changing to project location cd /some/location/project?

dunni

You can use the parameter -f (or --file) and specify the path to your pom file, e.g. mvn -f /path/to/pom.xml

This runs maven "as if" it were in /path/to for the working directory.

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Maven project.build.directory

如何使`cd dir / filename`带我到dir /?

How can I reinstall Windows 7 on a laptop without the drivers CD?

docker run -v <dir>与Dockerfile的VOLUME <dir>

Qt: How to create a directory in project file?

How do I run a LibreOffice macro from the command line without the GUI?

How to install/run autohotkey without admin privileges?

How to change current directory inside IF statement and reference its path with environment variable CD?

cd 3次曾曾祖父母dir

sudo(cd / some / dir; ./runscript.sh)失败

重新定义cd为“ cd <directory> ls -F”问题

詹金斯管道“ cd”命令不起作用,“ cd” vs“ dir”?

How to open the same directory in another panel in Midnight Commander?

Maven 在 CI/CD 上初始化

无法使用 dotnet ef 迁移找到 DbContext 类 add Initial -s <project> -c <full class name from referenced project> -o <output dir>

How to create a file from directory structure

Maven-在$ {project.build.directory}(target /)中的一系列文件上部署:部署文件

Docker:RUN CD ...无法按预期工作

go run ./path/dir和go run path / dir之间的区别

Directory.Exists(Dir)功能无法按预期工作

为什么Directory.GetDirectories输出与/ a:d的dir不同?

System.IO.Directory.EnumerateDirectories(dir)的Unity .Net语法

查找目录名称的特定嵌套,例如... / project / dir1 / dir2

CMake中的CMAKE_SOURCE_DIR和PROJECT_SOURCE_DIR是否相同?

Shell如何执行此代码'cd $ dir && php -f test_loop.php&'

cd $ {DIR_PATH}返回“没有这样的文件或目录”

DIR =“ $(cd” $(目录名“ $ {BASH_SOURCE [0]}”)“ && pwd)”如何工作?

退出脚本后将cd转到dir(系统独立方式,仅在python中)

如何从.env变量处理%kernel.project_dir%?