Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

333
Vistas
How to manage different maven setting in eclipse for different projects?

I am working on two different projects, Both uses different maven .settings.xml files.
When I switch between the projects, it re downloads all the maven dependencies in repository folder removing previous projects' dependencies.
Is there any way I can use two settings and it maintains different repository for both projects.

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

You can try to separate the two projects in different workspaces and you can configure each workspace with eclipse, it is possible because eclipse saves the configuration within each workspace, so you can specify the different repositories with their maven settings.xml files.

For to do that, launch eclipse > go to preferences > choose maven > User Settings and click on "Update Settings"

enter image description here

UPDATE:

You should have a structure similar to the following:

Workspaces:

/Volumes/Stonehall/juanca/workspace-project-1/
/Volumes/Stonehall/juanca/workspace-project-2/

Repositories:

/Volumes/Stonehall/juanca/.m2/settings-project-1.xml
/Volumes/Stonehall/juanca/.m2/settings-project-2.xml

Open and edit settings-project-1.xml file. Searchs the localRepository tag and replace the path, for example:

<localRepository>/Volumes/Stonehall/juanca/.m2/repository-1/</localRepository>

Open and edit settings-project-2.xml file. Searchs the localRepository tag and replace with the other path, for example:

<localRepository>/Volumes/Stonehall/juanca/.m2/repository-2/</localRepository>

Important: checks that the <localRepository> tag is not commented for example:

<!--
...
<localRepository>/Volumes/Stonehall/juanca/.m2/repository/</localRepository>
-->

Eclipse:

Open the workspace-project-1, go to preferences > choose maven > User Settings and click on "Update Settings" and replace with the new path:

/Volumes/Stonehall/juanca/.m2/settings-project-1.xml

The same way you should do for the workspace-project-2, open the workspace-project-2 and go to preferences > choose maven > User Settings and click on "Update Settings" and replace with the other path:

/Volumes/Stonehall/juanca/.m2/settings-project-2.xml

With this configuration each project should download the dependencies in the differents repositories.

This configuration should work, but in case does not work, you should post your settings.xml file and the pom files of both projects, so that we can help you better

over 4 years ago · Santiago Trujillo Denunciar

0

You can create 2 separate workspaces in Eclipse. In each workspaces, you can provide respective settings.xml file

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda