URL libraryLocation = preferences.getSharedLibraryLocation();
LibraryManager manager = LibraryManager.forLocation(libraryLocation);
for (ParsedConfArtifacts parsedConfArtifacts : parsedArtifacts) {
try {
String libraryName = getLibraryName(parsedConfArtifacts.getConf());
Library library = manager.getLibrary(libraryName);
Map<String, List<URI>> libraryEntries = convertParsedArtifacts(parsedConfArtifacts);
if (library != null) {
manager.removeLibrary(library);
}
manager.createURILibrary("j2se", libraryName, libraryEntries);