The deployment of modules can be configured from the project’s Deployment Assembly page (right click on the project > Properties > Deployment > Deployment Assembly). The only workaround for your scenario for now is to remove the directories/packages of the Maven project which you do not want to include for deployment from the Deployment Assembly page. We do not really recommend this technique.
Can you please elaborate what are ’empty packages’? Are they java packages?