Maven 2 & 3

Specify multiple proxies

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Resolution: Won't Fix
  • Affects Version/s: 2.0.2
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Complexity:
    Intermediate
  • Patch Submitted:
    Yes
  • Number of attachments :
    3

Description

After this discussion :
http://www.mail-archive.com/dev@maven.apache.org/msg53099.html

In the attached zip file, you'll find four patch files :

  • on the maven-artifact-manager projet : changes in the DefaultWagonManager class, using the http proxy when no https proxy is specified.
  • on the maven-core project : changes in the DefaultMaven, adding all teh active proxies from the settings to the wagon manager
  • on the maven-settings project : changes in the settings.mdo file

Theses patches are built on the maven-2.0.x branch.

Issue Links

Activity

Hide
Carlos Sanchez added a comment -

Some comments:

  • patches have to be against trunk
  • public api can't be modified, we need to keep backwards compatibility
  • need documentation, for instance that setting http proxy will affect https requests
  • unit tests would be great
Show
Carlos Sanchez added a comment - Some comments:
  • patches have to be against trunk
  • public api can't be modified, we need to keep backwards compatibility
  • need documentation, for instance that setting http proxy will affect https requests
  • unit tests would be great
Hide
Thomas Recloux added a comment -

Thanks for your comments

> patches have to be against trunk

Does this mean this patch can't be integrated until 2.1 ?

> public api can't be modified, we need to keep backwards compatibility

You are speaking of the Settings object ? In this case, can I had a "java.util.List getActiveProxies()" method and keep the "Proxy getActiveProxy()" ? Should I mark it has deprecated ?

> need documentation, for instance that setting http proxy will affect https requests

Where should I document it ? In this guide : http://maven.apache.org/guides/mini/guide-proxies.html ?

> unit tests would be great

OK

Show
Thomas Recloux added a comment - Thanks for your comments > patches have to be against trunk Does this mean this patch can't be integrated until 2.1 ? > public api can't be modified, we need to keep backwards compatibility You are speaking of the Settings object ? In this case, can I had a "java.util.List getActiveProxies()" method and keep the "Proxy getActiveProxy()" ? Should I mark it has deprecated ? > need documentation, for instance that setting http proxy will affect https requests Where should I document it ? In this guide : http://maven.apache.org/guides/mini/guide-proxies.html ? > unit tests would be great OK
Hide
Carlos Sanchez added a comment -

> Does this mean this patch can't be integrated until 2.1 ?

No, just that we work against trunk and then merge to the 2.0.x branch if needed

> You are speaking of the Settings object ? In this case, can I had a "java.util.List getActiveProxies()" method and keep the "Proxy getActiveProxy()" ? Should I mark it has deprecated ?

Yes

> Where should I document it ? In this guide : http://maven.apache.org/guides/mini/guide-proxies.html ?

Yes, and also javadocs would be great

Show
Carlos Sanchez added a comment - > Does this mean this patch can't be integrated until 2.1 ? No, just that we work against trunk and then merge to the 2.0.x branch if needed > You are speaking of the Settings object ? In this case, can I had a "java.util.List getActiveProxies()" method and keep the "Proxy getActiveProxy()" ? Should I mark it has deprecated ? Yes > Where should I document it ? In this guide : http://maven.apache.org/guides/mini/guide-proxies.html ? Yes, and also javadocs would be great
Hide
Thomas Recloux added a comment -

Patch for maven components trunk

Show
Thomas Recloux added a comment - Patch for maven components trunk
Hide
Thomas Recloux added a comment -

Patch for maven site trunk

Show
Thomas Recloux added a comment - Patch for maven site trunk
Hide
Jason van Zyl added a comment -

This is too complicated for Maven. If you have more then one repository that you need to use then you can use one of the many proxying tools. Trying to cycle through proxies doesn't seem all that great. And really you want to be able to bind a proxy to a particular repository as you know what you are trying to get and where. This is not the right solution. Nothing more then simple proxy support belongs in Maven as the proxying solutions are available now and work. See Proximity.

Show
Jason van Zyl added a comment - This is too complicated for Maven. If you have more then one repository that you need to use then you can use one of the many proxying tools. Trying to cycle through proxies doesn't seem all that great. And really you want to be able to bind a proxy to a particular repository as you know what you are trying to get and where. This is not the right solution. Nothing more then simple proxy support belongs in Maven as the proxying solutions are available now and work. See Proximity.
Hide
Francis De Brabandere added a comment -

Do I understand correctly that there is no way to use http together with https repositories when you are behind a single http/https capable proxy? Because of this we can not use the new jboss https (nexus) repository from within our network (without using extra tools).

Show
Francis De Brabandere added a comment - Do I understand correctly that there is no way to use http together with https repositories when you are behind a single http/https capable proxy? Because of this we can not use the new jboss https (nexus) repository from within our network (without using extra tools).
Hide
Barrie Treloar added a comment -

As Jason says in the comment above:
If you are using nexus then it is nexus that does all the internet communication (and therefore doesn't suffer this problem)
For all your maven repository needs your internal machines talk to nexus only.
You will only need a proxy for non-maven repository things, like javadoc link aggregation.

Show
Barrie Treloar added a comment - As Jason says in the comment above: If you are using nexus then it is nexus that does all the internet communication (and therefore doesn't suffer this problem) For all your maven repository needs your internal machines talk to nexus only. You will only need a proxy for non-maven repository things, like javadoc link aggregation.
Hide
Francis De Brabandere added a comment -

We actually use nexus but for some reason we can not add jboss to it. It's not because tools like nexus exist that this should not be fixed.

Show
Francis De Brabandere added a comment - We actually use nexus but for some reason we can not add jboss to it. It's not because tools like nexus exist that this should not be fixed.
Hide
David Smiley added a comment -

I'm shocked so perhaps I'm misunderstanding things. I work in an enterprise environment with an HTTP proxy server used for both http (80), https (443), and FTP. The title of this JIRA issue suggests a use-case involving multiple proxies but I'm really talking about one proxy server. Java allows me to specify an appropriate proxy configuration for my situation on the command line when I invoke a Java command. Maven is built on Java so I'd think Maven would support this. Yet is Jason basically saying that Maven doesn't support a single proxy server being used for both http and https? What's unusual about that?

http://download.oracle.com/javase/6/docs/technotes/guides/net/proxies.html

And by the way I am using a maven repo manager but it's corporate wide (and I work for a large corporation) and I'm not about to request it mirror a repo that exists for exactly one project. By the way, the external repo happens to be an svn repository that exists for a project I'm collaborating on with an external party, just between us. It's a convenient way for me to use Maven to keep artifacts that aren't available broadly.

Show
David Smiley added a comment - I'm shocked so perhaps I'm misunderstanding things. I work in an enterprise environment with an HTTP proxy server used for both http (80), https (443), and FTP. The title of this JIRA issue suggests a use-case involving multiple proxies but I'm really talking about one proxy server. Java allows me to specify an appropriate proxy configuration for my situation on the command line when I invoke a Java command. Maven is built on Java so I'd think Maven would support this. Yet is Jason basically saying that Maven doesn't support a single proxy server being used for both http and https? What's unusual about that? http://download.oracle.com/javase/6/docs/technotes/guides/net/proxies.html And by the way I am using a maven repo manager but it's corporate wide (and I work for a large corporation) and I'm not about to request it mirror a repo that exists for exactly one project. By the way, the external repo happens to be an svn repository that exists for a project I'm collaborating on with an external party, just between us. It's a convenient way for me to use Maven to keep artifacts that aren't available broadly.

People

Vote (7)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: