protected void testArchetype(String groupId, String artifactId, String version) throws Exception {
File targetDir = new File(baseDir, "target/archetypes/" + artifactId);
FileUtils.deleteDirectory(targetDir);
targetDir.mkdirs();
EventMonitor eventMonitor = new DefaultEventMonitor(new PlexusLoggerAdapter(
new MavenEmbedderConsoleLogger()));
Properties props = new Properties();
props.setProperty("archetypeGroupId", groupId);
props.setProperty("archetypeArtifactId", artifactId);
props.setProperty("archetypeVersion", version);
props.setProperty("groupId", "sample");