2013-05-13 50 views
0

目前,我們爲Alfresco 3.4.x所做的定製包括六個AMP文件,刪除內部log4j jar,修補幾個jar以糾正CIFS實現中的錯誤以及一打配置文件。到目前爲止,我一直在使用shell腳本構建,但現在我正在切換到ant以符合我們的內部指南。使用ant <apply>在一組模塊上運行alfresco-mmt

如果我明確提及它們,模塊的注入將起作用,例如,

<java dir="." fork="true" jar="${mmt.jar.location}"> 
    <arg line="install ${amp.dir}/cma-alfresco-3.4.6-E-0.amp ${dist.dir}/alfresco.war -force -verbose -nobackup"/> 
</java> 

無論如何,如果我嘗試遍歷所有放在一個目錄模塊,

<apply executable="java" dir="${build.dir}" failonerror="true"> 
    <fileset dir="${amp.dir}"> 
     <include name="*.amp" /> 
    </fileset> 
    <arg value="-jar" /> 
    <arg value="${mmt.jar.location}"/> 
    <arg value="install"/> 
    <srcfile/> 
    <arg value="${dist.dir}/alfresco.war"/> 
    <arg value="-force"/> 
    <arg value="-verbose"/> 
    <arg value="-nobackup"/> 
</apply> 

我得到一個錯誤[apply] 04130000 Error whilst saving modifications file。下面是從控制檯的摘錄:

[apply] Installing AMP 'C:\Users\***\Documents\workspace\AMP_***\amps\cma-alfresco-3.4.6-E-0.amp' into WAR './build/dist/alfresco.war' 
[apply] Adding files relating to version '1.22.0' of module 'RemoteAlfrescoAPIrivet' 
[apply] - File '/WEB-INF/lib/cma-alfresco-3.4.6-E-0.jar' added to war from amp 
[apply] - File '/WEB-INF/lib/commons-httpclient-3.1.jar' added to war from amp 
[...] 
[apply] - File '/WEB-INF/classes/castor/mapping/workflowservice.createpackage.mapping.xml' added to war from amp 
[apply] - Directory '/WEB-INF/classes/castor/mapping' added to war 
[apply] - Directory '/WEB-INF/classes/castor' added to war 
[apply] 04130000 Error whilst saving modifications file. 
[apply] Module managment tool available commands: 
[apply] ----------------------------------------------------------- 
[apply] install: Installs a AMP file(s) into an Alfresco WAR file, updates if an older version is already installed. 
[apply] usage: install <AMPFileLocation> <WARFileLocation> [options] 
[apply] valid options: 
[apply] -verbose : enable verbose output 
[apply] -directory : indicates that the amp file location specified is a directory. 
[apply]     All amp files found in the directory and its sub directories are installed. 
[apply] -force  : forces installation of AMP regardless of currently installed module version 
[apply] -preview : previews installation of AMP without modifying WAR file 
[apply] -nobackup : indicates that no backup should be made of the WAR 
[apply] ----------------------------------------------------------- 
[apply] list: Lists all the modules currently installed in an Alfresco WAR file. 
[apply] usage: list <WARFileLocation> 
[apply] ----------------------------------------------------------- 

BUILD FAILED 
C:\Users\***\Documents\SDP\workspace\AMP_***\build.xml:83: apply returned: 1 

我也試圖在apply任務的spawn屬性切換,但我得到的唯一作用是鬆散的標準輸出。

我知道apply任務可能會有與java任務不同的行爲,但我不明白有什麼區別可能會導致此錯誤;所以,任何想法來調試這個問題是值得歡迎的,我很樂意避免明確地提及所有的模塊,並且能夠將它們放在目錄中。

+1

難道是在'工作'的例子中你有'dir =「。」',但在'apply'的情況下,你有'dir =「$ {build.dir}」',因此它們不是很完美一樣? – 2013-05-13 21:09:08

+0

哦,謝謝_that_逃脫了我,這可能是一個問題......但事實並非如此,因爲我仍然遇到同樣的問題。不能讓我感到驚訝,因爲主要區別在於生成的文件路徑,但'apply'標籤的'relative'屬性默認爲'true' ... – 2013-05-14 09:49:04

回答

0

當我看到錯誤錯誤,同時保存修改文件之前,這與MMT預計目錄WEB-INF/classes/alfresco/module/<moduleid>存在於webapp內部有關。

我會嘗試創建目錄WEB-INF/classes/alfresco/module/RemoteAlfrescoAPIrivet(手動或通過Ant)並嘗試再次運行該命令。

+0

這也沒有幫助。即使這樣做,在插入放大器之前自動創建目錄也會出現問題,因爲目錄名稱是在AMP本身中的......無論如何,這並不重要:它根本不起作用:-( – 2013-05-20 14:35:15

相關問題