Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/main/java/org/apache/maven/plugins/clean/CleanMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,12 @@ public void execute() {
if (fast && session != null) {
Path tmpDir = fastDir;
if (tmpDir == null) {
Path rootDir;
Path rootDir = null;
try {
rootDir = session.getRootDirectory();
} catch (IllegalStateException e) {
rootDir = null;
// Embedded usage where no root directory is available — fall through to fallback.
logger.debug("Missing root directory, falling back to system temp directory.", e);
}
tmpDir = rootDir != null
? rootDir.resolve(".mvn").resolve("target").resolve("clean")
Expand Down
Loading