Quantcast

Re: Always the same problems with dependency resolution & authentication with artifactory

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

Re: Always the same problems with dependency resolution & authentication with artifactory

Patrick Hütter
Hi together! I found a solution for my problem! I posted it on stackoverflow, you can find it here: http://stackoverflow.com/questions/24000409/how-to-configure-grails-2-4-0-to-resolve-artifacts-from-artifactory-with-authent/24941868#24941868

Am Montag, 2. Juni 2014 19:48:53 UTC+2 schrieb Patrick Hütter:
Hi together!
It's a problem wich every few months occurs.
I do some grails upgrades and the app can't resolve my artifacts from my secured artifactory repository. This time i did an upgrade to grails 2.4.0 and yet again the problem exists.
I configured my repository as described in the grails documentation (wich seems very outdated) but grails can't resolve my dependencies from our repo. It doesn't authenticate correctly.

So my final questions wich many people already have asked:

How to configure grails (current 2.4.0) with maven as dependency-resolver to work with a private maven respository (artifactory) _with_ authentication correctly? What do i have to write to my BuildConfig to get it working?



This doesn't work:

if (Environment.current == Environment.PRODUCTION) {

            if (grails.project.dependency.resolver == "maven") {
                mavenRepo "<a href="http://repo.myRepoHost.com/plugins-release-local/" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Frepo.myRepoHost.com%2Fplugins-release-local%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHLsFD5P-LzVCl6wx-aixhIl7kPvA';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Frepo.myRepoHost.com%2Fplugins-release-local%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHLsFD5P-LzVCl6wx-aixhIl7kPvA';return true;">http://repo.myRepoHost.com/plugins-release-local/", {
                    auth([
                            username: "reader",
                            password: "readerPw"
                    ])
                }
}

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/a23ce46e-6f9f-4877-8013-a3bf5658e1e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Always the same problems with dependency resolution & authentication with artifactory

Graeme Rocher-2
I don't see how that is a solution, you're allowing anonymous access
to artifactory, essentially disabling security

On Thu, Jul 24, 2014 at 9:02 PM, Patrick Hütter
<[hidden email]> wrote:

