• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Concurrent access of maven 1/2 repo

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Our project requires access to maven 1 and 2 repositories since some of use 1 and others use 2.

Is there a way to access/ write a POM in maven 2 to access the dependancies/ jars from maven 1 (v3) and 2 (v4) both?

Any ideas?
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"D P"

Please check your private message for a message from JavaRanch.
 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Are both these repositories "internal"(hosted in your environment) to your project users or you are using the public repositories?
 
Dharmesh Patel
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Anadi Misra:
Hi,

Are both these repositories "internal"(hosted in your environment) to your project users or you are using the public repositories?



Hi Anadi,

There is http://repo1.maven.org/maven/ and http://repo1.xyz.com/java-maven1/repo

I have some of the jars need to access from xyz (maven 1 v3) and some of from maven central (repo1.maven 2 v4).

Firstly I need to look up my projects (xyz) server repository (which is bulit on maven 1). If not available, pull it from maven 2 central repository.

I am searching - how to access maven 1.x repository in maven 2 projects. The hint that i have is:
http://maven.apache.org/guides/mini/guide-using-m1-repos-with-m2.html

I wonder how to write pom dependancies to access maven 1 and 2 both.

Hope my objective is clear to you.

Regards
Dharmesh
 
Anadi Misra
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Firstly I need to look up my projects (xyz) server repository (which is bulit on maven 1). If not available, pull it from maven 2 central repository.



The link has the configuration for older repositories I see, but I am not sure on how to configue any kind of specific order of preference for repositries lookup; something like looking up in repo1 first and then repo2 like you mentioned.

It might be worth-while upgrading to a maven repository manager like Archiva or Nexus which can act as your local mirror for both Maven1 and Maven2 repos.
 
Dharmesh Patel
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Finally i got to access maven 1 repository in maven 2 projects. The thing here is: we need to put group id and artifact id same since maven 1 is not having artifiact id. put the version number that you need to pull from. It creates poms structure to access maven 1.x repo (need to add repository as snapshot (true) and type = legacy.

Hope this helps.
 
eat bricks! HA! And here's another one! And a tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic