maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Osipov (JIRA)" <>
Subject [jira] [Commented] (MNG-5973) maven.multiModuleProjectDirectory is not set
Date Wed, 10 Feb 2016 11:21:18 GMT


Michael Osipov commented on MNG-5973:

I am highly in favor moving discovery logic into maven itself, let the booter script be dumb.
I would avoid duplicate fork Unix and Windows.

> maven.multiModuleProjectDirectory is not set
> --------------------------------------------
>                 Key: MNG-5973
>                 URL:
>             Project: Maven
>          Issue Type: Bug
>          Components: Bootstrap & Build
>    Affects Versions: 3.3.9
>            Reporter: Harald Wellmann
> h3. Scenario
> I'm using $\{maven.multiModuleProjectDirectory\} as part of a property definition in
my POM:
> {noformat}
> <properties>
>   <sonar.jacoco.reportPath>$\{maven.multiModuleProjectDirectory\}/target/jacoco.exec</sonar.jacoco.reportPath>
> </properties>
> {noformat}
> (Please ignore the backslashes - I can't find out how to properly escape the braces for
> This works fine when running Maven from the command line, but when building the same
project on Jenkins, the variable is not set, there is no error message, and my build creates
a directory called {{/path/to/workspace/$\{maven.multiModuleProjectDirectory\}/target}}.
> h3. Analysis
> It seems the property {{maven.multiModuleProjectDirectory}} is set in the {{bin/mvn}}
shell script and not within the Java application. Since Jenkins does not use the shell script
but has a special way of embedding Maven, this explains the effect.
> Is there a way to let the Maven Java application compute the property instead of having
it passed in? If not, can Maven check that the variable is set and fail fast otherwise?
> At the very least, this special behaviour of {{maven.multiModuleProjectDirectory}} should
be documented somewhere - up to now, I haven't found any user-visible reference to this property
except a line in the release notes at the time it was introduced.

This message was sent by Atlassian JIRA

View raw message