Friday, March 8, 2013

Maven on Ubuntu

Install:   sudo apt-get install maven
Verify:    mvn -version

The command apt-get, install the Maven in /usr/share/maven.

maven2/conf/settings.xml

Configure a proxy in settings.xml
  <proxies>
    <proxy>
      <active>true</active>
      <protocol>http</protocol>
      <host>_internal proxy address_</host>
      <port>_proxy port_</port>
      <username>{your_proxyuser}</username>
      <password>{your_proxypassword}</password>
    </proxy>
  </proxies>


Install a jar manually
mvn install:install-file -Dfile= -DgroupId= -DartifactId= -Dversion= -Dpackaging= -DgeneratePom=true

Example
mvn install:install-file -Dfile=/home/kl40306/Desktop/jars/camel-http-2.10.0.fuse-71-047.jar -DgroupId=org.apache.camel -DartifactId=camel-http -Dversion=2.10.0.fuse-71-047 -Dpackaging=jar -DgeneratePom=true

No comments:

Post a Comment