Hi,
 
We need to override the Maven Central Repository and maintain a local
network repository. This has worked fine, up until now, with a <mirror>
setting in the maven settings.xml
 
<settings>
  ...
  <mirrors>
    <mirror>
      <id>mirror-maven-central</id>
      <mirrorOf>central</mirrorOf>
      <name>Local Override for The Maven Central Repository</name>
      <url>file:///\\AUBNVRAT03\repository\</url> <!-- Yes this works
it's how you define a file based repo -->
    </mirror>
  </mirrors>
  ...
</settings>
 
When building a project I noticed that mysteriously Maven was
downloading jibx jars from http://jibx.sf.net/maven Despite the fact
that our network does not allow outbound http traffic and the local
settings.xml file not defining any proxies!
 
On further investigation and debugging I found that the
xfire-jibx-1.2.4.pom in my corporate repository defines a repository
with an id of jibx.sf.net and the rouge url of http://jibx.sf.net/maven
as a workaround I have created another mirror definition that overrides
this repo id and points at my corporate repository.
 
    <mirror>
      <id>mirror-jibx.sf.net</id>
      <mirrorOf>jibx.sf.net</mirrorOf>
      <name>Local Override for Jibx</name>
      <url>file:///\\AUBNVRAT03\repository\</url>
    </mirror>
 
This stops it downloading from a remote source in this case.
 
The questions are: How on earth Maven is picking up proxy settings from
the underlying system is still a mystery. I certainly can't browse to
this repository when I use a Browser with no proxy configured?!
 
Surely this is not desired behaviour, how can I be sure that Maven won't
go sucking jars off the Internet when I don't want it to?
 
 

 

Peter Anning

Sr Software Engineer

 

Dialect Payment Technologies Pty Ltd

 

[EMAIL PROTECTED]

www.dialectpayments.com

 

 

 

 

IMPORTANT NOTICE

-------------------------------

Confidentiality Note: The information contained in this email and any
attachments is confidential and/or privileged. This email and any
attachments are intended to be read only by the person named above. If
the reader of this email and any attachments is not the intended
recipient, or a representative of the intended recipient, you are hereby
notified that any review, dissemination or copying of this email and any
attachments is prohibited. If you have received this email and any
attachments in error, please notify the sender by email, telephone or
fax and return it to the sender at the email address above. 

 

 

Reply via email to