How to use Maven behind the UTBM Proxy

Contents


This page describes the configuration of Maven that must be used behind the proxy of the UTBM. The proxy of the UTBM corrupts the Jar files downloaded by Maven, randomly. To solve this problem, we provide a gateway for Maven.


Caution: This page gives the guidelines for the Linux operating system. If they differ on the other operating systems, please send an email to St├ęphane GALLAND with the changes of the guidelines.

Changing the configuration of Maven

You must update your $HOME/.m2/settings.xml with the configuration lines below.

Use the proxy of the UTBM

You must notify Maven that it must use a proxy:

 <proxies>
  <proxy>
   <active>true</active>
   <protocol>http</protocol>
   <host>proxy.utbm.fr</host>
   <port>3128</port>
   <!-- <nonProxyHosts>*.utbm.fr</nonProxyHosts> -->
  </proxy>
 </proxies>

Use the gateway for the repository servers

For each Maven repository server, you must declare a mirror in the Maven settings. Below, you could find the standard list of mirrors that is used by the Multiagent group.


Caution: You must be sure that the id of the server put in the >mirrorOf /< is corresponding to the repository server id that you have put in your pom.xml.


<mirrors>
	<mirror>
		<id>devmas-set-central-mirror</id>
		<name>Secure Central Mirror</name>
		<url>https://devmas-set.utbm.fr/aproxy/index.php?url=http://repo1.maven.org/maven2/</url>
		<mirrorOf>central</mirrorOf>
	</mirror>
	<mirror>
		<id>devmas-set-codehaus-mirror</id>
		<name>Secure CodeHaus Mirror</name>
		<url>https://devmas-set.utbm.fr/aproxy/index.php?url=http://snapshots.repository.codehaus.org/</url>
		<mirrorOf>org.codehaus-maven</mirrorOf>
	</mirror>
	<mirror>
                <id>devmas-set-arakhne-mirror</id>
                <name>Secure Arakhne.org Mirror</name>
                <url>https://devmas-set.utbm.fr/aproxy/index.php?url=http://download.tuxfamily.org/arakhne/maven/</url>
                <mirrorOf>org.arakhne-maven</mirrorOf>
        </mirror>
	<mirror>
                <id>devmas-set-janus-mirror</id>
                <name>Secure Janus-Project Mirror</name>
                <url>https://devmas-set.utbm.fr/janus/maven/</url>
                <mirrorOf>org.janus-project.maven</mirrorOf>
        </mirror>
	<mirror>
                <id>devmas-set-java-net-mirror</id>
                <name>Secure Java.net Mirror</name>
                <url>https://devmas-set.utbm.fr/aproxy/index.php?url=http://download.java.net/maven/2/</url>
                <mirrorOf>net.java</mirrorOf>
        </mirror>
	<mirror>
                <id>repository-jboss-org-mirror</id>
                <name>Secure Java.net Mirror</name>
                <url>https://devmas-set.utbm.fr/aproxy/index.php?url=http://repository.jboss.org/nexus/content/groups/public/</url>
                <mirrorOf>repository.jboss.org</mirrorOf>
        </mirror>
	<mirror>
                <id>repository-httptunnel-mirror</id>
                <name>Secure Java.net Mirror</name>
                <url>https://devmas-set.utbm.fr/aproxy/index.php?url=http://bitbucket.org/iainmcgin/netty-httptunnel/raw/tip/repo</url>
                <mirrorOf>repository.httptunnel</mirrorOf>
        </mirror>
</mirrors>

Use your UTBM login to pass the gateway

Your must use your UTBM account to pass the gateway (see the next section for details about the access rights).

For each mirror declared above, you must give the account to use to pass the gateway to the mirror:


Caution: Replace "login" and "pwd" by your UTBM login and password, respectively.


<servers>
  <server>
    <id>fr.utbm.set-maven</id>
    <username>login</username>
    <password>pwd</password>
  </server>
  <server>
    <id>devmas-set-central-mirror</id>
    <username>login</username>
    <password>pwd</password>
  </server>
  <server>
    <id>devmas-set-arakhne-mirror</id>
    <username>login</username>
    <password>pwd</password>
  </server>
  <server>
    <id>devmas-set-janus-mirror</id>
    <username>login</username>
    <password>pwd</password>
  </server>
  <server>
    <id>devmas-set-codehaus-mirror</id>
    <username>login</username>
    <password>pwd</password>
  </server>
  <server>
    <id>devmas-set-java-net-mirror</id>
    <username>login</username>
    <password>pwd</password>
  </server>
  <server>
    <id>repository-jboss-org-mirror</id>
    <username>login</username>
    <password>pwd</password>
  </server>
  <server>
    <id>repository-httptunnel-mirror</id>
    <username>login</username>
    <password>pwd</password>
  </server>
 </servers>

Obtaining the Access to the Gateway

The gateway has not a public access: only the users registered in the UTBM ldap/cas servers can use it, and they must have the right to access to the Gateway. Obtaining an UTBM's account is outside the topic of this page. For obtaining the access right to the gateway, please send an email to St├ęphane GALLAND or Nicolas GAUD with your UTBM login. We will decide if you have the right to access.

This page was last modified on 30 September 2013, at 12:36. This page has been accessed 10,419 times.
Copyright 2010-2018 © Laboratoire Électronique Informatique Image - Université Bourgogne Franche-Comté - Privacy policy