From ed39a19847019cd7bdfd71d09b774fe8d88a4f16 Mon Sep 17 00:00:00 2001 From: Leon Pfletschinger Date: Tue, 14 May 2024 18:00:39 +0200 Subject: [PATCH] add process id to temp directory Signed-off-by: Leon Pfletschinger --- src/main/java/org/dita/dost/ant/InitializeProjectTask.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/org/dita/dost/ant/InitializeProjectTask.java b/src/main/java/org/dita/dost/ant/InitializeProjectTask.java index 4da418a622..b658345938 100644 --- a/src/main/java/org/dita/dost/ant/InitializeProjectTask.java +++ b/src/main/java/org/dita/dost/ant/InitializeProjectTask.java @@ -15,6 +15,7 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; +import org.apache.tools.ant.util.ProcessUtil; import org.dita.dost.log.DITAOTAntLogger; import org.dita.dost.store.Store; import org.dita.dost.store.StoreBuilder; @@ -57,8 +58,12 @@ private Store getStore(XMLUtils xmlUtils) { } File tempDir = toFile(getProject().getUserProperty(ANT_TEMP_DIR)); if (tempDir == null) { + String tempDirString = getProject().getProperty(ANT_TEMP_DIR); + tempDirString = tempDirString.concat(ProcessUtil.getProcessId("001")); + getProject().setProperty(ANT_TEMP_DIR, tempDirString); tempDir = toFile(getProject().getProperty(ANT_TEMP_DIR)); } + for (StoreBuilder storeBuilder : storeBuilderLoader) { if (storeBuilder.getType().equals(storeType)) { return storeBuilder.setTempDir(tempDir).setXmlUtils(xmlUtils).build();