I’m developing a web app using JBoss 4.0.2 and I’ve run into a slight gotcha with MyEclipse IDE’s deployment tool. If my project is named “foo” and I’ve added web capability to it, MyEclipse happily copies my WEB-INF directory, libraries, and so forth to my JBoss deployment directory. It puts everything under a deployment directory with the same name as my project, e.g.
foo/WEB-INF/web.xml
foo/WEB-INF/classes/hibernate.cfg.xml
foo/WEB-INF/lib/whatever.jar
foo/bar.jsp
The problem is that JBoss doesn’t know to treat this directory as a Web application, so it walks through the directory tree trying to find stuff to deploy, and I get tons of “failed to add deployable jar” error messages complaining that it can’t figure out how to deploy my .class files, etc.
If I rename my project to “foo.war”, then the deployment tool creates a foo.war directory in my JBoss deployment directory, and all is well.
Is there a way to tell MyEclipse to use a particular directory name when it deploys? I’d rather not have to put “.war” on the end of my project name if there’s a way to avoid it.
This is using Eclipse 3.1 and MyEclipse 4.0M3, but I doubt this is a 4.0-specific question.