You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Martin Eigenbrodt <ma...@googlemail.com> on 2012/02/24 10:42:20 UTC

Howto activate ProxyProfile

The Page https://maven.apache.org/ref/3.0.4/maven-settings/settings.html

says for the element "proxies/proxy*":

> Multiple proxy profiles might come in handy for anyone working from a notebook or other mobile platform, to enable easy switching of entire proxy configurations by simply specifying the profile id, again either from the command line or from the defaults section below.                        

However there is no "defaults section below" in this document. The xsd  (https://maven.apache.org/xsd/settings-1.0.0.xsd) has the same problem. Also I don't see how to assign an id to a proxy and how I'd pass it at the command line. The Documentation is either wrong here or missing some information.


Regards,

Martin

Re: Howto activate ProxyProfile

Posted by Martin Eigenbrodt <ma...@googlemail.com>.
Sorry for answering so late.  The described approach would activate a profile base on a property. I don't see any relationship to a proxy profile (Whatever that is).
Once again: There is no proxies element within profile. Thus "<profile>" can NOT be used to configure proxies.


M.

Am 25.02.2012 um 00:47 schrieb Martin Gainty:

> 
> setting a profile with  the name of the profile and the value of the proxy would work e.g.
> <profiles>
>  <profile>
>    <activation>
>      <property>
>        <name>proxy1</name>
>        <value>localhost</value>
>      </property>to activate simply specify proxy1=localhost at command line
> mvn groupId:artifactId:goal -Dproxy1=localhostdoes this help
> Martin 
> ______________________________________________ 
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
> 
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> 
> 
>> From: martineigenbrodt@googlemail.com
>> Subject: Howto activate ProxyProfile
>> Date: Fri, 24 Feb 2012 10:42:20 +0100
>> To: users@maven.apache.org
>> 
>> The Page https://maven.apache.org/ref/3.0.4/maven-settings/settings.html
>> 
>> says for the element "proxies/proxy*":
>> 
>>> Multiple proxy profiles might come in handy for anyone working from a notebook or other mobile platform, to enable easy switching of entire proxy configurations by simply specifying the profile id, again either from the command line or from the defaults section below.                        
>> 
>> However there is no "defaults section below" in this document. The xsd  (https://maven.apache.org/xsd/settings-1.0.0.xsd) has the same problem. Also I don't see how to assign an id to a proxy and how I'd pass it at the command line. The Documentation is either wrong here or missing some information.
>> 
>> 
>> Regards,
>> 
>> Martin
> 		 	   		  


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Howto activate ProxyProfile

Posted by Martin Gainty <mg...@hotmail.com>.
 setting a profile with  the name of the profile and the value of the proxy would work e.g.
<profiles>
  <profile>
    <activation>
      <property>
        <name>proxy1</name>
        <value>localhost</value>
      </property>to activate simply specify proxy1=localhost at command line
mvn groupId:artifactId:goal -Dproxy1=localhostdoes this help
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.


> From: martineigenbrodt@googlemail.com
> Subject: Howto activate ProxyProfile
> Date: Fri, 24 Feb 2012 10:42:20 +0100
> To: users@maven.apache.org
> 
> The Page https://maven.apache.org/ref/3.0.4/maven-settings/settings.html
> 
> says for the element "proxies/proxy*":
> 
> > Multiple proxy profiles might come in handy for anyone working from a notebook or other mobile platform, to enable easy switching of entire proxy configurations by simply specifying the profile id, again either from the command line or from the defaults section below.                        
> 
> However there is no "defaults section below" in this document. The xsd  (https://maven.apache.org/xsd/settings-1.0.0.xsd) has the same problem. Also I don't see how to assign an id to a proxy and how I'd pass it at the command line. The Documentation is either wrong here or missing some information.
> 
> 
> Regards,
> 
> Martin
 		 	   		  

Re: Howto activate ProxyProfile

Posted by Wayne Fay <wa...@gmail.com>.
> (https://maven.apache.org/xsd/settings-1.0.0.xsd) has the same problem. Also I don't see
> how to assign an id to a proxy and how I'd pass it at the command line. The Documentation
> is either wrong here or missing some information.

There is very clearly an <id> element in the <proxy> node. The default
id value is "default." I have no idea how it is used though.

As for how to enable/disable/select which proxy to use from the
command line, I have no idea. I've never needed to do that (yet). I
would suggest instead using multiple settings.xml files and creating a
mvn-work.bat/.sh (which uses -f settings-work.xml) and
mvn-home.bat/.sh (using -f settings-home.xml) etc.

Alternatively you can feel free to dig into the (open) source code and
modify it to suit your needs, then contribute the changes back via
JIRA.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org