Grails does not recognize any online / plugin depe

2019-05-14 07:42发布

问题:

Trying to run my Grails project on new machine, setup is following:

  • grails 2.3.8
  • java 1.8 - I used to run this project in 1.6 or 7, but I hope, this is not the reason
  • windows XP 32b
  • Idea 12.1.7 Ultimate as IDE

It seems to me that grails cannot download any online dependency, for example below is part of output containing mail and mail-confirmation plugin resolving information. But when I put http path to zip file to browser, it downloads it, so connection to the repository is working on machine.

On machine where project was running before, this configuration worked. I was able to add plugin by editing BuildConfig.groovy, it was dowloaded, added and ready for work with.

Here are some interesting parts of BuildConfig.groovy(I havent left all deps there):

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

        grailsPlugins()
        grailsHome()
        grailsCentral()

        mavenLocal()
        mavenCentral()

        // uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
        //mavenRepo "http://snapshots.repository.codehaus.org"
        //mavenRepo "http://repository.codehaus.org"
        //mavenRepo "http://download.java.net/maven/2/"
        //mavenRepo "http://repository.jboss.com/maven2/"

        // Due to spring security plugins 2.0
        mavenRepo "http://repo.spring.io/milestone"
    }
 dependencies {

        // This dependency is added due to usage of grails mail plugin:
        compile "javax.mail:mail:1.5.0-b01"

    }
 plugins {
        runtime ":hibernate:3.6.10.13"
        runtime ":jquery:1.8.3"
        runtime ":resources:1.2.7"

        // Uncomment these (or add new ones) to enable additional resources capabilities
        //runtime ":zipped-resources:1.0"
        //runtime ":cached-resources:1.0"
        //runtime ":yui-minify-resources:0.1.5"

        build ":tomcat:7.0.52.1"

        runtime ":database-migration:1.4.0"

        // Mail service & mail confirmation providers:
        compile ":mail:1.0.7"
        compile ":email-confirmation:2.0.8"

        compile ":scaffolding:2.0.3"
        compile ":cache:1.0.1"
        compile ":spring-security-core:2.0-RC2"
        compile ":spring-security-acl:2.0-RC1"
        compile ":lang-selector:0.3"
        compile ":i18n-templates:1.1.0.1"


    }

Any Ideas, do I have to install ivy, maven or something else manualy? Or where should I look to get information what exactly failed?

It is new system so there is not much more than tools I described above.

Thanks in advance!

Output:

