How to overwrite sonatype-public-grid URL for dependency resolution?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to overwrite sonatype-public-grid URL for dependency resolution?

Schulz, Christian
How to overwrite sonatype-public-grid URL for dependency resolution?

Hello,

I want to create a small tool which is using the nexus client. Works fine so far,

But there is a problem with our ci server, because it has no possibility to reach

The internet.

So I have created a proxy repository in Nexus for group sonatype-public-grid,

But how can I overwrite in my pom.xml that maven should use our internal

Nexus instead of trying to reach https://repository.sonatype.org?


Best Regards,

Christian Schulz

This email (including any attachments) may contain confidential and/or
privileged information or information otherwise protected from disclosure.
If you are not the intended recipient, please notify the sender immediately,
do not copy this message or any attachments and do not use it for any
purpose or disclose its content to any person, but delete this message and
any attachments from your system.
Astrium disclaims any and all liability if this email transmission
was virus corrupted, altered or falsified.
----------------------------------------------------------------------------
Astrium GmbH
Vorsitzender des Aufsichtsrates:  Günter Stamerjohanns
Geschäftsführung: Evert Dudok (Vorsitzender), Jens Schomburgk,
Dr. Johannes von Thadden, Thomas S. Mueller
Sitz der Gesellschaft: München -
Registergericht: Amtsgericht München, HRB Nr. 107647
Ust. Ident. Nr. /VAT reg. no. DE167015356
----------------------------------------------------------------------------
Weitere Informationen über EADS Astrium unter www.astrium.eads.net
Reply | Threaded
Open this post in threaded view
|

Re: How to overwrite sonatype-public-grid URL for dependency resolution?

Peter Lynch-2
Hi Christian,


On Wed, Dec 4, 2013 at 10:05 AM, Schulz, Christian <[hidden email]> wrote:

Hello,

I want to create a small tool which is using the nexus client. Works fine so far,

But there is a problem with our ci server, because it has no possibility to reach

The internet.

So I have created a proxy repository in Nexus for group sonatype-public-grid,

But how can I overwrite in my pom.xml that maven should use our internal

Nexus instead of trying to reach https://repository.sonatype.org?


What you would typically do is let your internal Nexus and the CI Maven settings.xml for the job do the heavy lifting.

Also you should not normally need sonatype-public-grid group ( except in some circumstances ) to get the client libraries. These are in Maven central.

So in general

- do not add repositories to your pom.xml
- Add some routing rules to tell your nexus where requests for com.sonatype.nexus and org.sonatype.nexus group ids need to be mapped to.
- Let your CI continue to access a group repo in your internal Nexus and change nothing in CI - it should find the correct artifacts through Nexus.

-Peter
 

Best Regards,

Christian Schulz

This email (including any attachments) may contain confidential and/or
privileged information or information otherwise protected from disclosure.
If you are not the intended recipient, please notify the sender immediately,
do not copy this message or any attachments and do not use it for any
purpose or disclose its content to any person, but delete this message and
any attachments from your system.
Astrium disclaims any and all liability if this email transmission
was virus corrupted, altered or falsified.
----------------------------------------------------------------------------
Astrium GmbH
Vorsitzender des Aufsichtsrates:  Günter Stamerjohanns
Geschäftsführung: Evert Dudok (Vorsitzender), Jens Schomburgk,
Dr. Johannes von Thadden, Thomas S. Mueller
Sitz der Gesellschaft: München -
Registergericht: Amtsgericht München, HRB Nr. 107647
Ust. Ident. Nr. /VAT reg. no. DE167015356
----------------------------------------------------------------------------
Weitere Informationen über EADS Astrium unter www.astrium.eads.net