String[] artifactsArray = new String[artifacts.size()];
artifacts.toArray(artifactsArray);
for (ModuleSpec module : modules) {
if (module != ModuleSpec.DEFAULT_MODULE && !module.isVersioned()) {
String version = checkModuleVersionsOrShowSuggestions(getRepositoryManager(), module.getName(), null, ModuleQuery.Type.ALL, null, null);
module = new ModuleSpec(module.getName(), version);
}
ArtifactContext ac = new ArtifactContext(module.getName(), module.getVersion(), artifactsArray);
ac.setIgnoreDependencies(!withDependencies);
ac.setForceOperation(true);
acs.add(ac);