Affects Version/s: 2.7
Fix Version/s: None
Component/s: M2Eclipse support
Number of attachments :
MANIFEST.MF files generated by the plugin are empty, therefore a correct deployment of an EAR project on an application server such as JBoss will fail with classloading issues.
After a close look at the source code the problem comes from the fact that the dependencies resolving is disabled in the mojo, in order to not feed the .classpath, but having this side-effect.
I suggest resolving dependencies in any case, and adding a property instead to filter dependencies in the .classpath generation.
1: add boolean property to EclipsePlugin : ignoreDeps
2: add boolean property to EclipseWriterConfig : ignoreDeps
3: in M2EclipseMojo>>setupExtra() :
- //setResolveDependencies( false );
4: in EclipsePlugin>>createEclipseWriterConfig(IdeDependency) :
- call config.setIgnoreDeps(isIgnoreDeps());
5: in EclipseClasspathWriter>>write() :
- test against if (!config.isIgnoreDeps()) around lines 348 to 387 in order to skip writing of M2_REPO... dependencies
Tested here, works like a charm