diff --git a/crd-generator/api/src/main/java/io/fabric8/crd/generator/CRDGenerationInfo.java b/crd-generator/api/src/main/java/io/fabric8/crd/generator/CRDGenerationInfo.java index 08db83f90b3..8b971a6cf96 100644 --- a/crd-generator/api/src/main/java/io/fabric8/crd/generator/CRDGenerationInfo.java +++ b/crd-generator/api/src/main/java/io/fabric8/crd/generator/CRDGenerationInfo.java @@ -36,8 +36,9 @@ public Map> getCRDDetailsPerNameAndVersion() { } void add(String crdName, String version, URI fileURI) { + String filePath = fileURI.getScheme().equals("mem") ? fileURI.toString() : new File(fileURI).getAbsolutePath(); crdNameToVersionToCRDInfoMap.computeIfAbsent(crdName, k -> new HashMap<>()) - .put(version, new CRDInfo(crdName, version, new File(fileURI).getAbsolutePath(), ClassDependenciesVisitor.getDependentClassesFromCRDName(crdName))); + .put(version, new CRDInfo(crdName, version, filePath, ClassDependenciesVisitor.getDependentClassesFromCRDName(crdName))); } public int numberOfGeneratedCRDs() {