目前,我们对 Alfresco 3.4.x 的定制包括六个 AMP 文件、内部 log4j jar 的删除、几个 jar 补丁以纠正 CIFS 实现中的错误,以及十几个配置文件。到目前为止,我一直在使用 shell 脚本进行构建,但现在我正在切换到 ant 以与我们的内部准则兼容。
如果我明确提到它们,模块的注入就会起作用,例如
<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
我也尝试打开任务的spawn
属性apply
,但我得到的唯一效果就是松开标准输出。
我知道该apply
任务的行为可能与java
任务不同,但我不明白什么差异可能导致此错误;因此,欢迎任何调试此问题的想法,我希望避免明确提及所有模块并且只能将其放入目录中。