Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's wrong with Jsch and Maven?

Tags:

maven

jsch

I try to use Jsch 0.1.44 together with Maven.

I have the following dependency in my pom.xml.

<dependency>
    <groupId>com.jcraft</groupId>
    <artifactId>jsch</artifactId>
    <version>0.1.44</version>
    <scope>compile</scope>
</dependency>

If I run mvn compile maven looks normal and tells me that Jsch has been successful downloaded.

But when it comes to compile, the Jsch classes could not be found. If I look into my local repository I can see that the Jsch-jar has only a size of 3kb. If I open the jar file I can also see that there is only the META-INF folder.

So what is wrong here, how can I fix this?

like image 820
flash Avatar asked Dec 17 '22 09:12

flash


1 Answers

For some reason the jar file in the central repository seems to be broken. The solution is to add another repository for Jsch to the pom.xml.

<repository>
    <id>Jsch</id>
    <url>http://jsch.sf.net/maven2/</url>
</repository>
like image 96
flash Avatar answered Jan 13 '23 00:01

flash