mail 1.0 plugin: unable to resolve dependencies

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

mail 1.0 plugin: unable to resolve dependencies

Inam
Hi,
I'm using grails version 1.3.7 and mail plugin version 0.9 but now I want to upgrade the plugin to version 1.0, when I do install the plugin (grails install-plugin mail 1.0) it shows me ERRORS:
::::::::::::::::::::::::::::::::::::::::::::::
::          UNRESOLVED DEPENDENCIES         ::
::::::::::::::::::::::::::::::::::::::::::::::
:: javax.activation#activation;1.1: not found

:: org.springframework#spring-test;3.1.0.RELEASE: not found
::::::::::::::::::::::::::::::::::::::::::::::

I have googled it alot also searched the grails user list and found few solutions but nothing works for me, I'm still facing this issue, can any body help?
Reply | Threaded
Open this post in threaded view
|

Re: mail 1.0 plugin: unable to resolve dependencies

jphiloon
I'm pretty vague on this, but I think the activation jar is part of java SE6, and perhaps is therefore not included.  In any case, you should be able to add activation-1.1.jar to your lib.  While we're on this, if you use Tomcat JNDI configuration of mail you must put the mail jar (and maybe activation jar) in the Tomcat lib area and remove the jar from the application.  Put this in BuildConfig.groovy to avoid adding the jars to a prod war:

grails.war.resources = { stagingDir ->
        echo message: "*** StagingDir: $stagingDir"
        echo message: "*** GrailsEnv: ${System.getProperty('grails.env')}"
        if (System.getProperty('grails.env') == 'production') {
                echo "*** Removing mail.jar and activation.jar from WEB-INF/lib/ - must be in Tomcat lib"
                delete {
                        fileset(dir: "${stagingDir}/WEB-INF/lib/", includes: "mail-*.jar, activation-*.jar")
                }
        }
}
Reply | Threaded
Open this post in threaded view
|

Re: mail 1.0 plugin: unable to resolve dependencies

Inam
Thanks for the reply jphiloon.
this is what I did to solve the issue:
download "activation.jar" and  rename it as "activation-1.1"
then download "spring-test-3.0.7.RELEASE.jar" because I could not found "spring-test-3.1.0.RELEASE.jar" , "spring-test-3.0.7.RELEASE" is the latest I find (I wonder why mail-1.0 depends on version 3.1.0). Then I rename "spring-test-3.0.7.RELEASE.jar" as "spring-test-3.1.0.RELEASE.jar"
then put both these jars in my project's lib folder and after that I'm able to install mail-1.0 plugin without any errors.
this is suppose to be a ugly solution I personally don't like it but I was wondering around from three days.