* @throws MojoExecutionException if anything bad happens while parsing files
*/
private EclipseOsgiPlugin getEclipsePlugin(File file)
throws MojoExecutionException {
if (file.isDirectory()) {
return new ExplodedPlugin(file);
} else if (file.getName().endsWith(".jar")) //$NON-NLS-1$
{
try {
return new PackagedPlugin(file);
} catch (IOException e) {