|Configuring classpath
:: problems summary ::
:::: WARNINGS
        module not found: org.grails.plugins#mail;1.0.7

    ==== grailsPlugins: tried

      -- artifact org.grails.plugins#mail;1.0.7!mail.zip:

      C:\Documents and Settings\admin\IdeaProjects\CarEcho\lib\mail-1.0.7.zip

    ==== grailsHome: tried

      C:\Program Files\grails-2.3.8\lib\org.grails.plugins\mail\ivy-1.0.7.xml

      -- artifact org.grails.plugins#mail;1.0.7!mail.zip:

      C:\Program Files\grails-2.3.8\lib\org.grails.plugins\mail\jars\mail-1.0.7.zip

      C:\Program Files\grails-2.3.8\lib\org.grails.plugins\mail\bundles\mail-1.0.7.zip

    ==== grailsHome: tried

      C:\Program Files\grails-2.3.8\dist\mail-1.0.7.pom

      -- artifact org.grails.plugins#mail;1.0.7!mail.zip:

      C:\Program Files\grails-2.3.8\dist\mail-1.0.7.zip

    ==== grailsHome: tried

      C:\Documents and Settings\admin\.grails\2.3.8\cached-installed-plugins\mail-1.0.7.xml

      -- artifact org.grails.plugins#mail;1.0.7!mail.zip:

      C:\Documents and Settings\admin\.grails\2.3.8\cached-installed-plugins\mail-1.0.7.zip

    ==== grailsHome: tried

      C:\Program Files\grails-2.3.8\plugins\mail-1.0.7.pom

      -- artifact org.grails.plugins#mail;1.0.7!mail.zip:

      C:\Program Files\grails-2.3.8\plugins\mail-1.0.7.zip

    ==== grailsCentral: tried

      http://grails.org/plugins/grails-mail/tags/RELEASE_1.0.7/mail-1.0.7.pom

      -- artifact org.grails.plugins#mail;1.0.7!mail.zip:

      http://grails.org/plugins/grails-mail/tags/RELEASE_1.0.7/grails-mail-1.0.7.zip

    ==== localMavenResolver: tried

      C:\Documents and Settings\admin\.m2\repository\org/grails/plugins\mail\1.0.7\mail-1.0.7.pom

      -- artifact org.grails.plugins#mail;1.0.7!mail.zip:

      C:\Documents and Settings\admin\.m2\repository\org/grails/plugins\mail\1.0.7\mail-1.0.7.zip

    ==== mavenCentral: tried

      http://repo1.maven.org/maven2/org/grails/plugins/mail/1.0.7/mail-1.0.7.pom

      -- artifact org.grails.plugins#mail;1.0.7!mail.zip:

      http://repo1.maven.org/maven2/org/grails/plugins/mail/1.0.7/mail-1.0.7.zip

    ==== http://repo.spring.io/milestone: tried

      http://repo.spring.io/milestone/org/grails/plugins/mail/1.0.7/mail-1.0.7.pom

      -- artifact org.grails.plugins#mail;1.0.7!mail.zip:

      http://repo.spring.io/milestone/org/grails/plugins/mail/1.0.7/mail-1.0.7.zip

        module not found: org.grails.plugins#email-confirmation;2.0.8

    ==== grailsPlugins: tried

      -- artifact org.grails.plugins#email-confirmation;2.0.8!email-confirmation.zip:

      C:\Documents and Settings\admin\IdeaProjects\CarEcho\lib\email-confirmation-2.0.8.zip

    ==== grailsHome: tried

      C:\Program Files\grails-2.3.8\lib\org.grails.plugins\email-confirmation\ivy-2.0.8.xml

      -- artifact org.grails.plugins#email-confirmation;2.0.8!email-confirmation.zip:

      C:\Program Files\grails-2.3.8\lib\org.grails.plugins\email-confirmation\jars\email-confirmation-2.0.8.zip

      C:\Program Files\grails-2.3.8\lib\org.grails.plugins\email-confirmation\bundles\email-confirmation-2.0.8.zip

    ==== grailsHome: tried

      C:\Program Files\grails-2.3.8\dist\email-confirmation-2.0.8.pom

      -- artifact org.grails.plugins#email-confirmation;2.0.8!email-confirmation.zip:

      C:\Program Files\grails-2.3.8\dist\email-confirmation-2.0.8.zip

    ==== grailsHome: tried

      C:\Documents and Settings\admin\.grails\2.3.8\cached-installed-plugins\email-confirmation-2.0.8.xml

      -- artifact org.grails.plugins#email-confirmation;2.0.8!email-confirmation.zip:

      C:\Documents and Settings\admin\.grails\2.3.8\cached-installed-plugins\email-confirmation-2.0.8.zip

    ==== grailsHome: tried

      C:\Program Files\grails-2.3.8\plugins\email-confirmation-2.0.8.pom

      -- artifact org.grails.plugins#email-confirmation;2.0.8!email-confirmation.zip:

      C:\Program Files\grails-2.3.8\plugins\email-confirmation-2.0.8.zip

    ==== grailsCentral: tried

      http://grails.org/plugins/grails-email-confirmation/tags/RELEASE_2.0.8/email-confirmation-2.0.8.pom

      -- artifact org.grails.plugins#email-confirmation;2.0.8!email-confirmation.zip:

      http://grails.org/plugins/grails-email-confirmation/tags/RELEASE_2.0.8/grails-email-confirmation-2.0.8.zip

    ==== localMavenResolver: tried

      C:\Documents and Settings\admin\.m2\repository\org/grails/plugins\email-confirmation\2.0.8\email-confirmation-2.0.8.pom

      -- artifact org.grails.plugins#email-confirmation;2.0.8!email-confirmation.zip:

      C:\Documents and Settings\admin\.m2\repository\org/grails/plugins\email-confirmation\2.0.8\email-confirmation-2.0.8.zip

    ==== mavenCentral: tried

      http://repo1.maven.org/maven2/org/grails/plugins/email-confirmation/2.0.8/email-confirmation-2.0.8.pom

      -- artifact org.grails.plugins#email-confirmation;2.0.8!email-confirmation.zip:

      http://repo1.maven.org/maven2/org/grails/plugins/email-confirmation/2.0.8/email-confirmation-2.0.8.zip

    ==== http://repo.spring.io/milestone: tried

      http://repo.spring.io/milestone/org/grails/plugins/email-confirmation/2.0.8/email-confirmation-2.0.8.pom

      -- artifact org.grails.plugins#email-confirmation;2.0.8!email-confirmation.zip:

      http://repo.spring.io/milestone/org/grails/plugins/email-confirmation/2.0.8/email-confirmation-2.0.8.zip

回答1:

Try adding this to your repositories in BuildConfig.groovy. It should make it work.

mavenRepo "https://repo.grails.org/grails/plugins"