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: [email protected]
> Subject: Howto activate ProxyProfile
> Date: Fri, 24 Feb 2012 10:42:20 +0100
> To: [email protected]
>
> 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