Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to proxy jitpack.io through nexus #506

Closed
jgangemi opened this issue Mar 31, 2016 · 11 comments
Closed

how to proxy jitpack.io through nexus #506

jgangemi opened this issue Mar 31, 2016 · 11 comments

Comments

@jgangemi
Copy link

we run a private nexus repository at work and proxy maven central, etc. i'm not having any lucky setting up a proxy and was hoping you could provide the correct configuration settings.

thanks!!

@saulvargas
Copy link

I have a similar situation at work, the following lines in my settings.xml fixed it for me:

        <mirror>
            <id>COMPANY-nexus</id>
            <mirrorOf>*,!jitpack.io</mirrorOf>
            <url>COMPANY MIRROR</url>
        </mirror>
        <mirror>
            <id>jitpack.io</id>
            <mirrorOf>jitpack.io</mirrorOf>
            <url>https://jitpack.io</url>
        </mirror>

@jitpack-io jitpack-io changed the title how to mirror jitpack.io through nexus how to proxy jitpack.io through nexus Apr 4, 2016
@TheCK
Copy link

TheCK commented Jun 14, 2016

I've run into the same issue. I'm suspecting the problem is that jitpack does not allow indexing of it's build artifacts.

Any progress on this?

@jitpack-io
Copy link
Member

It's true that jitpack doesn't publish an index though not sure why that would prevent proxying.
There are some settings.xml changes mentioned earlier. Do those help at all?

@jgangemi
Copy link
Author

if you're trying to mirror through nexus, there is an option to turn off generating the remote index. i have to do that in order to mirror one of adobe's sites.

@TheCK
Copy link

TheCK commented Jun 15, 2016

The fix for the settings.xml does indeed work. however that just circumvents our company's nexus altogether.

Nexus does seem to create an index and if it does not have one does not seem to look for any artifacts for that repo. I will try to find the option to disable the remote index as @jgangemi suggested. However we are running an old version of Nexus, so I have to see if it supports that.

Thanks for your suggestions so far.

@TheCK
Copy link

TheCK commented Jun 15, 2016

OK I've tried to turn off indexing. But Nexus is still refusing to talk to jitpack.io. When I save the configuration it tries do communicate with jitpack.io but encounters some error. No idea which since it's HTTPS. And Nexus does not show a warning or error anywhere.
Whenever I try to get the dependency from Nexus no further communication between Nexus and jitpack.io happens.

@arbitorius
Copy link

Same Problem here... no luck proxying jitpack via Nexus.
The most convenient solution i found , which is just a tuned version of the above mentioned which bypasses nexus, is to exclude jitpack.io from the main mirror.

  <mirror>
    <id>nexus</id>
    <mirrorOf>*,!jitpack.io</mirrorOf>
    <url>http://company.com/nexus</url>
  </mirror>

And to create a profile which is added to the active profiles. This way you only have to put the desired dependencies into your pom and omit the repository declaration.

  <profile>
    <id>jitpack</id>
    <repositories>
      <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
      </repository>
    </repositories>
  </profile>

  <activeProfiles>
       <activeProfile>jitpack</activeProfile>
  </activeProfiles>

@jitpack-io
Copy link
Member

Hi all,

We've deployed a fix that should solve proxying via Nexus: https://issues.sonatype.org/browse/NEXUS-9890

Tested using Nexus 2 and 3.

To proxy JitPack:

  1. Add https://jitpack.io as a new maven2 (proxy) repository in Nexus (example)
  2. Add that repository to Maven-public group (example)

Let us know if you still experience any issues.

image

@ben-xo
Copy link

ben-xo commented Sep 26, 2019

Just wanted to say that @saulvargas answer for settings.xml is still relevant and useful, and that's what I came here for.

@l3ender
Copy link

l3ender commented Feb 26, 2020

@jitpack-io's answer (#506 (comment)) worked for us using Nexus 3.15.

@Lonzak
Copy link

Lonzak commented Nov 22, 2023

I have nexus 3.59 but it still doesn't sync with jitpack :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants