Repository navigation
Conversation
Run in a directory with no pom.xml, Maven supplies a stub project whose
super-POM defaults are not interpolated, so the report was written to a
folder literally named "${project.basedir}/target/site".
A directory value that still contains "${" is now treated as not set, for
the reporting output directory, the build directory parameter and the
project's build directory, and the usual target/site default applies.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
What this fixes
Run in a folder with no
pom.xml, the Maven goals wrote the report into a folder literally named${project.basedir}/target/site. This is the item I mentioned at the end of #235. It affects any repository without apom.xml, which is how a C# repository is normally run.Why it happened
With no
pom.xml, Maven supplies a stub project whose super-POM defaults are not interpolated.MavenReportOutputDirectoryreceived${project.basedir}/target/siteas the reporting output directory, and${project.basedir}/targetas the build directory, and used them as real paths.The change
A directory value that still contains
${is treated as not set, for the reporting output directory, the build directory parameter and the project's build directory. The existingtarget/sitedefault then applies. Projects with apom.xmltake the same path as before.Two files:
MavenReportOutputDirectoryand its test (4 new tests beside the existing 2).How it was tested
${project.basedir}folder, and pass after it.mvn -B verifypasses locally.htmlReportin a folder with nopom.xmlnow writes totarget/site.Not changed
In a folder with no
pom.xml,-Dproject.build.directory=...is still not honoured: Maven fills that parameter from the stub project before the plugin sees it. Letting the user choose the folder there would need a differently named property, which I left for you to decide.Not tried on Windows.
🤖 Generated with Claude Code
Summary by CodeRabbit
target/sitewhen reporting or build-directory settings are blank, missing, or unresolved placeholders.sitesubdirectory.