for (MavenCoordinates artefact : getCreateOptions().getMavenCoordinates()) {
Resource resource = mavenRepository.findMavenResource(artefact);
IllegalStateAssertion.assertNotNull(resource, "Cannot find maven resource: " + artefact);
ResourceContent content = resource.adapt(ResourceContent.class);
IllegalStateAssertion.assertNotNull(content, "Cannot obtain resource content for: " + artefact);
try {
ArchiveInputStream ais;
if ("tar.gz".equals(artefact.getType())) {
InputStream inputStream = content.getContent();
ais = new TarArchiveInputStream(new GZIPInputStream(inputStream));
} else {
InputStream inputStream = content.getContent();
ais = new ArchiveStreamFactory().createArchiveInputStream(artefact.getType(), inputStream);
}
ArchiveEntry entry = null;
boolean needContainerHome = homeDir == null;
while ((entry = ais.getNextEntry()) != null) {