Testing Archetypes
Last updated
Was this helpful?
Last updated
Was this helpful?
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.
Check the for more information about setting up the tests.
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:
Just by adding this property the tests will load the file located at 'src/test/resources/settings.xml' before running the tests.
Values for the archetype properties are added into the src/test/resources/projects/defaults/archetype.properties file.
These will be used to set up the archetype.
The goal used on the generated project can be set in a src/test/resources/projects/defaults/goal.txt file.
Both the properties and goals files can be stored in the src/test/resources/projects/defaults folder, making them the default test files.