cancel
Showing results for 
Search instead for 
Did you mean: 

Deploying an AMP without having alfesco.war deployed

hbf
Champ on-the-rise
Champ on-the-rise
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"/>
    </path>

    <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"/>
        </java>
    </target>

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,
Kaspar
1 REPLY 1

hbf
Champ on-the-rise
Champ on-the-rise
Answering myself, I fixed the problem by altering the classpath to:


    <path id="class.path">
        <dirset dir="${build.dir}" />
          <fileset dir="../../alfresco-build/HEAD/root/projects/web-client/build" includes="**/*.jar"/>
        <dirset dir="../../alfresco-build/HEAD/root/projects/repository/config"/>
        <dirset dir="${models.dir}"/>
    </path>

That is, I added the build directory of the Alfresco SVN checkout to the classpath; this directory contains ModuleManagementTool.class, etc.).