Search code examples
emailgrails-plugindependency-management

org.springframework#spring-test;latest.release: not found when installing grails mail plugin


I am getting dependency issues when installing the grails mail plugin (grails install-plugin mail). I have also posted this issue in the grails user mailing list as a reply @ the following link: http://grails.1312388.n4.nabble.com/Installing-quot-mail-quot-plugin-fails-td3245058.html

My setup is as follows: Grails app version: 1.3.7 IDE: IntelliJ lib: mail.jar, activation-1.1.jar BuildConfig.groovy: grailsPlugins() grailsHome() grailsCentral() //mavenCentral() When I install the mail plugin I get the following message

    **:: org.springframework#spring-test;latest.release: not found**

What I have tried (All these were suggestion on the link provided above):

  1. Put a runtime dependency as follows (still did not install the plugin): runtime "org.springframework:spring-test:3.0.+"

  2. Exclude the dependency, still no luck at getting the plugin installed. runtime( ':mail:1.0-SNAPSHOT' ) { excludes "spring-test" }

  3. Uncommented mavenCentral(). This got the plugin installed correctly, but it did not show up in IntelliJ under the Plugins section with all the other plugins I am using. So when I was trying to use the Mail plugin either from a controller or from a service like Marc Palmer suggests in the following link the classes were not found: http://s3.amazonaws.com/AnyWare/Blog/Screencasts/Grails%20Rocks%20Screencast%20%231%20-%20Grails%20Mail.mov

Any help would be appreciated.

Thanks, - Dario


Solution

  • I have finally found my own answer again. Basically, it came down to restart intellij and the plugin will show under plugins. For some reason while doing "Grails/Synchronize Grails Settings" was not making the plugin show up.

    So to successfully install the gails mail plugin do as follows

    1. Add activation1-1.jar and mail.jar to your lib folder
    2. In BuildConfig.groovy uncomment mavenCenral()
    3. Run grails command: grails install-plugin mail
    4. In IntelliJ click on Apply Grails Changes to IDEA project structure if asked in the
      yellow popup
    5. If IntelliJ still does not recognize the plugin do Grails/Synchronize Grails either by right clicking on "Plugins" or in the project name
    6. If IntelliJ still does not recognize the plugin, restart IntelliJ do a Grails/Synchronize Grails.
    7. The plugin should be correctly installed and ready to use.