You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2023/11/11 15:35:00 UTC

[jira] [Commented] (MNG-7926) Modules not properly ordered for profile enables dependencies

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

Konrad Windszus commented on MNG-7926:
--------------------------------------

The relevant code seems to be located in https://github.com/apache/maven/blob/master/maven-core/src/main/java/org/apache/maven/project/ProjectSorter.java called from https://github.com/apache/maven/blob/94749041b421f8e415174deb05e99563d65c25ee/maven-core/src/main/java/org/apache/maven/graph/DefaultProjectDependencyGraph.java#L93

> Modules not properly ordered for profile enables dependencies
> -------------------------------------------------------------
>
>                 Key: MNG-7926
>                 URL: https://issues.apache.org/jira/browse/MNG-7926
>             Project: Maven
>          Issue Type: Improvement
>          Components: Profiles
>         Environment: Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546)
> Maven home: /opt/homebrew/Cellar/maven/3.9.5/libexec
> Java version: 11.0.21, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home
> Default locale: en_DE, platform encoding: UTF-8
> OS name: "mac os x", version: "14.1.1", arch: "aarch64", family: "mac"
>            Reporter: Konrad Windszus
>            Priority: Major
>
> I have the following multimodule project:
> {code}
> Module A
> Module B
> Module C
> {code}
> Module C is only active in profile {{myProfile}}.
> A profile with the same id also makes module B dependent on module C.
> Without the profile being active the modules are built in the order Module A, B (which is fine). But with profile {{myProfile}} being active the order is Module A, B, C which is incorrect as B depends on C.
> Example project https://github.com/Adobe-Consulting-Services/acs-aem-commons/pull/3208



--
This message was sent by Atlassian Jira
(v8.20.10#820010)