Class Reports
--report write both tools do, with the directory created rather than demanded.
A report path is an output, not an input. Every guide invocation writes into
MIGRATED_APP_FOLDER/target/, and the phases that write one run before the app's
first build — so on a freshly-copied or freshly-cloned tree that directory does not exist yet, and
a bare Files.writeString(Path, CharSequence, OpenOption...) fails with a NoSuchFileException whose message is the
path alone. That read as a success line and cost a migration run a detour; hence this class rather
than a mkdir in the guide's command block, which would leave the same trap for anyone
invoking the tool a slightly different way.
Lives here, beside Sources, under this package's membership rule: both tools use it.
public only so the tool subpackages can reach it; jar-internal like everything
else here, and not part of any surface a migrator calls.
-
Method Summary
-
Method Details
-
write
- Parameters:
reportPath- where to write; its parent directories are created if missingrendered- the whole report, UTF-8- Throws:
IOException
-