miércoles, 12 de noviembre de 2014

Java: Install Maven on Ubuntu 12



sudo apt-get install maven
mvn -version
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.7.0_71, vendor: Oracle Corporation
Java home: /usr/lib/jvm/jdk1.7.0_71/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-69-generic", arch: "amd64", family: "unix"

Probar en eclipse:

Crear un Maven Project.
Si al crear un proyecto Maven en eclipse nos sale este error: "Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repositories"

Podemos ir a Windows-Preference-Maven-UserSettings y agregar el el archivo setting.xml: /etc/maven/settings.xml

Tambien podemos editar el proxy (colocando la informacion necesaria) si fuera necesario editando /etc/maven/settings.xml:
     <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>
      <username>dario</username>
      <password>pass</password>
      <host>proxy.corp.daro.com</host>
      <port>1232</port>
      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
    </proxy>

Y agregar:

<mirror>
  <id>ibiblio.org</id>
  <url>http://mirrors.ibiblio.org/maven2</url>
  <mirrorOf>central</mirrorOf>
</mirror>


To Remove:

sudo apt-get remove maven
sudo apt-get purge maven

No hay comentarios:

Publicar un comentario