}
private void registerPrivileges(Session session) throws IOException, RepositoryException {
PrivilegeDefinitions privileges = archive.getMetaInf().getPrivileges();
if (privileges != null && !privileges.getDefinitions().isEmpty()) {
PrivilegeInstaller installer = ServiceProviderFactory.getProvider().getDefaultPrivilegeInstaller(session);
try {
log.debug("Registering privileges...");
installer.install(tracker, privileges);
} catch (RepositoryException e) {
if (opts.isStrict()) {
throw e;
}
track(e, "Packaged privileges");