Error installing a multimodule archetype created with mvn archetype:create-from-project

It looks like the archetype plugin doesn't support flat layout for multi-module projects. If that is your case a workaround is to change to a nested layout. I did it by moving the modules outside the archetype-resources directory into it. Like this:

Before:

pom.xml
src
├── main
│   └── resources
│       ├── archetype-resources
│       │   └── pom.xml
│       ├── META-INF
│       │   └── maven
│       │       └── archetype-metadata.xml
│       ├── __rootArtifactId__.module1
│       │   ├── pom.xml
│       │   └── ...
│       ├── __rootArtifactId__.module2
│       │   ├── pom.xml
│       │   └── ...
│       ├── __rootArtifactId__.module3
│           ├── pom.xml
│           └── ...
│
└── test
    └── resources
        └── projects...

After:

pom.xml
src
├── main
│   └── resources
│       ├── archetype-resources
│       │   ├── pom.xml
│       │   ├── __rootArtifactId__.module1
│       │   │   ├── pom.xml
│       │   │   └── ...
│       │   ├── __rootArtifactId__.module2
│       │   │   ├── pom.xml
│       │   │   └── ...
│       │   └── __rootArtifactId__.module3
│       │       ├── pom.xml
│       │       └── ...
│       └── META-INF
│           └── maven
│               └── archetype-metadata.xml
└── test
    └── resources
        └── projects...

And then you edit any reference to the modules in archetype-metadata.xml, removing the '..' relative path.