diff --git a/src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java b/src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java
index c1b9d1cb..f2d3ca97 100644
--- a/src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java
+++ b/src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java
@@ -5701,13 +5701,22 @@ public void writeDevcMetadata(boolean alive) {
metadataWriter.writeStartElement("devcModeMetaData");
writeElement(metadataWriter, "containerEngine", isDocker ? DEVC_CONTAINER_DOCKER : DEVC_CONTAINER_PODMAN);
writeElement(metadataWriter, "containerName", containerName != null ? containerName : DEVMODE_CONTAINER_BASE_NAME);
+ writeElement(metadataWriter, "imageName", imageName);
+ if (containerfile != null) {
+ writeElement(metadataWriter, "containerfile", containerfile.getCanonicalPath());
+ }
+ if (containerBuildContext != null) {
+ writeElement(metadataWriter, "containerBuildContext", containerBuildContext.getCanonicalPath());
+ }
writeElement(metadataWriter, "containerAlive", String.valueOf(alive));
+ writeElement(metadataWriter, "containerBuildTimeout", Integer.toString(containerBuildTimeout));
+ writeElement(metadataWriter, "containerRunOpts", containerRunOpts);
metadataWriter.writeEndElement();
metadataWriter.writeEndDocument();
metadataWriter.flush();
metadataWriter.close();
} catch (Exception e) {
- warn("Failed to write metadata.");
+ warn("Failed to write metadata.\n" + e.getMessage());
}
}
diff --git a/src/test/java/io/openliberty/tools/common/plugins/util/DevUtilTest.java b/src/test/java/io/openliberty/tools/common/plugins/util/DevUtilTest.java
index 88e0ef86..13527f25 100644
--- a/src/test/java/io/openliberty/tools/common/plugins/util/DevUtilTest.java
+++ b/src/test/java/io/openliberty/tools/common/plugins/util/DevUtilTest.java
@@ -539,10 +539,18 @@ public void testWriteDevcMetadataSimple() throws XMLStreamException, FactoryConf
String content = FileUtils.readFileToString(metaDataXml, "UTF-8");
assertTrue(content.contains("liberty-devtrue"));
+ assertTrue(content.contains("600"));
+ assertTrue(content.contains("docker"));
+ assertTrue(content.contains(""));
+ assertTrue(content.contains(""));
util.writeDevcMetadata(false);
content = FileUtils.readFileToString(metaDataXml, "UTF-8");
assertTrue(content.contains("liberty-devfalse"));
+ assertTrue(content.contains("600"));
+ assertTrue(content.contains("docker"));
+ assertTrue(content.contains(""));
+ assertTrue(content.contains(""));
}
}