使用sftp和Maven上载目录 [英] Uploading a directory using sftp with Maven

查看:87
本文介绍了使用sftp和Maven上载目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Maven中使用具有公共密钥身份验证的sftp上载目录-Eclipse更新站点?

How can I upload a directory - Eclipse update site - using sftp with public key authentication in Maven?

有关背景信息:我正在使用tycho构建Eclipse插件,并希望将更新站点(<packaging>eclipse-update-site</packaging>)上传.

For background information: I'm using tycho to build an Eclipse plugin and want to get the update site ( <packaging>eclipse-update-site</packaging>) uploaded.

在Tycho用户列表中要求为好.

推荐答案

我不明白为什么您不能使用mvn deploy来部署eclipse-update-site工件.所以,这是我的建议.

I don't get why you couldn't use mvn deploy to deploy your eclipse-update-site artifact. So, this is my suggestion.

首先,更新您的distributionManagement部分:

<!-- Enabling the use of FTP -->
<distributionManagement>
  <repository>
    <id>update-site</id>
    <url>sftp://your/url</url>
  </repository>
</distributionManagement>

然后,为sftp添加旅行车扩展名:

Then, add the wagon extension for sftp:

<build>
  <extensions>
    <extension>
      <groupId>org.apache.maven.wagon</groupId>
       <artifactId>wagon-ssh</artifactId>
       <version>1.0-beta-6</version>
    </extension>
  </extensions>
</build>

最后,将凭据添加到您的~/.m2/settings.xml:

Finally, add the credentials into your ~/.m2/settings.xml:

<server>
  <id>update-site</id>
  <username>foo</username>
  <password>secret</password>
</server>

然后运行mvn deploy.

这篇关于使用sftp和Maven上载目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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