* file is renamed to "p2.inf" so that the publisher application finds it.
* </p>
*/
static Product prepareBuildProduct(Product product, File targetDir, String qualifier) throws MojoExecutionException {
try {
ProductConfiguration productConfiguration = ProductConfiguration.read(product.productFile);
qualifyVersions(productConfiguration, qualifier);
File buildProductDir = new File(targetDir, "products/" + productConfiguration.getId());
buildProductDir.mkdirs();
final Product buildProduct = new Product(new File(buildProductDir, product.getProductFile().getName()),
new File(buildProductDir, "p2.inf"));
ProductConfiguration.write(productConfiguration, buildProduct.productFile);
copyP2Inf(product.p2infFile, buildProduct.p2infFile);