maven proxy madness on windows

Building the spring batch project from subversion.  It's a maven project, so I took to time to install maven onto my new work windows workstation.  I run cygwin on it.

Since I am running behind a http proxy, I needed to configure maven to use this proxy for downloading the its various artifacts.  A quick search pointed me to http://maven.apache.org/guides/mini/guide-proxies.html which I followed, creating a file in my home directory (~/.m2/settings.xml)  However, my proxy setting was never used by maven. 

I never figured out why the settings file in my home directory was not used, but I found a workaround.  I just edited the "settings.xml" file that was in the maven distribution that I extracted.  That's MAVEN_HOME/conf/settings.xml

 

UPDATE:

The windows/maven idea of a home directory is different than the cygwin idea of a home directory.  If in cygwin, and I "cd", by default, I go to my home directory (and home env variable is set to same place).  However, when I run maven, it is referencing:  c:\documents and settings\myid\.m2\repository\ which is different.  I am certain if I put my settings.xml file in this location, it would work.

Go figure.

 

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options