As mentioned in this FAQ for maven deploy plugin, as well as in this SO , you should add the following to the pom of a module that you do not want to deploy.
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>X.Y</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>