> Hi together! I found a solution for my problem! I posted it on
> stackoverflow, you can find it here:
> http://stackoverflow.com/questions/24000409/how-to-configure-grails-2-4-0-to-resolve-artifacts-from-artifactory-with-authent/24941868#24941868
>
>
> Am Montag, 2. Juni 2014 19:48:53 UTC+2 schrieb Patrick Hütter:
>>
>> Hi together!
>> It's a problem wich every few months occurs.
>> I do some grails upgrades and the app can't resolve my artifacts from my
>> secured artifactory repository. This time i did an upgrade to grails 2.4.0
>> and yet again the problem exists.
>> I configured my repository as described in the grails documentation (wich
>> seems very outdated) but grails can't resolve my dependencies from our repo.
>> It doesn't authenticate correctly.
>>
>> So my final questions wich many people already have asked:
>>
>> How to configure grails (current 2.4.0) with maven as dependency-resolver
>> to work with a private maven respository (artifactory) _with_ authentication
>> correctly? What do i have to write to my BuildConfig to get it working?
>>
>>
>>
>> This doesn't work:
>>
>> if (Environment.current == Environment.PRODUCTION) {
>>
>>             if (grails.project.dependency.resolver == "maven") {
>>                 mavenRepo
>> "http://repo.myRepoHost.com/plugins-release-local/", {
>>                     auth([
>>                             username: "reader",
>>                             password: "readerPw"
>>                     ])
>>                 }
>> }
>
> --
> You received this message because you are subscribed to the Google Groups
> "Grails Dev Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grails-dev-discuss/a23ce46e-6f9f-4877-8013-a3bf5658e1e2%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Graeme Rocher
Grails Project Lead
Pivotal

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/CAO_wNodMcjAiAiVMXo7wCZh1JXtii8Fa6Jj2VXzE3WjByG8BjQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Always the same problems with dependency resolution & authentication with artifactory

Patrick Hütter
At first it may look like i'm allowing anonymous access, that's true but in detail i don't. This flag is a general "parent" flag for security wich gets specified by the permissions part in the configuration. Repositories without permissions are public by default and repositories with created permissions can be private (for example if you grant only access from one account or group in the permissions dialog in the repository settings).

Am Freitag, 25. Juli 2014 13:48:02 UTC+2 schrieb Graeme Rocher:
I don't see how that is a solution, you're allowing anonymous access
to artifactory, essentially disabling security

On Thu, Jul 24, 2014 at 9:02 PM, Patrick Hütter
<<a href="javascript:" target="_blank" gdf-obfuscated-mailto="vEVzC0lbe9QJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">whit...@...> wrote:

> Hi together! I found a solution for my problem! I posted it on
> stackoverflow, you can find it here:
> <a href="http://stackoverflow.com/questions/24000409/how-to-configure-grails-2-4-0-to-resolve-artifacts-from-artifactory-with-authent/24941868#24941868" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fstackoverflow.com%2Fquestions%2F24000409%2Fhow-to-configure-grails-2-4-0-to-resolve-artifacts-from-artifactory-with-authent%2F24941868%2324941868\46sa\75D\46sntz\0751\46usg\75AFQjCNHIDZfHqAj_LF9TSlvLF-54IywARw';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fstackoverflow.com%2Fquestions%2F24000409%2Fhow-to-configure-grails-2-4-0-to-resolve-artifacts-from-artifactory-with-authent%2F24941868%2324941868\46sa\75D\46sntz\0751\46usg\75AFQjCNHIDZfHqAj_LF9TSlvLF-54IywARw';return true;">http://stackoverflow.com/questions/24000409/how-to-configure-grails-2-4-0-to-resolve-artifacts-from-artifactory-with-authent/24941868#24941868
>
>
> Am Montag, 2. Juni 2014 19:48:53 UTC+2 schrieb Patrick Hütter:
>>
>> Hi together!
>> It's a problem wich every few months occurs.
>> I do some grails upgrades and the app can't resolve my artifacts from my
>> secured artifactory repository. This time i did an upgrade to grails 2.4.0
>> and yet again the problem exists.
>> I configured my repository as described in the grails documentation (wich
>> seems very outdated) but grails can't resolve my dependencies from our repo.
>> It doesn't authenticate correctly.
>>
>> So my final questions wich many people already have asked:
>>
>> How to configure grails (current 2.4.0) with maven as dependency-resolver
>> to work with a private maven respository (artifactory) _with_ authentication
>> correctly? What do i have to write to my BuildConfig to get it working?
>>
>>
>>
>> This doesn't work:
>>
>> if (Environment.current == Environment.PRODUCTION) {
>>
>>             if (grails.project.dependency.resolver == "maven") {
>>                 mavenRepo
>> "<a href="http://repo.myRepoHost.com/plugins-release-local/" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Frepo.myRepoHost.com%2Fplugins-release-local%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHLsFD5P-LzVCl6wx-aixhIl7kPvA';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Frepo.myRepoHost.com%2Fplugins-release-local%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHLsFD5P-LzVCl6wx-aixhIl7kPvA';return true;">http://repo.myRepoHost.com/plugins-release-local/", {
>>                     auth([
>>                             username: "reader",
>>                             password: "readerPw"
>>                     ])
>>                 }
>> }
>
> --
> You received this message because you are subscribed to the Google Groups
> "Grails Dev Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="vEVzC0lbe9QJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">grails-dev-discuss+unsubscribe@....
> To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="vEVzC0lbe9QJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">grails-de...@googlegroups.com.
> To view this discussion on the web visit
> <a href="https://groups.google.com/d/msgid/grails-dev-discuss/a23ce46e-6f9f-4877-8013-a3bf5658e1e2%40googlegroups.com" target="_blank" onmousedown="this.href='https://groups.google.com/d/msgid/grails-dev-discuss/a23ce46e-6f9f-4877-8013-a3bf5658e1e2%40googlegroups.com';return true;" onclick="this.href='https://groups.google.com/d/msgid/grails-dev-discuss/a23ce46e-6f9f-4877-8013-a3bf5658e1e2%40googlegroups.com';return true;">https://groups.google.com/d/msgid/grails-dev-discuss/a23ce46e-6f9f-4877-8013-a3bf5658e1e2%40googlegroups.com.
>
> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/optout.



--
Graeme Rocher
Grails Project Lead
Pivotal

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/24dc1ed4-a88c-4f14-ab94-02d6da6763e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Always the same problems with dependency resolution & authentication with artifactory

Patrick Hütter
Just for the correct understanding: I have public AND private repositories in my artifactory at the same time.

Am Freitag, 25. Juli 2014 13:54:41 UTC+2 schrieb Patrick Hütter:
At first it may look like i'm allowing anonymous access, that's true but in detail i don't. This flag is a general "parent" flag for security wich gets specified by the permissions part in the configuration. Repositories without permissions are public by default and repositories with created permissions can be private (for example if you grant only access from one account or group in the permissions dialog in the repository settings).

Am Freitag, 25. Juli 2014 13:48:02 UTC+2 schrieb Graeme Rocher:
I don't see how that is a solution, you're allowing anonymous access
to artifactory, essentially disabling security

On Thu, Jul 24, 2014 at 9:02 PM, Patrick Hütter
<[hidden email]> wrote:

> Hi together! I found a solution for my problem! I posted it on
> stackoverflow, you can find it here:
> <a href="http://stackoverflow.com/questions/24000409/how-to-configure-grails-2-4-0-to-resolve-artifacts-from-artifactory-with-authent/24941868#24941868" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fstackoverflow.com%2Fquestions%2F24000409%2Fhow-to-configure-grails-2-4-0-to-resolve-artifacts-from-artifactory-with-authent%2F24941868%2324941868\46sa\75D\46sntz\0751\46usg\75AFQjCNHIDZfHqAj_LF9TSlvLF-54IywARw';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fstackoverflow.com%2Fquestions%2F24000409%2Fhow-to-configure-grails-2-4-0-to-resolve-artifacts-from-artifactory-with-authent%2F24941868%2324941868\46sa\75D\46sntz\0751\46usg\75AFQjCNHIDZfHqAj_LF9TSlvLF-54IywARw';return true;">http://stackoverflow.com/questions/24000409/how-to-configure-grails-2-4-0-to-resolve-artifacts-from-artifactory-with-authent/24941868#24941868
>
>
> Am Montag, 2. Juni 2014 19:48:53 UTC+2 schrieb Patrick Hütter:
>>
>> Hi together!
>> It's a problem wich every few months occurs.
>> I do some grails upgrades and the app can't resolve my artifacts from my
>> secured artifactory repository. This time i did an upgrade to grails 2.4.0
>> and yet again the problem exists.
>> I configured my repository as described in the grails documentation (wich
>> seems very outdated) but grails can't resolve my dependencies from our repo.
>> It doesn't authenticate correctly.
>>
>> So my final questions wich many people already have asked:
>>
>> How to configure grails (current 2.4.0) with maven as dependency-resolver
>> to work with a private maven respository (artifactory) _with_ authentication
>> correctly? What do i have to write to my BuildConfig to get it working?
>>
>>
>>
>> This doesn't work:
>>
>> if (Environment.current == Environment.PRODUCTION) {
>>
>>             if (grails.project.dependency.resolver == "maven") {
>>                 mavenRepo
>> "<a href="http://repo.myRepoHost.com/plugins-release-local/" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Frepo.myRepoHost.com%2Fplugins-release-local%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHLsFD5P-LzVCl6wx-aixhIl7kPvA';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Frepo.myRepoHost.com%2Fplugins-release-local%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHLsFD5P-LzVCl6wx-aixhIl7kPvA';return true;">http://repo.myRepoHost.com/plugins-release-local/", {
>>                     auth([
>>                             username: "reader",
>>                             password: "readerPw"
>>                     ])
>>                 }
>> }
>
> --
> You received this message because you are subscribed to the Google Groups
> "Grails Dev Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to grails-dev-discuss+[hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit
> <a href="https://groups.google.com/d/msgid/grails-dev-discuss/a23ce46e-6f9f-4877-8013-a3bf5658e1e2%40googlegroups.com" target="_blank" onmousedown="this.href='https://groups.google.com/d/msgid/grails-dev-discuss/a23ce46e-6f9f-4877-8013-a3bf5658e1e2%40googlegroups.com';return true;" onclick="this.href='https://groups.google.com/d/msgid/grails-dev-discuss/a23ce46e-6f9f-4877-8013-a3bf5658e1e2%40googlegroups.com';return true;">https://groups.google.com/d/msgid/grails-dev-discuss/a23ce46e-6f9f-4877-8013-a3bf5658e1e2%40googlegroups.com.
>
> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/optout.



--
Graeme Rocher
Grails Project Lead
Pivotal

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/4b592009-534f-422b-8259-90c0a26bdd3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Always the same problems with dependency resolution & authentication with artifactory

Graeme Rocher-2
In reply to this post by Patrick Hütter
Regardless this is nothing we can implement ourselves in Grails, will
need to be implemented by the underlying Eclipse Aether library, so no
point in reopening the issue

On Fri, Jul 25, 2014 at 1:54 PM, Patrick Hütter
<[hidden email]> wrote:

> At first it may look like i'm allowing anonymous access, that's true but in
> detail i don't. This flag is a general "parent" flag for security wich gets
> specified by the permissions part in the configuration. Repositories without
> permissions are public by default and repositories with created permissions
> can be private (for example if you grant only access from one account or
> group in the permissions dialog in the repository settings).
>
> Am Freitag, 25. Juli 2014 13:48:02 UTC+2 schrieb Graeme Rocher:
>>
>> I don't see how that is a solution, you're allowing anonymous access
>> to artifactory, essentially disabling security
>>
>> On Thu, Jul 24, 2014 at 9:02 PM, Patrick Hütter
>> <[hidden email]> wrote:
>> > Hi together! I found a solution for my problem! I posted it on
>> > stackoverflow, you can find it here:
>> >
>> > http://stackoverflow.com/questions/24000409/how-to-configure-grails-2-4-0-to-resolve-artifacts-from-artifactory-with-authent/24941868#24941868
>> >
>> >
>> > Am Montag, 2. Juni 2014 19:48:53 UTC+2 schrieb Patrick Hütter:
>> >>
>> >> Hi together!
>> >> It's a problem wich every few months occurs.
>> >> I do some grails upgrades and the app can't resolve my artifacts from
>> >> my
>> >> secured artifactory repository. This time i did an upgrade to grails
>> >> 2.4.0
>> >> and yet again the problem exists.
>> >> I configured my repository as described in the grails documentation
>> >> (wich
>> >> seems very outdated) but grails can't resolve my dependencies from our
>> >> repo.
>> >> It doesn't authenticate correctly.
>> >>
>> >> So my final questions wich many people already have asked:
>> >>
>> >> How to configure grails (current 2.4.0) with maven as
>> >> dependency-resolver
>> >> to work with a private maven respository (artifactory) _with_
>> >> authentication
>> >> correctly? What do i have to write to my BuildConfig to get it working?
>> >>
>> >>
>> >>
>> >> This doesn't work:
>> >>
>> >> if (Environment.current == Environment.PRODUCTION) {
>> >>
>> >>             if (grails.project.dependency.resolver == "maven") {
>> >>                 mavenRepo
>> >> "http://repo.myRepoHost.com/plugins-release-local/", {
>> >>                     auth([
>> >>                             username: "reader",
>> >>                             password: "readerPw"
>> >>                     ])
>> >>                 }
>> >> }
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Grails Dev Discuss" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to [hidden email].
>> > To post to this group, send email to [hidden email].
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/grails-dev-discuss/a23ce46e-6f9f-4877-8013-a3bf5658e1e2%40googlegroups.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Graeme Rocher
>> Grails Project Lead
>> Pivotal
>
> --
> You received this message because you are subscribed to the Google Groups
> "Grails Dev Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grails-dev-discuss/24dc1ed4-a88c-4f14-ab94-02d6da6763e1%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--
Graeme Rocher
Grails Project Lead
Pivotal

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/CAO_wNoexJKCaWxHXKFUQ-1gjXDJZGX5vGtVPmUvj-O_%2Bje1WVw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Always the same problems with dependency resolution & authentication with artifactory

droggo
This post has NOT been accepted by the mailing list yet.
We don't have any issues with artifactory after we configured it according to:
http://wordpress.transentia.com.au/wordpress/2014/04/09/artifactory-and-grails/

We just have single repo definition (without grailsHome, mavenHome, etc) like:
mavenRepo (id:'libs', url:"http://hostname/artifactory/libs")

Security is configured in $userHome/.m2/settings.xml according to maven documentation.

cheers
Loading...