You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tibor Digana (JIRA)" <ji...@apache.org> on 2019/07/19 21:47:00 UTC
[jira] [Commented] (ARCHETYPE-571) Unable to generate project which
has pom with multiple profiles with modules section
[ https://issues.apache.org/jira/browse/ARCHETYPE-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16889194#comment-16889194 ]
Tibor Digana commented on ARCHETYPE-571:
----------------------------------------
That's strange because we changed only technology, not the algorithm.
> Unable to generate project which has pom with multiple profiles with modules section
> ------------------------------------------------------------------------------------
>
> Key: ARCHETYPE-571
> URL: https://issues.apache.org/jira/browse/ARCHETYPE-571
> Project: Maven Archetype
> Issue Type: Bug
> Components: Archetypes, Plugin
> Affects Versions: 3.1.1
> Reporter: Sneha Dalvi
> Priority: Minor
>
> The archetype plugin does not allow multiple </modules> sections in project's pom, even if each </modules> section is in different <profile> section.
>
> I get this error
> {code:java}
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.1:generate (default-cli) on project standalone-pom: Illegal to use multiple <modules/> sections.{code}
> when I try to generate a project which has multiple profiles with modules sections in pom as follows. Having multiple profiles helps to build specific modules in specific profiles.
> {code:xml}
> <profiles>
> <profile>
> <id>profile1</id>
> <modules>
> <module>module1</module>
> </modules>
> </profile>
> <profile>
> <id>profile2</id>
> <modules>
> <module>module2</module>
> </modules>
> </profile>
> </profiles>
> {code}
>
> [~tibordigana] Looks like PomUtils.java does not consider possibility of multiple profiles while checking for multiple </modules> sections.
> [https://github.com/apache/maven-archetype/blob/6ee16590590c722b6e7112edb470cf275106f53f/archetype-common/src/main/java/org/apache/maven/archetype/common/util/PomUtils.java]
>
> Please review. Thanks!
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)