public void execute() throws MojoExecutionException, MojoFailureException {
		VirgoPlanBuilder.logger = getLog();
		
		// Get the packaging type of the artifact in hand, if it is POM then this means it is the parent POM, and in this case a bare plan file should be prepared and written
		if (packaging.equalsIgnoreCase("pom")){
			// Write bare plan file
			
			// Check the required attributes inside the plan xml configuration supplied in the pom
			if (planEntity.getName() == null || planEntity.getVersion() == null
					|| planEntity.getArtifact() == null)
				throw new MojoFailureException(errorStrMissingMandatoryFields);

			String planFileName = artifactFinalName + ".plan";

			// Prepare configuration entity for the VirgoPlanBuilder
			// I am NOT ignoring any other configuration passed (like supplying some artifacts by hand in the parent pom file), it will be added to the plan and any other sub modules will be appended to the same file
			
			getLog().info("Generating a bare Eclipse Virgo plan file...");
			boolean isSuccessful = VirgoPlanBuilder.buildBarePlanS(planEntity, planFileName, outputDirectory.getAbsolutePath());
			if (isSuccessful == false)
				throw new MojoFailureException("A problem occured during building/writing the bare plan file.");
			
			barePlanFile = new File(outputDirectory + File.separator + planFileName);
			
			getLog().info("Bare Eclipse Virgo plan file has been generated. Watch this file as sub module(s) definitions are appended to it.");
		}
		else
		{
			// Then this artifact is actually a submodule, and an entry for it should be added to the main plan file located at the parent/target directory
			String artifactFullName = artifactFinalName + "." + packaging;

			// Check if the current plugin execution is following previous one on the parent, or that the POM for this module is independently being built
			if (barePlanFile == null){
				// Which means it is not executed through the parent
				// Do nothing, you should exit
				getLog().info("Found that this module is not being built through its parent project, thus skipping the virgo-plan plugin.");
				return;
			}
			VirgoPlanBuilder.appendToPlan(artifactFullName, outputDirectory.getAbsolutePath(), barePlanFile);
		}
	}