Conveniently switch between settings

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Conveniently switch between settings

kalpakrg
Hi,

I use Maven from workplace and home. At workplace we have proxy as well
as a maven repository. Where at home I don't need any proxy and don't
have a repository.

Is there no convenient way to switch between these configurations other
than specifying alternate settings file? It would be nice if it was at
profile level where I could just say "mvn -P home" I know that there are
lot of issue with that.

I hope most of us face this problem. What do you guys do?

Thanks,

Kalpak



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Conveniently switch between settings

Jemos Infra
Gadre,

I think it's assumed that your security configuration will remain stable
"per environment". So at work you will have a settings.xml with proxy
settings and at home a file without proxy settings. Isn't this a one-off
change? Or do you have any particular requirements for which you need to
switch from work/home at runtime? In this case having a script which
swaps the two settings.xml files could be the solution.

M.

On Fri, 2010-05-07 at 12:13 +0530, Kalpak Gadre wrote:

> Hi,
>
> I use Maven from workplace and home. At workplace we have proxy as well
> as a maven repository. Where at home I don't need any proxy and don't
> have a repository.
>
> Is there no convenient way to switch between these configurations other
> than specifying alternate settings file? It would be nice if it was at
> profile level where I could just say "mvn -P home" I know that there are
> lot of issue with that.
>
> I hope most of us face this problem. What do you guys do?
>
> Thanks,
>
> Kalpak
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Conveniently switch between settings

Nick Klauer
In reply to this post by kalpakrg
What I've done for my setup is configure maven to take a settings.xml with
no proxy settings configured and pass it explicitly from maven using *mvn -s
your_settings_file.xml* .  I'm using Cygwin for this, so I set up a
configuration to alias *mvn* commands to be *mvn -s "wherever your new
settings.xml is"*.

It's the best setup i've found thus far, but I'm still looking for a
solution that auto-discovers my lack of a proxy server and makes the changes
for me.

-Nick

On Fri, May 7, 2010 at 1:43 AM, Kalpak Gadre <[hidden email]> wrote:

> Hi,
>
> I use Maven from workplace and home. At workplace we have proxy as well as
> a maven repository. Where at home I don't need any proxy and don't have a
> repository.
>
> Is there no convenient way to switch between these configurations other
> than specifying alternate settings file? It would be nice if it was at
> profile level where I could just say "mvn -P home" I know that there are lot
> of issue with that.
>
> I hope most of us face this problem. What do you guys do?
>
> Thanks,
>
> Kalpak
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

RE: Conveniently switch between settings

Thiessen, Todd (Todd)
In reply to this post by kalpakrg
Hmmm. I don't quite see the issue. At home I have a settings.xml file that defines my environment at home, and at work I have a settings.xml file that defines my environment at work. I can issue the same "mvn <command>" at home or at work and at home it doesn't go to a proxy and at work it does. I don't see what issue you are having. There is no need to switch between settings.xml files.

Are you perhaps saving your settings.xml file with your project in source control? This may be the problem.

All I do is modify the global settings.xml file in the conf folder of my maven install. You could put these changes in your local settings.xml file but I prefer the global settings.xml file as I find configuring which repos to use to be more global in nature.

> -----Original Message-----
> From: Kalpak Gadre [mailto:[hidden email]]
> Sent: Friday, May 07, 2010 2:44 AM
> To: Maven Users List
> Subject: Conveniently switch between settings
>
> Hi,
>
> I use Maven from workplace and home. At workplace we have
> proxy as well as a maven repository. Where at home I don't
> need any proxy and don't have a repository.
>
> Is there no convenient way to switch between these
> configurations other than specifying alternate settings file?
> It would be nice if it was at profile level where I could
> just say "mvn -P home" I know that there are lot of issue with that.
>
> I hope most of us face this problem. What do you guys do?
>
> Thanks,
>
> Kalpak
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Conveniently switch between settings

kaosko
Heh, that's old school - you actually have two different machines. I
bet many developers today do their work on a single laptop, which
leads to the constant need to change settings, especially if you work
on multiple projects, some professional, some open source ones. One
solution is, if you can, to run your own personal proxy that proxies
everything you need and go through that at all times.

