maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tibor Digana (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARCHETYPE-571) Unable to generate project which has pom with multiple profiles with modules section
Date Fri, 26 Jul 2019 14:50:00 GMT

    [ https://issues.apache.org/jira/browse/ARCHETYPE-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16893869#comment-16893869
] 

Tibor Digana commented on ARCHETYPE-571:
----------------------------------------

[~sdalvi]
The fix is in branch https://gitbox.apache.org/repos/asf?p=maven-archetype.git;a=commit;h=443064d6426f5cb1a1cd1dbe30bc41e0147ba289

The build process is currently broken.
I will push the fix to master branch after we've fixed the build.

> 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
>            Assignee: Tibor Digana
>            Priority: Minor
>             Fix For: 3.1.2
>
>
> 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)

Mime
View raw message