You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Jason Dillon <ja...@planet57.com> on 2007/04/05 22:29:51 UTC
-Dmaven.repo.local as a option to mvn
A while ago I heard that the -Dmaven.repo.local property was
deprecated and was going to be removed in the future.
This flag is super handy and I think that it should stay... and more
so I think that it is so useful that it should be promoted to a flag
on mvn, like -R, --repository.
I use -Dmaven.repo.local all of the time to verify builds from
release repo zips or to quickly test the build-ability of a project
with a clean repo, w/o nuking my normal cache.
It would be a PITA to have to make a settings.xml file each time I
wanted to simply use a new repo location.
Can we please keep -Dmaven.repo.local around permanently, and
really... replace it with -R, --repository flags to the mvn cli?
--jason
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
RE: -Dmaven.repo.local as a option to mvn
Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Yes, I've been burned by this before also. I even wrote an issue!
http://jira.codehaus.org/browse/MNG-1992
-----Original Message-----
From: Jason Dillon [mailto:jason.dillon@gmail.com] On Behalf Of Jason
Dillon
Sent: Thursday, April 05, 2007 7:28 PM
To: Maven Developers List
Subject: Re: -Dmaven.repo.local as a option to mvn
On Apr 5, 2007, at 4:22 PM, Jason van Zyl wrote:
>> <properties>
>> <foo allow-override="true">foo</foo>
>> <bar>bar</bar >
>> </properties>
>
> Too complicated.
>
>>
>> Then `mvn` would have ${foo} == 'foo', but `mvn -Dfoo=blah` would
>> have ${foo} == 'blah'. And `mvn -Dbar=fuff` would behave as
>> properties in poms do now, keeping ${bar} == 'bar'.
>>
>> This would be very helpful to provide default values for
>> properties which could be altered by -D on the cli.
>>
>
> I think just setting a property and then allowing overriding from
> the command line would suffice no?
Yes, that would do it too :-)
--jason
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: -Dmaven.repo.local as a option to mvn
Posted by Jason Dillon <ja...@planet57.com>.
On Apr 5, 2007, at 4:22 PM, Jason van Zyl wrote:
>> <properties>
>> <foo allow-override="true">foo</foo>
>> <bar>bar</bar >
>> </properties>
>
> Too complicated.
>
>>
>> Then `mvn` would have ${foo} == 'foo', but `mvn -Dfoo=blah` would
>> have ${foo} == 'blah'. And `mvn -Dbar=fuff` would behave as
>> properties in poms do now, keeping ${bar} == 'bar'.
>>
>> This would be very helpful to provide default values for
>> properties which could be altered by -D on the cli.
>>
>
> I think just setting a property and then allowing overriding from
> the command line would suffice no?
Yes, that would do it too :-)
--jason
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: -Dmaven.repo.local as a option to mvn
Posted by Jason van Zyl <ja...@maven.org>.
On 5 Apr 07, at 6:53 PM 5 Apr 07, Jason Dillon wrote:
> On Apr 5, 2007, at 3:23 PM, Jason van Zyl wrote:
>>> Related to -Dfoo=bar stuff though, wouldn't it be better for the
>>> cli to set those in some maven properties which could be attached
>>> to the request and not use system properties at all?
>>>
>>
>> That's what I've changed it to do in 2.1. There are properties
>> that are carried through in the execution request.
>
> Cool :-)
>
> Related to properties in poms... what about adding support to allow
> properties to be overridden by those carried in the request, or
> force the properties in the pom to take precedence?
>
> Maybe something like:
>
> <properties>
> <foo allow-override="true">foo</foo>
> <bar>bar</bar >
> </properties>
Too complicated.
>
> Then `mvn` would have ${foo} == 'foo', but `mvn -Dfoo=blah` would
> have ${foo} == 'blah'. And `mvn -Dbar=fuff` would behave as
> properties in poms do now, keeping ${bar} == 'bar'.
>
> This would be very helpful to provide default values for properties
> which could be altered by -D on the cli.
>
I think just setting a property and then allowing overriding from the
command line would suffice no?
Jason.
> --jason
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: -Dmaven.repo.local as a option to mvn
Posted by Jason Dillon <ja...@planet57.com>.
On Apr 5, 2007, at 3:23 PM, Jason van Zyl wrote:
>> Related to -Dfoo=bar stuff though, wouldn't it be better for the
>> cli to set those in some maven properties which could be attached
>> to the request and not use system properties at all?
>>
>
> That's what I've changed it to do in 2.1. There are properties that
> are carried through in the execution request.
Cool :-)
Related to properties in poms... what about adding support to allow
properties to be overridden by those carried in the request, or force
the properties in the pom to take precedence?
Maybe something like:
<properties>
<foo allow-override="true">foo</foo>
<bar>bar</bar >
</properties>
Then `mvn` would have ${foo} == 'foo', but `mvn -Dfoo=blah` would
have ${foo} == 'blah'. And `mvn -Dbar=fuff` would behave as
properties in poms do now, keeping ${bar} == 'bar'.
This would be very helpful to provide default values for properties
which could be altered by -D on the cli.
--jason
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: -Dmaven.repo.local as a option to mvn
Posted by Jason van Zyl <ja...@maven.org>.
On 5 Apr 07, at 5:29 PM 5 Apr 07, Jason Dillon wrote:
> On Apr 5, 2007, at 2:21 PM, Jason van Zyl wrote:
>> On 5 Apr 07, at 4:29 PM 5 Apr 07, Jason Dillon wrote:
>>
>>> A while ago I heard that the -Dmaven.repo.local property was
>>> deprecated and was going to be removed in the future.
>>>
>>
>> The system property will not be used, but an option will be
>> available and is already support in the MavenExecutionRequest so
>> that for each invocation you can have a different local repository
>> being used. I added this for testing and we can expose it easily.
>> System properties are crap for embedding which is why it was
>> removed, the per request local repository option is a good thing.
>
> Understood. So, if we can add a flag to the cli to set the repo
> for the request that would be super.
>
> * * *
>
> Related to -Dfoo=bar stuff though, wouldn't it be better for the
> cli to set those in some maven properties which could be attached
> to the request and not use system properties at all?
>
That's what I've changed it to do in 2.1. There are properties that
are carried through in the execution request.
Jason.
> --jason
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: -Dmaven.repo.local as a option to mvn
Posted by Jason Dillon <ja...@planet57.com>.
On Apr 5, 2007, at 2:21 PM, Jason van Zyl wrote:
> On 5 Apr 07, at 4:29 PM 5 Apr 07, Jason Dillon wrote:
>
>> A while ago I heard that the -Dmaven.repo.local property was
>> deprecated and was going to be removed in the future.
>>
>
> The system property will not be used, but an option will be
> available and is already support in the MavenExecutionRequest so
> that for each invocation you can have a different local repository
> being used. I added this for testing and we can expose it easily.
> System properties are crap for embedding which is why it was
> removed, the per request local repository option is a good thing.
Understood. So, if we can add a flag to the cli to set the repo for
the request that would be super.
* * *
Related to -Dfoo=bar stuff though, wouldn't it be better for the cli
to set those in some maven properties which could be attached to the
request and not use system properties at all?
--jason
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: -Dmaven.repo.local as a option to mvn
Posted by Jason van Zyl <ja...@maven.org>.
On 5 Apr 07, at 4:29 PM 5 Apr 07, Jason Dillon wrote:
> A while ago I heard that the -Dmaven.repo.local property was
> deprecated and was going to be removed in the future.
>
The system property will not be used, but an option will be available
and is already support in the MavenExecutionRequest so that for each
invocation you can have a different local repository being used. I
added this for testing and we can expose it easily. System properties
are crap for embedding which is why it was removed, the per request
local repository option is a good thing.
Jason.
> This flag is super handy and I think that it should stay... and
> more so I think that it is so useful that it should be promoted to
> a flag on mvn, like -R, --repository.
>
> I use -Dmaven.repo.local all of the time to verify builds from
> release repo zips or to quickly test the build-ability of a project
> with a clean repo, w/o nuking my normal cache.
>
> It would be a PITA to have to make a settings.xml file each time I
> wanted to simply use a new repo location.
>
> Can we please keep -Dmaven.repo.local around permanently, and
> really... replace it with -R, --repository flags to the mvn cli?
>
> --jason
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org