Jsch和Maven有什么问题? [英] What's wrong with Jsch and Maven?

查看:586
本文介绍了Jsch和Maven有什么问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将Jsch 0.1.44与Maven一起使用.

I try to use Jsch 0.1.44 together with Maven.

我的pom.xml中具有以下依赖项.

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>

如果我运行mvn compile,maven看起来很正常,并告诉我Jsch已成功下载.

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

但是在编译时,找不到Jsch类.如果查看本地存储库,可以看到Jsch-jar的大小只有3kb.如果打开jar文件,我还可以看到只有META-INF文件夹.

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?

推荐答案

由于某种原因,中央存储库中的jar文件似乎已损坏. 解决方案是将另一个Jsch存储库添加到pom.xml.

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>

这篇关于Jsch和Maven有什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