Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 2.2
-
Fix Version/s: None
-
Component/s: Plugin
-
Labels:None
-
Number of attachments :
Description
As a user I would like that archetypes created from a multi module project (through archetype:create-from-project goal) take into account the profile chosen during the goal execution, in order to determine the chosen modules for archetype creation.
For example, if I have the current parent project:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.test</groupId>
<artifactId>test-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Parent</name>
<profiles>
<profile>
<id>a</id>
<modules>
<module>a</module>
<module>b</module>
<module>c</module>
</modules>
</profile>
<profile>
<id>b</id>
<modules>
<module>d</module>
<module>e</module>
</modules>
</profile>
</profiles>
</project>
And I choose to create an archetype for the "a" profile:
mvn -P a archetype:create-from-project
I would like that the archetype created contains only the modules specified in profile "a", that is modules "a", "b" and "c".
This feature could enhance multimodule archetype maintenance and combinations.