The Maven invoker is used when testing archetype, as they need to use themselves to create a test project. This can cause problems with embedded versions of Maven.
In some cases the tests will require additional Maven configuration, such as a default profile. This can be included in a Maven settings file, defined as a property:
<properties>
<!-- Archetype test settings -->
<archetype.test.settingsFile>${project.build.testResources[0].directory}/settings.xml</archetype.test.settingsFile>
</properties>
Just by adding this property the tests will load the file located at 'src/test/resources/settings.xml' before running the tests.
Custom Properties
Values for the archetype properties are added into the src/test/resources/projects/defaults/archetype.properties file.