Model generatedModel, templateModel;
try
{
StringReader strReader = new StringReader( writer.toString() );
MavenXpp3Reader reader = new MavenXpp3Reader();
templateModel = reader.read( strReader );
}
catch ( IOException e )
{
throw new ArchetypeTemplateProcessingException( "Error reading template POM", e );
}
File artifactDir = getTestFile( "target", (String) parameters.get( "artifactId" ) );
File pomFile = getTestFile( artifactDir.getAbsolutePath(), OldArchetype.ARCHETYPE_POM );
try
{
FileReader pomReader = new FileReader( pomFile );
MavenXpp3Reader reader = new MavenXpp3Reader();
generatedModel = reader.read( pomReader );
}
catch ( IOException e )
{
throw new ArchetypeTemplateProcessingException( "Error reading generated POM", e );
}