[ https://issues.apache.org/jira/browse/MNG-8095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17836779#comment-17836779 ]
Michael Osipov commented on MNG-8095: ------------------------------------- This should have stayed open until the release notes are fixed. > Usage of session.rootDirectory / session.topDirectory does not work > ------------------------------------------------------------------- > > Key: MNG-8095 > URL: https://issues.apache.org/jira/browse/MNG-8095 > Project: Maven > Issue Type: Bug > Components: Core > Affects Versions: 3.9.2, 3.9.3, 3.9.4, 3.9.5, 3.9.6 > Reporter: Karl Heinz Marbaise > Assignee: Karl Heinz Marbaise > Priority: Minor > > I have setup a project which uses the following parts > (https://maven.apache.org/docs/3.9.2/release-notes.html) > * {{${session.topDirectory}}} > * {{${session.rootDirectory}}} > * {{${project.rootDirectory}}} > but unfortately they are not being replaced during the run of the project... > A small excerpt from the project... using the following simple configuration: > {code:xml} > <plugin> > <groupId>com.soebes.maven.plugins</groupId> > <artifactId>echo-maven-plugin</artifactId> > <version>0.5.0</version> > <executions> > <execution> > <phase>initialize</phase> > <goals> > <goal>echo</goal> > </goals> > <configuration> > <echos> > </echo> > <echo>project.rootDirectory: '${project.rootDirectory}'</echo> > <echo>session.rootDirectory: '${session.rootDirectory}'</echo> > <echo>session.topDirectory: '${session.topDirectory}'</echo> > <echo>project.basedir: '${project.basedir}'</echo> > <echo>project.build.directory: > '${project.build.directory}'</echo> > </echo> > </echos> > </configuration> > </execution> > </executions> > </plugin> > {code} > My expectation is that during the build the values should be replaced with > the appropriate values which works with Maven 4 (Tested with Maven > 4-alpha-13) like this: > {code} > [INFO] --- echo:0.5.0:echo (default) @ sub-mod-2 --- > [INFO] ========================================================= > [INFO] project.rootDirectory: '/projects/props' > [INFO] session.rootDirectory: '/projects/props' > [INFO] session.topDirectory: '/projects/props' > [INFO] project.basedir: '/projects/props/sub-mod-2' > [INFO] project.build.directory: '/projects/props/sub-mod-2/target' > [INFO] ========================================================= > {code} > But the run with Maven 3.9.X it looks like this: > {code} > [INFO] --- echo:0.5.0:echo (default) @ sub-mod-2 --- > [INFO] ========================================================= > [INFO] project.rootDirectory: '${project.rootDirectory}' > [INFO] session.rootDirectory: '${session.rootDirectory}' > [INFO] session.topDirectory: '${session.topDirectory}' > [INFO] project.basedir: '/projects/props/sub-mod-2' > [INFO] project.build.directory: '/projects/props/sub-mod-2/target' > [INFO] ========================================================= > {code} > I have setup a full working example here: > https://github.com/khmarbaise/maven-bugs/tree/master/MNG-8095 -- This message was sent by Atlassian Jira (v8.20.10#820010)