In LockFile we have:
try { randomAccessFile = new RandomAccessFile(lockFile, "rws"); fileLock = randomAccessFile.getChannel().tryLock(0L, 1L, false); if (fileLock != null) { randomAccessFile.setLength(0); randomAccessFile.seek(0); randomAccessFile.write(payload); } } catch (IOException | OverlappingFileLockException e) { // handle it as null result fileLock = null; }
And in PlexusContextListener:
lockFile = new LockFile(new File(nexusWorkdir, "nexus.lock")); if (!lockFile.lock()) { throw new IllegalStateException("Nexus work directory already is use!"); }
So any IOException that gets thrown ends up as saying work directory is in use. And the caused by exception isn't even set.
This is going to cause a lot of support tickets.
- relates
-
NEXUS-6151 Nexus war edition will not start if work directory does not exist
-
- Closed
-