Quantcast

BuildConfig dependencies on Secured Maven repos

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

BuildConfig dependencies on Secured Maven repos

Marco Vermeulen
Hi all,

I am currently faced with a problem when I pull in dependencies from a secured maven repo.

I'm doing this within the context of a CloudBees Jenkins build, but this should be true whenever trying to access any mavenrepo over https. I have the following in my BuildConfig.groovy:

    repositories {
        .....
        mavenRepo "https://repository-company.forge.cloudbees.com/private/"
        .....
    }

    dependencies {
        .....
        compile "com.company.apps.catalogue:catalogue-common:1.0.33"
        .....
    }

    credentials {
        realm = "company"
        host = "repository-company.forge.cloudbees.com"
        username = "myname"
        password = "mypassword"
    }

When I turn my logging to verbose in the BuildConfig, I see the following lines in the dump:
....
tried https://repository-company.forge.cloudbees.com/private/com/company/apps/catalogue/catalogue-common/1.0.33/catalogue-common-1.0.33.pom
CLIENT ERROR: Authorization Required url=https://repository-company.forge.cloudbees.com/private/com/company/apps/catalogue/catalogue-common/1.0.33/catalogue-common-1.0.33.pom

tried https://repository-company.forge.cloudbees.com/private/com/company/apps/catalogue/catalogue-common/1.0.33/catalogue-common-1.0.33.jar
CLIENT ERROR: Authorization Required url=https://repository-company.forge.cloudbees.com/private/com/company/apps/catalogue/catalogue-common/1.0.33/catalogue-common-1.0.33.jar
        https://repository-company.forge.cloudbees.com/private/: no ivy file nor artifact found for com.company.apps.catalogue#catalogue-common;1.0.33
....

The Grails docs seem to have no information regarding secured maven repos. Am I going in the right direction or should I be trying something else?

Hope someone can help me!
Cheers,
Marco.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BuildConfig dependencies on Secured Maven repos

Matthias Hryniszak
I've stumbled upon this a while back myself and ended up setting up a separate Nexus instance that's not secured. But if someone can share information about how to access restricted Maven repositories it'd be great.

Matthias

2012/2/15 Marco Vermeulen <[hidden email]>
Hi all,

I am currently faced with a problem when I pull in dependencies from a
secured maven repo.

I'm doing this within the context of a CloudBees Jenkins build, but this
should be true whenever trying to access any mavenrepo over https. I have
the following in my BuildConfig.groovy:



When I turn my logging to verbose in the BuildConfig, I see the following
lines in the dump:


The Grails docs seem to have no information regarding secured maven repos.
Am I going in the right direction or should I be trying something else?

Hope someone can help me!
Cheers,
Marco.

--
View this message in context: http://grails.1312388.n4.nabble.com/BuildConfig-dependencies-on-Secured-Maven-repos-tp4390955p4390955.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BuildConfig dependencies on Secured Maven repos

Ian Roberts
In reply to this post by Marco Vermeulen
On 15/02/2012 16:12, Marco Vermeulen wrote:
>     credentials {
>         realm = "company"
>         host = "repository-company.forge.cloudbees.com"
>         username = "myname"
>         password = "mypassword"
>     }

Are you sure that's the right realm?  If you try and go to
https://repository-company.forge.cloudbees.com/private/ in your browser
what realm does it say in the authentication challenge?

Ian

--
Ian Roberts               | Department of Computer Science
[hidden email]  | University of Sheffield, UK

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BuildConfig dependencies on Secured Maven repos

Marco Vermeulen
Hi Ian,

The 'company' is just a pseudonym for our own. I don't want to go broadcasting our private secured repos to the world ;-)

When I insert our company name it challenges you for credentials.

Cheers,
Marco.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BuildConfig dependencies on Secured Maven repos

Ian Roberts
On 15/02/2012 17:33, Marco Vermeulen wrote:
> Hi Ian,
>
> The 'company' is just a pseudonym for our own. I don't want to go
> broadcasting our private secured repos to the world ;-)
>
> When I insert our company name it challenges you for credentials.

Yes, and as part of that challenge it includes a string that is called
the "realm" - your browser might call it the "message" or "description"
but the name for it in HTTP terms is the realm.

https://repository-cloudbees.forge.cloudbees.com/private/ gives me a
realm of "cloudbees repository" so I suspect a similar pattern would
apply to yours.

Ian

--
Ian Roberts               | Department of Computer Science
[hidden email]  | University of Sheffield, UK

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BuildConfig dependencies on Secured Maven repos

Marco Vermeulen
Thanks Ian,

Can't believe I missed that :-)

Added the correct realm from the challenge and it all worked!

Cheers,
Marco.
Loading...