简体   繁体   English

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

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

I am following a maven tutorial and the tutor is using windows while am using linux in his example theres a line in the pom.xml as such 我正在遵循一个maven教程,并且在他的示例中使用linux时,导师正在使用Windows,而在pom.xml中这样一行

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

For me on ubuntu I have the same files in this directory ~/sigmah/files/sigmah_dev 对于我在ubuntu上,我在此目录〜/ sigmah / files / sigmah_dev中具有相同的文件

So I modified the pom.xml file as such 所以我这样修改了pom.xml文件

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

But I still get a maven error complaining this directory does not exist. 但是我仍然收到一个maven错误,抱怨该目录不存在。 Please what am I doing wrong 请问我在做什么错

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

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM