如何在基于 unix 的系统的 pom.xml maven 文件中写入路径

How to write path in pom.xml maven file for unix based system

我正在学习 Maven 教程,导师使用 windows,而在他的示例中使用 linux pom.xml 中有一行

<files.repository.name>C:\Sigmah\files\sigmah_dev</files.repository.name>

对我来说 ubuntu 我在这个目录中有相同的文件 ~/sigmah/files/sigmah_dev

所以我修改了 pom.xml 文件

<files.repository.name>~/sigmah/files/sigmah_dev</files.repository.name>

但我仍然收到一个 maven 错误,抱怨此目录不存在。请问我做错了什么

将您的 pom.xml 更改为以反映在具有您的绝对主目录路径的 $HOME 环境变量中的相同路径。

<files.repository.name>/home/fenn/sigmah/files/sigmah_dev</files.repository.name>