Search code examples
javajbossdeploymentexplodeexploded

How to remove exploded war in JBoss without stopping the server?


I can delete everything except lib folder(JBoss says application is undeployed, but he wont release the jars).

I tied jboss-maven-plugin and hard-undeploy, however it says that file(doc says it also support dirs) is undeployed, however it does not undeploy application.

Im using jboss-4.2.1.GA. I bet it can be undeployed through jmx-console, but i weren't able to find out how.


Solution

  • The way Seam performs an undeploy an exploded application is

    <target name="unexplode" description="Undeploy the exploded archive">
            <delete failonerror="no">
                <fileset dir="${ear.deploy.dir}">
                    <exclude name="**/*.jar"/>
                </fileset>
            </delete>
            <delete file="${deploy.dir}/${project.name}-ds.xml" failonerror="no"/>
            <delete dir="${ear.deploy.dir}" failonerror="no"/>
    </target>
    

    this usually works good, sometimes I need to restart (by touching a file which is observerd by the deployer)

    <target name="restart-exploded">
        <antcall target="explode"/>
        <touch file="${ear.deploy.dir}/META-INF/application.xml"/>
    </target>