I fixed it by doing it indirectly like this. I just replaced all
references to ${user.home} to ${repoRoot}. Now I can swap out the
${user.home} with this. I'll admit it's not too pretty. I rather wanted
to use ${localRepository} but could not use it because it has a prefix
of "[local] -> file://".
<profiles>
<profile>
<id>default</id>
<properties>
<username>foo</username>
<password>bar</password>
<repoRoot>${user.home}\.m2\repository</repoRoot>
<!-- <repoRoot>C:\some\path</repoRoot> -->
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>default</activeProfile>
</activeProfiles>
-----Oorspronkelijk bericht-----
Van: Arik Kfir [mailto:[EMAIL PROTECTED]
Verzonden: donderdag 13 april 2006 14:45
Aan: Maven Users List
Onderwerp: Re: Overriding ${user.home} from profile
Hi Peschier,
I believe ${user.home} is a property propagated from the JRE, rather
than
from maven. More than that - something looks "fishy" in such a use-case,
where you want to override the user's home dir....perhaps if you could
elaborate on your use case we can think of a better solution?
On 4/13/06, Peschier J. (Jeroen) <[EMAIL PROTECTED]> wrote:
>
>
>
> I need to set ${user.home} to a different location based on profile.
In
> the profile below ${username} and ${password} propagate to the POM.
> However, ${user.home} is not propagated with the value specified in
the
> profile. It keeps resolving to the home directory of the user running
M2
> instead of C:\some\path.
>
>
> Relevant fragment from my settings.xml:
>
> <profiles>
> <profile>
> <id>default</id>
> <properties>
> <username>foo</username>
> <password>bar</password>
> <user.home>C:\some\path</user.home>
> </properties>
> </profile>
> </profiles>
>
> <activeProfiles>
> <activeProfile>default</activeProfile>
> </activeProfiles>
>
>
> Should it work this way?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]