I'm facing a similar issue, and my workaround is less than elegant but I haven't found a better one yet.
To restate the issue:
- ProjectA.war depends on X.class (or more) from Project B.jar
- ProjectB.jar needs to be repackaged as Project B.war
The solution I'm going with:
- Convert ProjectB.jar to ProjectB.war as needed
- Manually extract the ProjectB.jar file from ProjectB.war and cite that extracted .jar as a dependency in ProjectA
(I followed How to extract .war files in java? ZIP vs JAR)
Depending on your build system you can also set ProjectB to build both a .war and a .jar for dependency at the same time; I'm using Maven and that's the path I'm eventually going* so that I'm not manually digging out the .jar each time I update ProjectB, and then I'm just going to list that .jar as a dependency for ProjectA.
* = http://maven.apache.org/plugins/maven-war-plugin/faq.html at the bottom of the FAQ, "How do I create a JAR containing the classes in my webapp?"