Grails debugging causes "dependency updates" with maven \ problems with Nexus

I am on a corporate network, so we use Nexus to get dependencies. Grails repo has been added to the nexus repository, so now all that remains is to configure grails to use nexus.

To develop Java Maven projects, I needed to specify which file settings.xmlshould pay attention to the Nexus URL, and the credentials were saved there.

Now we move on to Grails and when creating a new project, grails hangs when you configure the class-path for about 200 seconds (since it is configured to timeout after 200 seconds), and then says:

Resolve error obtaining dependencies: Failed to read artifact descriptor for jline:jline:jar:2.12 (Use --stacktrace to see the full trace)
Error |
Required Grails build dependencies were not found. This is normally due to internet connectivity issues (such as a misconfigured proxy) or missing repositories in grails-app/conf/BuildConfig.groovy. Please verify your configuration to continue.
Process was killed

Now this is probably the problem with the repo configuration, however I cannot debug it correctly.

I tried to call grails refresh-dependencies --stacktrace, I tried to change the registration from errorto debugand traceto Config.groovy. I tried to write the settings to verbosein BuildConfig.groovy(but this is for Ivy, and we use Maven, so of course it does nothing), and now I'm not sure what to do.

If this helps, here is my current repo configuration in BuildConfig.groovy:

repositories {
    //inherits true // Whether to inherit repository definitions from plugins       

    grailsPlugins()
    grailsHome()
    mavenLocal()

    mavenRepo(id:'nexusconf', url:"https://nexusurl/repository/rootrepo/") {
        auth username: "user", password: "pass"
    }
    //grailsCentral()
    //mavenCentral()
    // uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories          
    //mavenRepo "http://repository.codehaus.org"
    //mavenRepo "http://download.java.net/maven/2/"
    //mavenRepo "http://repository.jboss.com/maven2/"
}
+4
source share
1 answer

, , grails , ( grails.project.dependency.resolver BuildConfig). grails 2.4.4, , BuildConfig, USER_HOME/.grails/settings.groovy. Ivy USER_HOME/.grails/settings.groovy.

:


, :

mavenRepo(url:"http://localhost:8082/myrepo") { auth username: "foo", password: "bar" }

:

mavenRepo(id:'myrepo', url:"http://localhost:8082/myrepo")

USER_HOME/.grails/settings.groovy:

grails.project.dependency.authentication = { credentials { id = "myrepo" username = "admin" password = "password" } }

Ivy

, :

credentials { realm = ".." host = "localhost" username = "myuser" password = "mypass" }

USER_HOME/.grails/settings.groovy, grails.project.ivy.authentication:

grails.project.ivy.authentication = { credentials { realm = ".." host = "localhost" username = "myuser" password = "mypass" } }

+2

Source: https://habr.com/ru/post/1568880/


All Articles