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 · 8 comments

Comments

Projects
None yet
5 participants
@jgangemi

jgangemi commented Mar 31, 2016

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

This comment has been minimized.

Show comment
Hide comment
@saulvargas

saulvargas Apr 2, 2016

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>

saulvargas commented Apr 2, 2016

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 from how to mirror jitpack.io through nexus to how to proxy jitpack.io through nexus Apr 4, 2016

@TheCK

This comment has been minimized.

Show comment
Hide comment
@TheCK

TheCK 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?

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

This comment has been minimized.

Show comment
Hide comment
@jitpack-io

jitpack-io Jun 14, 2016

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?

Member

jitpack-io commented Jun 14, 2016

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

This comment has been minimized.

Show comment
Hide comment
@jgangemi

jgangemi Jun 14, 2016

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.

jgangemi commented Jun 14, 2016

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

This comment has been minimized.

Show comment
Hide comment
@TheCK

TheCK 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 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

This comment has been minimized.

Show comment
Hide comment
@TheCK

TheCK 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.

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

This comment has been minimized.

Show comment
Hide comment
@arbitorius

arbitorius Dec 8, 2016

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>

arbitorius commented Dec 8, 2016

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

This comment has been minimized.

Show comment
Hide comment
@jitpack-io

jitpack-io Dec 15, 2016

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

Member

jitpack-io commented Dec 15, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment