【问题标题】:Deploy a maven site into Alfresco through FTP通过 FTP 将 maven 站点部署到 Alfresco
【发布时间】:2012-03-27 11:04:42
【问题描述】:

我目前在将 maven 站点部署到 Alfresco 时遇到了一些问题。

在我的公司,我们在锻造中使用 Alfresco 作为 ECM。 由于此工具支持 FTP,并且可以索引任何类型的文本文档的所有内容,我想将我的 maven 站点推送到。

但即使我能够通过 Alfresco 上的 FTP 手动部署站点,或者使用 maven 自动上传,我也无法将两者结合起来:

这里是我的 pom.xml

<distributionManagement>
    [...]
    <site>
        <id>forge-alfresco</id>
        <name>Serveur Alfresco de la Forge</name>
        <url>ftp://alfresco.mycompany.corp/Alfresco/doc/site</url>
    </site>
</distributionManagement>

<build>
    <extensions>
        <!-- Enabling the use of FTP -->
        <extension>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-ftp</artifactId>
            <version>2.2</version>
        </extension>
    </extensions>
</build>

这里是我的 settings.xml 的一部分

<servers>
    <server>
        <id>forge-alfresco</id>
        <username>jrrevy</username>
        <password>xxxxxxxx</password>
    </server>
</servers>

当我尝试使用 site:deploy 进行部署时,我遇到了这样的问题: [信息] [站点:部署{执行:默认-cli}] 收到的回复:220 FTP 服务器就绪

Command sent: USER jrrevy

Reply received: 331 User name okay, need password for jrrevy

Command sent: PASS xxxxxx

Reply received: 230 User logged in, proceed

Command sent: SYST

Reply received: 215 UNIX Type: Java FTP Server

Remote system is UNIX Type: Java FTP Server
Command sent: TYPE I

Reply received: 200 Command OK

ftp://alfresco.mycompany.corp/Alfresco/doc/site/ - Session: Opened  
[INFO] Pushing D:\project\workspaces\yyyyy\myproject\target\site
[INFO]    >>> to ftp://alfresco.mycompany.corp/Alfresco/doc/site/./
Command sent: CWD /Alfresco/doc/site/

Reply received: 250 Requested file action OK

Recursively uploading directory D:\project\workspaces\yyyyy\myproject\target\site as ./
processing = D:\project\workspaces\yyyyy\myproject\target\site as ./
Command sent: CWD ./

Reply received: 550 Invalid path ./

Command sent: MKD ./

Reply received: 250 /Alfresco/doc/site/.

Command sent: CWD ./

Reply received: 550 Invalid path ./

ftp://alfresco.mycompany.corp/Alfresco/doc/site/ - Session: Disconnecting  
ftp://alfresco.mycompany.corp/Alfresco/doc/site/ - Session: Disconnected
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error uploading site

Embedded error: Unable to change cwd on ftp server to ./ when processing D:\project\workspaces\yyyyy\myproject\target\site

我不知道是什么问题。也许插件版本不兼容...也许 Alfresco 的实现不完全兼容(请原谅我的愤怒;)),也许我错过了服务器属性中的配置。

我真的不知道在哪里寻找,经过一段时间的谷歌搜索,我找不到问题所在。

我已经有了一些解决方法。我会尝试使用 webdav 协议上传网站,并且我可以在我们的 CI 平台上使用一些额外的功能(如部署 Jenkins 的工件),但我真的很想知道问题出在哪里。

有人可以帮我吗?

【问题讨论】:

    标签: maven maven-2 ftp alfresco


    【解决方案1】:

    确实,这看起来像是一个 Alfresco 问题:issues.alfresco.com/jira/browse/ALF-4724。 我是在Alfresco 3.1下运行的,这个问题好像在3.3.5及以上版本解决了。

    【讨论】:

    • 哇,Alfresco 3.1 太旧了……从那以后修复了相当多的错误,可能值得升级!
    • 是的,我知道 :)。我自己的公司在 Alfresco Gold 合作伙伴集成商中。我目前正在使用 Alfresco 4.0.1 进行开发,但我们的软件工厂几年前就被占用了。它发展了一个 efw 周,我会再试一次我的工作。据我测试,它似乎工作:)
    • 如果您有几周不上线,您甚至可以直接升级到 4.0.2(即将到期)
    猜你喜欢
    • 1970-01-01
    • 2010-11-07
    • 2010-11-18
    • 1970-01-01
    • 2015-10-31
    • 2013-01-18
    • 1970-01-01
    • 1970-01-01
    • 2015-02-20
    相关资源
    最近更新 更多