Is it possible to somehow chain archetypes together by some super-archetype in Maven?
For example I have an archetype create a multi-module project setup. One of these module projects should be created by another archetype. This archetype is not controlled/developed by myself and availible versions change independently of my multi-module archetype.
Therefore is it possible to define some kind of a super-archetype which executes my archetype A creating the full multi-module setup and afterward creating a module by executing another archetype?
If that is not possible - maybe there is another way to achieve this by using some other Maven functionality?
If I understand correctly you could use your archetype to create your multimodule setup but lack the possibiliy to create one of the modules through another archetype. I don't know of a super-archetype but perhaps this approach is helpful:
You could either extend the pom of your archetype or use the goals commandline argument of the generate-goal to fire a second archetype generation (f.e. via the antrun plugin) and embed the result in your multimodule setup. To automate generation for the third-party archetype you can use the individual parameters of the generate goal (again).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With