LPS-48313 Make it work whether I type "ant jar" or "ant war"
LPS-48313 If you're an OSGi module and you have a portlet.xml, then we need to massage your web.xml
LPS-48313 Abstract out direct deploy logic to a smaller macrodefs that can be called independently. No logic changes.