Touch or modify the web.xml.
This doesn't seem to work when the app.war directory is inside app.ear directory.
I figured how to redeploy war inside a ear. I used jmx4ant library to do the following:
anajavi - are you running on Windows by any chance?
Using ant 1.5.4 and jmx4ant 1.1 or 1.2b my ant is unable to find the InvokeMBeanTask class.
But it's not what you would expect! The JAR is actually in the classpath (in several ways)...AND the WEIRD thing is that it can find other class files in the xml4ant.jar, it just cannot find the *MBeanTask.class files.
If I change InvokeMBeanTask to IfExists (another class in that JAR, same pkg) and leave everything else the same, Ant can find the IfExists class (and just pukes 'cause it doesn't meet the interface).
I am confident the spelling and package are correct. I even copied these from a reliable place after banging my head for a while.
Note that I copied the Ant <taskdef..> declaration right from the jmx4ant examples, I am confident it is correct (my ejbdoclet taskdef works fine).
I am now suspecting far-out things like some strange Windows-based classname length problem in Ant, corrupt JARs, etc.
Anybody seen this also? The jmx4ant site itself is very thin.
The symptom was strange, but the real problem was more usual. I was getting the error:
taskdef class org.apache.tools.ant.taskdefs.optional.jmx.InvokeMBeanTask cannot be found
It was not actually that class that was not found, but a dependent class. Reading the jmx4ant Overview they list JBoss JARs to put onto your classpath before running Ant, not just in a <path..> definition.
Following the instructions worked. :-|