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 2022/01/04 09:12:00 UTC

[jira] [Commented] (MSHARED-1015) Using Embedded3xLauncher fails with "-Dmaven.multiModuleProjectDirectory system property is not set"

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

Konrad Windszus commented on MSHARED-1015:
------------------------------------------

Unfortunately the only way to set this is via system properties as the used method https://github.com/apache/maven/blob/706d9319f14b507f3c3deeba4eeda1a51a531c9b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java#L227 does not initialize it from any of the given method parameters. Using system properties does not really work well without forking the JVM (due to multithreading issues).

> Using Embedded3xLauncher fails with "-Dmaven.multiModuleProjectDirectory system property is not set"
> ----------------------------------------------------------------------------------------------------
>
>                 Key: MSHARED-1015
>                 URL: https://issues.apache.org/jira/browse/MSHARED-1015
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-verifier
>    Affects Versions: maven-verifier-1.7.2
>            Reporter: Konrad Windszus
>            Priority: Major
>
> When trying to use an embedded launcher created from the classpath (https://github.com/apache/maven-verifier/blob/17ebffa2467caa59f1e47c302ac03d9e00d8c314/src/main/java/org/apache/maven/it/Embedded3xLauncher.java#L124), launching fails with 
> {code}
> -Dmaven.multiModuleProjectDirectory system property is not set
> {code}
> A similar issue was once reported and fixed for m2e at https://bugs.eclipse.org/bugs/show_bug.cgi?id=462944.
> The reason is https://github.com/apache/maven/blob/706d9319f14b507f3c3deeba4eeda1a51a531c9b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java#L351 which now requires this property to be set. This has been introduced by https://issues.apache.org/jira/browse/MNG-5767 in Maven 3.3.1



--
This message was sent by Atlassian Jira
(v8.20.1#820001)