Groovy/Grails unable to resolve class only @ run -


have groovy controller leveraging java ssh package (jsch) no issues in ide (jar added library, import works, calls against class pass) failure on run-app:

unable resolve class jsch @ ... : jsch jsch = new jsch() 

i use same code in java without issues sftp application , won't instantiate initial object less concerned rest of code. i've tried mucking dependency mgmt , refreshing no success.

i guess question @ hand why class fail resolve @ run when there no obvious issues implementation?

yeah... grails doesn't give damn jars add ide. grails uses maven resolve dependencies.

next steps

the first thing remove jsch jar. then, add following maven artifact project: com.jcraft:jsch:0.1.53

of course, adjust version number needed. how added grails depends on version of grails you're using.

grails 3

add following dependencies closure in build.gradle:

compile 'com.jcraft:jsch:0.1.53' 

grails 2.4

for grails 2.4 (and maybe earlier versions, don't know) add following within plugins closure in grails-app/config/buildconfig.groovy

compile 'com.jcraft:jsch:0.1.53' 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -