BufferedWriter buildPropertiesWriter = new BufferedWriter( buildPropertiesFileWriter);  buildPropertiesWriter.write("bin.includes = /META-INF");  buildPropertiesWriter.close();  buildPropertiesFileWriter.close();
Resource res = new Resource(); res.setDirectory(outputDir.toString()); project.addResource(res);
	public void execute() throws MojoExecutionException, MojoFailureException {		getLog().info("Constructing a MANIFEST.MF for Eclipse 3.0");		try {			File metaInfDir = new File(project.getBasedir().getAbsolutePath()					+ "/META-INF");			metaInfDir.mkdirs();			FileWriter fileWriter = new FileWriter(new File(metaInfDir					.getAbsolutePath()					+ "/MANIFEST.MF"));			BufferedWriter writer = new BufferedWriter(fileWriter);			writer.write("Manifest-Version: 1.0\nBundle-ManifestVersion: 2");			writer.write("\nBundle-Name: ");			writer.write(project.getName());			writer.write("\nBundle-SymbolicName: ");			writer.write(packageName);			writer.write("; singleton:=true");			writer.write("\nBundle-Version: ");			writer.write(project.getVersion().replaceAll("-SNAPSHOT", ""));			writer.write("\nBundle-ClassPath:");			for (Iterator it = getEmbeddedDependencies().iterator(); it					.hasNext();) {				writer.write(" ");				writer.write(it.next().toString());				if (it.hasNext())					writer.write(",\n");			}			writer.write("\nBundle-Activator: ");			writer.write(pluginClass);			writer.write("\nBundle-Vendor: ");			writer.write(project.getOrganization().getName());			writer.write("\nBundle-Localization: plugin");			writer.write("\nExport-Package: .");			writer.write("\nRequire-Bundle:");			for (Iterator it = getEclipseDependencies().iterator(); it					.hasNext();) {				writer.write(" ");				writer.write(it.next().toString());				writer.write(";visibility:=reexport");				if (it.hasNext())					writer.write(",\n");			}			writer.write("\nEclipse-AutoStart: true\n");			writer.close();			fileWriter.close();			FileWriter buildPropertiesFileWriter = new FileWriter(new File(					project.getBasedir().getAbsolutePath()							+ "/build.properties"));			BufferedWriter buildPropertiesWriter = new BufferedWriter(					buildPropertiesFileWriter);			buildPropertiesWriter.write("bin.includes = /META-INF");			buildPropertiesWriter.close();			buildPropertiesFileWriter.close();		} catch (Exception e) {			throw new MojoFailureException(					"Unable to generate Eclipse 3.0 manifest, "							+ e.getMessage());		}	}