Kalle


On Fri, May 7, 2010 at 7:04 AM, Thiessen, Todd (Todd)
<[hidden email]> wrote:

> Hmmm. I don't quite see the issue. At home I have a settings.xml file that defines my environment at home, and at work I have a settings.xml file that defines my environment at work. I can issue the same "mvn <command>" at home or at work and at home it doesn't go to a proxy and at work it does. I don't see what issue you are having. There is no need to switch between settings.xml files.
>
> Are you perhaps saving your settings.xml file with your project in source control? This may be the problem.
>
> All I do is modify the global settings.xml file in the conf folder of my maven install. You could put these changes in your local settings.xml file but I prefer the global settings.xml file as I find configuring which repos to use to be more global in nature.
>
>> -----Original Message-----
>> From: Kalpak Gadre [mailto:[hidden email]]
>> Sent: Friday, May 07, 2010 2:44 AM
>> To: Maven Users List
>> Subject: Conveniently switch between settings
>>
>> Hi,
>>
>> I use Maven from workplace and home. At workplace we have
>> proxy as well as a maven repository. Where at home I don't
>> need any proxy and don't have a repository.
>>
>> Is there no convenient way to switch between these
>> configurations other than specifying alternate settings file?
>> It would be nice if it was at profile level where I could
>> just say "mvn -P home" I know that there are lot of issue with that.
>>
>> I hope most of us face this problem. What do you guys do?
>>
>> Thanks,
>>
>> Kalpak
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Conveniently switch between settings

kalpakrg
I am using a global settings file (sort of! user level settings. I have
them in my .m2/ folder and not in maven/conf/)

It would have been really nice if I could define something like "network
profiles" and I could activate the proxy settings automatically say on
the basis of IP range. But again this only works for proxy stuff. People
working on multiple projects will face issues with things like
repositories / mirrors?

Currently I have settled with two scripts "atwork" and "athome" which
simply switch my settings file.

Kalpak


Heh, that's old school - you actually have two different machines. I

> bet many developers today do their work on a single laptop, which
> leads to the constant need to change settings, especially if you work
> on multiple projects, some professional, some open source ones. One
> solution is, if you can, to run your own personal proxy that proxies
> everything you need and go through that at all times.
>
> Kalle
>
>
> On Fri, May 7, 2010 at 7:04 AM, Thiessen, Todd (Todd)
> <[hidden email]>  wrote:
>    
>> Hmmm. I don't quite see the issue. At home I have a settings.xml file that defines my environment at home, and at work I have a settings.xml file that defines my environment at work. I can issue the same "mvn<command>" at home or at work and at home it doesn't go to a proxy and at work it does. I don't see what issue you are having. There is no need to switch between settings.xml files.
>>
>> Are you perhaps saving your settings.xml file with your project in source control? This may be the problem.
>>
>> All I do is modify the global settings.xml file in the conf folder of my maven install. You could put these changes in your local settings.xml file but I prefer the global settings.xml file as I find configuring which repos to use to be more global in nature.
>>
>>      
>>> -----Original Message-----
>>> From: Kalpak Gadre [mailto:[hidden email]]
>>> Sent: Friday, May 07, 2010 2:44 AM
>>> To: Maven Users List
>>> Subject: Conveniently switch between settings
>>>
>>> Hi,
>>>
>>> I use Maven from workplace and home. At workplace we have
>>> proxy as well as a maven repository. Where at home I don't
>>> need any proxy and don't have a repository.
>>>
>>> Is there no convenient way to switch between these
>>> configurations other than specifying alternate settings file?
>>> It would be nice if it was at profile level where I could
>>> just say "mvn -P home" I know that there are lot of issue with that.
>>>
>>> I hope most of us face this problem. What do you guys do?
>>>
>>> Thanks,
>>>
>>> Kalpak
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>>        
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>>      
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>    


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Conveniently switch between settings

Clickvista
This post has NOT been accepted by the mailing list yet.
In reply to this post by kalpakrg
Earn big money by just watching videos and completing simple tasks.The more time you put into this job, the more you earn money watching videos.Visit http://clickvista.com/ for more information.