You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by keepfocusing <ke...@gmail.com> on 2009/01/21 07:47:49 UTC
How to reference home directory in linux?
Hi,
I want to set the local repository position with this expression
"~/m2/repo", which is also used as an example in settings.xml. But it seems
not working unless I change it into absolute path such as
"/home/abc/m2/repo".
1) Is it a bug of maven?
2) How can I do if a reference to home directory is needed here?
Thanks!
--
View this message in context: http://www.nabble.com/How-to-reference-home-directory-in-linux--tp21577957p21577957.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to reference home directory in linux?
Posted by Martin Höller <ma...@xss.co.at>.
On Wednesday 21 January 2009 keepfocusing wrote:
> I want to set the local repository position with this expression
> "~/m2/repo", which is also used as an example in settings.xml. But it
> seems not working unless I change it into absolute path such as
> "/home/abc/m2/repo".
>
> 1) Is it a bug of maven?
No. "~" is (usually) interpreted by the shell you are using. If it's in a
configuration file the shell never sees it thus cannot replace it with the
user's home directory. For maven "~" is just a character, nothing more.
> 2) How can I do if a reference to home directory is needed here?
As Haim said, try ${user.home}. I think this is a system property.
hth,
- martin
RE: How to reference home directory in linux?
Posted by Yossi Brosh <Yo...@retalix.com>.
Try,
<properties>
<my.root>C:/App/proj</my.root>
<url>file:///${my.root}/Maven/repository</url>
-----Original Message-----
From: keepfocusing [mailto:keepfocusing@gmail.com]
Sent: Wednesday, January 21, 2009 8:48 AM
To: users@maven.apache.org
Subject: How to reference home directory in linux?
Hi,
I want to set the local repository position with this expression
"~/m2/repo", which is also used as an example in settings.xml. But it seems
not working unless I change it into absolute path such as
"/home/abc/m2/repo".
1) Is it a bug of maven?
2) How can I do if a reference to home directory is needed here?
Thanks!
--
View this message in context: http://www.nabble.com/How-to-reference-home-directory-in-linux--tp21577957p21577957.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Received via pineapp
Sent via pineapp
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to reference home directory in linux?
Posted by Haim Ashkenazi <ha...@gmail.com>.
On Wed, Jan 21, 2009 at 8:47 AM, keepfocusing <ke...@gmail.com>wrote:
>
> Hi,
>
> I want to set the local repository position with this expression
> "~/m2/repo", which is also used as an example in settings.xml. But it seems
> not working unless I change it into absolute path such as
> "/home/abc/m2/repo".
>
> 1) Is it a bug of maven?
> 2) How can I do if a reference to home directory is needed here?
I havn't tried it, but did you try referencing it by ${user.home}?
Found this example here:
http://maven.apache.org/settings.html
...
<profiles>
<profile>
...
<properties>
<user.install>${user.home}/our-project</user.install>
</properties>
...
</profile>
</profiles>
...
Bye
>
>
> Thanks!
> --
> View this message in context:
> http://www.nabble.com/How-to-reference-home-directory-in-linux--tp21577957p21577957.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Haim