By default, m2e doesn't set the Maven Library as exported for Ejb/Jar projects, but some users might have set it by mistake.
You need to check the following :
- right click on your Utility/EJB project > Properties > Java EE Module Dependencies. * You must make sure the Maven Library's not selected, otherwise, all your dependencies will be deployed in your containing Wars/Ears
For these projects, the following warning may appear : "Classpath entry org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER will not be exported or published. Runtime ClassNotFoundExceptions may result.".
Select the corresponding quick fix, make sure to select "Exclude the associated classpath ...". Unfortunately, until
MNGECLIPSE-1587 is resolved, that setting will be lost with the next "Maven > Update Project Configuration"