AnsweredAssumed Answered

Deploying an AMP without having alfesco.war deployed

Question asked by hbf on Sep 10, 2007
Latest reply on Oct 15, 2007 by hbf
I have run into the following problem: I am building and deploying an AMP using ant

ant package-amp update-war

where the relevant part of build.xml is

    <path id="class.path">
        <dirset dir="${build.dir}" />
        <fileset dir="../../repository-server/tomcat/webapps" includes="**/*.jar"/>
        <dirset dir="../../alfresco-build/HEAD/root/projects/repository/config"/>
        <dirset dir="${models.dir}"/>
        <dirset dir="../external-content/config/alfresco/module/org.alfresco.module.ExternalContent/model"/>

    <target name="update-war" depends="package-amp" description="Update the WAR file." >
        <echo>Installing Knowledge Center AMP into WAR</echo>
        <java dir="." fork="true" classname="org.alfresco.repo.module.tool.ModuleManagementTool">
            <classpath refid="class.path" />
            <arg line="install ${amp.file} ${war.file} -force -verbose"/>

Unfortunately, the target 'update-war' (which calls the ModuleManagementTool) only works if I have previously deployed alfreso.war (so that the directory alfresco/ exists). I don't want this as it requires me to hand-deploy the war before installing the AMP. Is there a way to tell ant to use the ModuleManagementTool inside Alfresco.war?

I tried to to this using a

<fileset dir="../../repository-server/tomcat/webapps" includes="alfresco.war"/>

but that did not work.

What can I do?

Many thanks,