0

I am posting this after spending significant amount of time reasearching about JAVA libraries to help SFTP a file. And I have read across couple of posts as well. Looking at the code samples in this post- How to retrieve a file from a server via SFTP?

I found the Jcraft jar for which I had to create a dependency in my pom, but inspite of that I am not able to see the import classes like Jsch , ChannelSFTP. Any help is appreciated ?

Community
  • 1
  • 1
user754036
  • 537
  • 6
  • 8

2 Answers2

0

Add this to your pom

<dependency>
    <groupId>com.jcraft</groupId>
    <artifactId>jsch</artifactId>
    <version>0.1.53</version>
</dependency>

If you still don't see paste your pom file here.. There must be some issue with that.

0

What I was doing wrong: I was adding the dependency under the <dependencyManagement> tag.

What I did and it fixed the problem: I added the dependency under the <dependencies> tag.

Community
  • 1
  • 1
user754036
  • 537
  • 6
  • 8