Properties properties = new Properties();
properties.setProperty( "someProperty", "someValue" );
ArchetypeCreationRequest acr = new ArchetypeCreationRequest().setProject( project ).
setLocalRepository( localRepository ).setProperties( properties ).setPostPhase( "package" );
ArchetypeCreationResult creationResult = archetype.createArchetypeFromProject( acr );
if ( creationResult.getCause() != null )
{
throw creationResult.getCause();
}
// (3) create our own archetype catalog properties in memory
File catalogDirectory = new File( getBasedir(), "target" + File.separator + "catalog" );
catalogDirectory.mkdirs();