final List<DependencySpec> deps = new ArrayList<>();
ModuleSpec.Builder builder = ModuleSpec.build(moduleIdentifier);
// add module's jar
ResourceLoader resourceLoader = ResourceLoaderProvider.getResourceLoader(moduleIdentifier, repository, moduleFile);
// filter
PathFilter filter = (artifact.filter() != null ? new CMRPathFilter(artifact.filter()) : PathFilters.acceptAll());
// module resource root
ResourceLoaderSpec rls = ResourceLoaderSpec.createResourceLoaderSpec(resourceLoader, filter);
builder.addResourceRoot(rls);
// add potential native lib lookup
ResourceLoader nativeLoader = new NativeLibraryResourceLoader(new File(moduleFile.getParent(), "lib"));
builder.addResourceRoot(ResourceLoaderSpec.createResourceLoaderSpec(nativeLoader));
Graph.Vertex<ModuleIdentifier, Boolean> vertex = graph.createVertex(moduleIdentifier, moduleIdentifier);
DependencySpec lds = DependencySpec.createLocalDependencySpec();