wagon ssh/scp:无连接器可用于使用可用工厂WagonRepositoryConnectorFactory访问类型为default的存储库... [英] wagon ssh / scp: No connector available to access repository ... of type default using the available factories WagonRepositoryConnectorFactory

查看:634
本文介绍了wagon ssh/scp:无连接器可用于使用可用工厂WagonRepositoryConnectorFactory访问类型为default的存储库...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是wagon-ssh 2.10的错误吗?

什么可行?

例如Maven,Wagon-SSH和pom设置的什么组合将使行为恢复到Maven 3.0.5和wagon-ssh 2.4的水平?

E.g. what combination of Maven, Wagon-SSH and pom settings will get the behaviour back that was there with Maven 3.0.5 and wagon-ssh 2.4?

在我的pom.xml中升级到wagon-ssh 2.10之后,根据如何修复或解决旅行车错误?

After upgrading to wagon-ssh 2.10 in my pom.xml to check whether this would fix my problems according to https://issues.apache.org/jira/browse/MDEPLOY-177 see also How to fix or workaround wagon bug?

我收到以下错误消息:

No connector available to access repository XXX-snapshot-repository 
(scp://XXX/srv/repo/snapshots/) of type default 
using the available factories WagonRepositoryConnectorFactory

查看没有可用的连接器使用eclipse以太包通过maven插件进行部署

我以为这可能是Maven版本问题.确实我一直坚持 自 wagon-ssh损坏到旧版3.0.5专家a>个月的SCP转移

I was assuming it might be a maven version problem. Indeed I had been sticking to an older 3.0.5 maven for a while since the wagon-ssh had been broken for scp transfers for many months

mvn --version
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 14:51:28+0100)

所以我升级到了Maven 3.3.3

So i upgraded to Maven 3.3.3

mvn --version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T13:57:37+02:00)

这会稍微修改错误消息:

which slightly modifies the error message:

Cannot access scp://XXX/srv/repo/snapshots/ with type default using the available connector factories: BasicRepositoryConnectorFactory

关注 无法部署Maven项目,没有可用的连接器

似乎有不同类型的ConnectorFactories

there seem to be different types of ConnectorFactories

  1. WagonRepositoryConnectorFactory(Maven 3.0.5)
  2. BasicRepositoryConnectorFactory(Maven 3.3.3)
  3. AetherRepositoryConnectorFactory(Maven吗?)

查看 https://stackoverflow.com/a/18253897/1497139 有指向 http://maven.apache.org/guides的指针/mini/guide-using-extensions.html 用来解释如何添加连接器(6个人赞成此答案)-但我在那儿找不到提及ConnectorFactory的信息.

Looking into https://stackoverflow.com/a/18253897/1497139 there is a pointer to http://maven.apache.org/guides/mini/guide-using-extensions.html which is supposed to explain how to add connectors (6 people upvoted this answer) - but i do not find a mention of ConnectorFactory there.

互联网搜索

wagon-ssh ConnectorFactory scp

具有此问题中已经提到的一些链接,并且:

has some of the links already mentioned in this question and:

有什么方法可以使Maven scp wagon在linux/mac/windows平台上一致地工作?

其中提到了我已经成功使用了大约两年的配置样式.

where the configuration style is mentioned that I had been using successfully for some 2 years now.

我观察到,当我仅在父pom.xml上进行maven安装时,发生了以下下载:

I observed that the following download happened when i did a maven install on the parent pom.xml alone:

mvn install
[INFO] Scanning for projects...
Downloading: http://uk.maven.org/maven2/org/apache/maven/wagon/wagon-provider-api/2.10/wagon-provider-api-2.10.jar
Downloaded: http://uk.maven.org/maven2/org/apache/maven/wagon/wagon-provider-api/2.10/wagon-provider-api-2.10.jar (53 KB at 129.4 KB/sec)

但这不会改变子项目的情况.

But this doesn't change the situation for the child project.

这是pom的摘录:

   <extensions>
        <extension>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-ssh</artifactId>
            <version>2.10</version>
        </extension>
    </extensions>


   <distributionManagement>
        <snapshotRepository>
            <id>XXX-snapshot-repository</id>
            <name>XXX Maven2 Snapshot Repository</name>
            <url>scp://XXX/srv/repo/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

推荐答案

我必须承认我觉得自己有些愚蠢,但由于其他人可能也有类似的问题,因此我将展示解决问题的方法:

I must admit I feel slightly stupid but since others might have similar issues I am showing what resolved the issue:

<parent>
    <groupId>XXX</groupId>
    <artifactId>XXX</artifactId>
    <version>XXX-SNAPSHOT</version>
    <relativePath>../XXX/pom.xml</relativePath>
</parent>

所以上面显示的pom声明根本没有被拾取.

so the pom declarations shown above where merely not being picked up at all.

这篇关于wagon ssh/scp:无连接器可用于使用可用工厂WagonRepositoryConnectorFactory访问类型为default的存储库...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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