if (needsDir) {
// in this case, we create a directory artifact
Artifact parent = new DirectoryArtifact(name, ".dir");
artifacts.add(parent);
// and extra
Serializer ser = new DocViewSerializer(aggregate);
// hack: do better
artifacts.add(parent, "", Constants.DOT_CONTENT_XML, ArtifactType.PRIMARY, ser, 0);
}
return artifacts;
}